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

Free Support Forum - aspose.com

Convert Word DOCX Document to PDF using Java & Receive Notification of Missing Fonts and Font Substitution during Rendering

We are having an issue with Aspose.Words java where the save as PDF drastically messes up the formatting of the original document. We were using 19.6 but updated to 20.1 to verify the issue was still present. I have attached Sample Files.zip (546.4 KB) this has the orginal DOCX file we are reading into Aspose and doing some find and replace on text in the document. The Save as DOCX file is the results running through our AsposeCode.txt code where it saves it as a DOCX file and we are getting the expected results with this. When we till it to save it as a PDF file we get Save as PDF as our results where the formatting of the document gets shifted around a lot compared to the DOCX file. I also included an Expected Results.pdf file that I get from using MS Word to save the file as a pdf and the formatting is maintained.

If you could please let me know if there is anything that I should be doing to ensure the PDF format is coming out as expected that would be appreciated.

@AurinBlackstaff,

Please make sure that the following fonts are installed on your machine:

  • Calibri
  • Arial
  • Arial Narrow
  • MS Mincho
  • Arial Unicode MS
  • Wingdings
  • Symbol
  • Garamond

Also, please check the following article:

Thank you so much for the assistance on that. After checking the fonts directory we were in fact missing a couple of them. Also thank you for the documentation for how to discover this issue in the future that will be most helpful.

@AurinBlackstaff,

Thanks for your feedback. In case you may have further inquiries or need any help in future, please let us know.