Convert Word to PDF font issue

I’m creating a server on AWS which converting a word file to pdf file using Aspose.Total for Java in Eclipse.

I have an issue with the PDF generation.
When I run the server on localhost, the word to pdf generation works fine and is displayed exactly the same as the word.
When I upload my code into AWS server (which sits on Linux), the word to pdf generation works fine except the fonts in the generated PDF.

Does someone know the issue? Am I missing something? Do I need to deploy some styling to my AWS server?

@Shaharsa

Please note that Aspose.Words requires TrueType fonts when rendering document to fixed-page formats (JPEG, PNG, PDF or XPS). You need to install fonts that are used in your document on the machine where you are converting documents to PDF. Please refer to the following articles:

How Aspose.Words Uses True Type Fonts
How to Receive Notification of Missing Fonts and Font Substitution during Rendering
How to Install True Type Fonts on Linux

1 Like

Hi Tahir,
Thanks, it works.

Do you have any idea why for Aspose.Words it works but for Aspose.Cells and Aspose.Slides it doesn’t?

I’ve used the following codes for Cells and Slides each:
FontConfigs.setFontFolders(new String[] { “/usr/share/fonts/”,"/usr/share/wine/fonts/"}, true);
FontsLoader.loadExternalFonts(new String[] { “/usr/share/fonts/”,"/usr/share/wine/fonts/"});

@Shaharsa

Regarding Aspose.Slides and Aspose.Cells issue, the reason may be fonts used in the document are not accessible or probably be missing on the machine where you are exporting document to PDF. Please read the following articles.
Using Custom Fonts without Installing them

Get a List of Fonts used in a Spreadsheet or Workbook
Configuring Fonts for Rendering Spreadsheets