Hi
Sometimes in exported PDF square characters shows instead of Arabic fonts.
Below is details of my problem:
I use Oracle application server for my java application and Oracle Linux 6.8 and 6.10 as operation system.
In the Oracle application server I create 4 instances of the application (this application will convert word document to PDF) and sometimes instances 1,2,3 of this application work fine with Aspose and at the same time in the 4th instance of the application (for example) the converted PDF files show square characters instead of Arabic fonts that used in the word document file.
In the log file of the application I have such error:
Caused by: java.io.FileNotFoundException: Can’t find file: /usr/share/fonts/truetype/BNaznnBd.ttf
but I’m completely sure that this font is in the directory.
what should I do to resolve this issue?
@abbasdehghani
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
As described in the documents the .ttf files are located in right place.
The exported PDF by Aspose works fine on server but suddenly this problem happens and Arabic font will preview as squares. How should I do to fix it?
@abbasdehghani
To ensure a timely and accurate response, please attach the following resources here for testing:
- Your input Word document.
- Please attach the output PDF file that shows the undesired behavior.
- Please attach the fonts used for Arabic text.
- Please create a standalone console 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.