Hello,
When I was using the below simple code on latest Aspose.Words, the converted PDF from word rendered the question marks and square boxes for non-english characters eventhough original docx template is able to render them. How should I use Aspose.Words to properly render the non-english data.
Here is the sample code used:
Aspose.Words.Document doc = new Aspose.Words.Document(@"C:\temp\original.docx");
doc.Save(@"C:\temp\output.pdf", SaveFormat.Pdf);
Here are the input docx file and output pdf fileoriginal.docx (42.7 KB)
output.pdf (94.5 KB)
for your referrence.
@srinudhulipalla The problem is not reproduceable on my side. Here is the output document generated by the same code on my side: out.pdf (57.3 KB)
Most likely the problem occurs because the fonts used in your input document are not available on the machine where document is converted to PDF. If Aspose.Words cannot find the font used in the document, the font is substituted. This might lead into fonts mismatch and document layout differences due to the different fonts metrics. You can implement IWarningCallback to get notifications when font substitution is performed.
Please see our documentation to lean where Aspose.Words looks for fonts:
https://docs.aspose.com/words/net/specifying-truetype-fonts-location/