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

Free Support Forum - aspose.com

Incorrect font in PDF output

we are experiencing different results on different OS’s when using the Java libraries. When we run our code on a windows 2012 system the output PDF does not contain the correct font which is Times New Roman. When we run it on a 2008 server the output is correct. Time New Roman is loaded on both server. In fact when we us your .Net libraries it works correctly on the Windows 2012 server and 2008 server.

Hi John,

Thanks for your inquiry. Please note that Aspose.Words requires TrueType fonts when rendering documents to fixed-page formats (JPEG, PNG, PDF or XPS). You need to install fonts on the machine where you're converting documents to Pdf. Please refer to the following articles:

How Aspose.Words Uses True Type Fonts
How to Specify True Type Fonts Location
How to Receive Notification of Missing Fonts and Font Substitution during Rendering

Please embed the fonts inside your input document and share it here for testing. We will investigate the issue on our side and provide you more information. To embed a TrueType font in a saved document in Microsoft Office Word 2013, follow these steps:

  • First, select the File option from the Word ribbon at the top of the screen.
  • From the options bar on the left-hand side, choose Options.
  • A Word Options window will come up. Select the Save option from the banner on the left-hand side.
  • Under Preserve fidelity when sharing this document select the check box next to Embed fonts in the file. Then click OK.
The attached contains 2 word documents. The document "test1.docx" when converted to PDF contains the correct fonts. The second document does not. They are converted on the same server using the same Aspose libraries. They both are using Times New Roman.
Hi John,

Thanks for sharing the detail. We have tested the scenario using latest version of Aspose.Words for Java 16.3.0 at Windows Server 2012 and have not found the shared issue. Please use Aspose.Words for Java 16.3.0. We have attached output Pdf with this post for your kind reference.