Fonts are difference while converting excel to pdf

I am using latest version of Aspose.Cells to convert excel worksheet to pdf. I have “NewsGoth XCn BT” font in excel but in PDF font is “SimSun-ExtB” after converting excel to pdf using Aspose.

It is working as expected when I use Office Interop.

@anilsonawane,

Thanks for the details.

It looks like missing fonts issue on your end. Please note, Aspose.Cells requires font files (i.e., .ttf files that should be installed on the machine) for Excel to PDF or Sheet to image features. It seems the specified fonts (e.g “NewsGoth XCn BT”) are not installed on your machine, so Aspose.Cells has to use substitutions accordingly. Please make sure the underlying fonts (used in the workbook) should be installed on the machine first and then try your scenario/case with Aspose.Cells.

You may copy the underlying fonts (e.g “NewsGoth XCn BT”) used in the workbook in some folder and then specify your font folder (containing the required fonts (.ttf files) in it) at the start of the program, see the document for your reference:
Configuring Fonts for Rendering Spreadsheets|Documentation [.NET]
Configuring Fonts for Rendering Spreadsheets|Documentation [Java]

Moreover, after installing the required fonts and setting the required fonts folder in code, your issue should be fixed. Moreover, please also make sure the APIs should be able to access your fonts folder seamlessly, there should not be any rights issue.

Let us know if you still have any issue or confusion.

Hi Amjad,
Thanks for information. Said font(“NewsGoth XCn BT”) is already installed on my machine and even i have specified font folder at the start of the program as suggested by you.
I have tried same thing using MS Office Interop and it is working as expected. We have recently purchased Aspose license.

@anilsonawane,

Please provide your template Excel file, output PDF and font file(s) (.ttf files for “NewsGoth XCn BT”), we will check it soon.