We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

DOCX to PDF conversion issue with font rendering at differnt systems using Java

Hi ,
We have a strange issue.
On 2 environments with the same set of fonts availability, we see the pdf rendered by aspose Words is using different fonts.

How can we validate the same?

What I have done.
I generated the pdf and took the fonts list from the rendered pdf and installed all the fonts used by the PDF, in the other machine.
Restarted the machine. And generated the pdf using the same version of aspose on that machine but the pdf generated is different as it is using different fonts.

Can you please help here.
Regards,
Ankur Vashishtha

@sumeetm

We suggest you please implement IWarningCallback Interface to get notifications about incorrect document rendering. Please read the following article.
How to Recognize That the Font Was Replaced

If you have installed all fonts on both machines, the output should be same. However, if you still face problem, please share following detail here for testing:

  • Your input Word document.
  • Please attach the output PDF files generated at different environment.
  • Please attach the expected output PDF file that shows the desired behavior.
  • Please create a simple Java application ( source code without compilation errors ) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.

Document doc = new Document(“C:\Users\Administrator\Downloads\MOJ\Font change Nativ.docx”);
HandleDocumentWarnings callback = new HandleDocumentWarnings();
doc.setWarningCallback(callback);
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
// pdfSaveOptions.setUpdateSdtContent(false);
doc.save(“C:\Users\Administrator\Downloads\MOJ\Font change Nativ_aspose.pdf”,pdfSaveOptions);

I have already done that on one machine already.
It didnt give any warning.
THen i used the rendered pdf properties to install fonts in the other machine. (customer).
Restarted the windows. Still the renditions are incorrect and using different fonts.

Regards,
Ankur Vashishtha

@sumeetm

Please share the working environment e.g. operating system, Java version etc. and requested detail in my previous post for testing. Thanks for your cooperation.