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

Free Support Forum - aspose.com

Missing font substitution is cutting text in PDF


I have one Excel file which have the data in Font “Angsana” which is not available in the machine. While converting it to PDF, Aspose cells is converting it into Arial font due to missing fonts but data is cutting due to font size difference between Angsana and Arial. Any suggestion how we can resolve it except installing the fonts? I have attached excel and generated PDF both in the attachment.
1538041204.zip (603.9 KB)


Please note the working of the (internal) process of Aspose.Cells regarding fonts:

  1. The API first tries to find the fonts on the file system matching the exact font name used in the spreadsheet.
  2. If API cannot find the fonts with the exact same name, it attempts to use the default font specified under the Workbook’s DefaultStyle.Font property.
  3. If API cannot locate the font defined under the workbook’s DefaultStyle.Font property, it attempts to select the most suitable fonts from all of the available fonts.
  4. Finally, if API cannot find any fonts on the file system, it renders the spreadsheet using Arial.
    Set Custom Font Folders

To render exact data with similar formation/style is install the underling font(s) on the machine. There is no other reliable way or best way to cope with it. You can substitute fonts (used in the workbook) with your desired fonts (available on the system) but this will not and always be 100% accurate. Please note, Aspose.Cells APIs provide the ability to specify the substitute font for rendering purposes. This mechanism should be helpful when a required font is not available on the machine where conversion has to take place. So, you have to provide a list of font names in similar glyph yourselves as an alternative to the originally required font, see the document on how to substitute fonts for your reference.

@Amjad_Sahi Thanks for explaining the font mechanism.


You are welcome.