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

Free Support Forum - aspose.com

Text Font Formatting is changed after DOCX to PDF Conversion using .NET

Hi,

When converting a DOCX to PDF, I noticed the font in the header got changed.

Code:

var doc = new Document(@"\test.docx");
doc.LayoutOptions.TextShaperFactory = HarfBuzzTextShaperFactory.Instance;
doc.Save(@"\out.pdf");

In the output PDF file, the font colour and size were changed for the text on the 2nd page header. The issue doesn’t happen when saving the DOCX to PDF manually using Office ‘save as’ feature.

I’ve attached the test files, font files and a screenshot for your reference. Could you please help me check this?

image.png (25.2 KB)
test.zip (160.2 KB)

Thanks,

@ServerSide527

We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-22113. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

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