I have a problem converting this document to PDF. When I do some characters are replaced with a ‘?’
We’re using Aspose.Words 21.9.0.0 and have embedded the font.
This is the first time ever that i have seen something like this.
Hopefully an answer/fix can be found.
bijlage 4- MODEL OPSTALOVEREENKOMST.docx (102.7 KB)
bijlage 4- MODEL OPSTALOVEREENKOMST.pdf (124.9 KB)
I’ve uploaded both the source document and the converted DF
@helpdeskvgc The problematic text in your document is formatted with FlandersArtSans-Regular
font, which is embedded into the document with Embed only the characters used in the document
option. It seems after embedding the fonts the document has been edited and characters required to render this text are not present in the embedded subset.
To fix the problem you can open/save the document in MS Word by unchecking and checking again Embed fonts in the file
option. But please note, the fonts used in the document must be present on the machine where you edit the file.
Another option remove embedded fonts from the document, this makes Aspose.Words to select fonts from the fonts available in your system. For example see the following code:
Document doc = new Document(@"C:\Temp\in.docx");
doc.FontInfos.EmbedTrueTypeFonts = false;
using (MemoryStream ms = new MemoryStream())
{
doc.Save(ms, SaveFormat.Docx);
ms.Position = 0;
doc = new Document(ms);
}
doc.Save(@"C:\Temp\out.pdf");