Free Support Forum - aspose.com

Font is changing when convert DOC to PDF

Hello. When I load and save a word document which contains underlined text as PDF, the font is looking different from the one that I converted from Word.

Here is a test application that I am using to convert the document.

WordToPdfTest.zip (4.6 MB)

This is from the PDF which is converted by Microsoft Word
image.png (11.3 KB)

and this is from the PDF that Aspose created
image.png (11.2 KB)

Thanks

@Ozn,

Please ZIP and upload the following font file here for further testing:

  • Bahnschrift Light

Also, please check the following article:
True Type Fonts

bahnschrift.zip (35.3 KB)

@Ozn,

I am afraid, you have attached the incorrect font file. The name of the font file you attached is actually “Bahnschrift”, but we need the “Bahnschrift Light” font to reproduce the issue on our end.

You can verify the font name by doing the following steps:

Right click on any Font file, Click Properties, Go to Details tab, there you will find actual Font Name besides “Title”.

image.png (27.1 KB)

@awais.hafeez

I did the same but when I copy the font file its name is changing to “Banschrift”.

Thanks

@Ozn,

I am afraid, this is not the correct Font file. You can also check the following article to verify that Aspose.Words is unable to find the correct Font.

How to Receive Notification of Missing Fonts and Font Substitution during Rendering

@awais.hafeez
I update the font to Calibri Light only. I guess you have this font because I am using Windows10’s default fonts only. FileToConvert.zip (9.0 KB)

here is the two result converted from Microsoft Word and Aspose.
ConvertedFromWord.pdf (280.7 KB)
ConvertedFromAspose.pdf (51.8 KB)

please see the underlined text difference from the picture.
image.png (52.8 KB)
the underline width is not same.

Regards.

@Ozn,

Thanks for your inquiry. We tested the scenario and have managed to reproduce the same problem on our end. For the sake of correction, we have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-17131. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-17131) have been fixed in this Aspose.Words for .NET 18.10 update and this Aspose.Words for Java 18.10 update.