I’m trying to convert a .docx to a .pdf with the following code:
using (var ms = new MemoryStream(bfile)) // bfile = byte[] (.docx)
{
var doc = GemBox.Document.DocumentModel.Load(ms);
doc.Comments.Clear();
using (var write = new MemoryStream())
{
var so = new GemBox.Document.PdfSaveOptions();
doc.Save(write, so);
return write.ToArray();
}
}
The conversion works except that it removes most of the special characters.
Output:
Input:
(I’m only allowed to upload one image in this post )
I’ve also tried to add an emoji specific font to see if it preserves them with the following line:
doc.Document.DefaultCharacterFormat.FontName = “Segoe UI Emoji”; (default windows font)
The result is even less characters
What else could I try? And is it even possible to preserve these characters with GemBox?
Thank you for your time.