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

Free Support Forum - aspose.com

When converting docx to pdf font changes

Hi,

When I convert a certain docx document to pdf using Aspose.Words, the font changes from Times New Roman to Calibri. Do you know how this can happen? Times New Roman is installed on my PC and on the server (it happens on both machines).

Please see attached the original Word file and the resulting PDF file.

Kind regards,
Martin

ExampleFiles.zip (170.8 KB)

@dhmderuiter

We have tested the scenario using the latest version of Aspose.Words for .NET 20.6 and have not found the shared issue. So, please use Aspose.Words for .NET 20.6. We have attached the output PDF with this post for your kind reference. 20.6.pdf (66.9 KB)

The output PDF you attached shows the same: it doesn’t retain the Times New Roman font. The original Word file has all text in Times New Roman, but after saving it as PDF all text has another font, which shouldn’t happen.

@dhmderuiter

Could you please elaborate this query? The input Word file and output PDF generated by Aspose.Words have the same font i.e. Times New Roman.

I see indeed that the PDF also has Times New Roman, but it looks different then in the Word file. I guess that’s because it’s Times New Roman PSMT in the PDF. Perhaps something with TrueType?

Anyway, probably not something we can do about it?

@dhmderuiter

Please note that Aspose.Words mimics the behavior of MS Word. If you convert your document to PDF using MS Word, you will get the same output.

Aspose.Words writes the “Times New Roman” font to PDF correctly. Please note that the TimesNewRomanPSMT is a PostScript name of the “Times New Roman” font which should be written to PDF according to specification. Aspose.Words follows the specification.