Fonts not applied with aspose.words

Hi,

I am trying to set the fonts explicitly using this way.

FontSettings.setFontsFolder("C:\\MyFonts\\", false);

Even though the fonts are available at specified location, aspose.words is not picking up during conversion of HTML to PDF.

In this case, Georgia and Helvetica fonts are not applied , few other fonts are applied during conversion.

Please let us know if any workaround is available to fix this issue.

Thanks,

Hi Hana,

Thanks for your inquiry. Could you please attach your input Word and output Pdf documents here for testing? We will investigate the issue on our side and provide you more information.

We are using HTML to PDF conversion using aspose.words for JAVA.

During conversion, its not picking the fonts available or not applying the fonts.

Please let us know if it takes any default font, by default.

Please share us the contact details we would like to have a call with technical people from Aspose to understand the other issues reported. As we have raised few issues, wanted to check the resolution/workaround and impact of our application.

Thank you!

Hi Hana,

Thanks for your inquiry.

*Taresh.adsic:
We are using HTML to PDF conversion using aspose.words for JAVA.

During conversion, its not picking the fonts available or not applying the fonts.

Please let us know if it takes any default font, by default.*

You need to install fonts on the machine where you’re converting documents to PDF. Please refer to the following articles:

How Aspose.Words Uses True Type Fonts
How to Specify True Type Fonts Location
How to Receive Notification of Missing Fonts and Font Substitution during Rendering

Could you please attach your input Html and output Pdf documents here for testing? We will investigate the issue on our side and provide you more information.

Taresh.adsic:
Please share us the contact details we would like to have a call with technical people from Aspose to understand the other issues reported. As we have raised few issues, wanted to check the resolution/workaround and impact of our application.

We provide support on forums and live chat sessions. To check issue status, please post your queries in Aspose forums. We will update you via forum thread about your issues status.

Hi,

We are using the same approach you have pointed, we installed the fonts in a separate location and pointed in the process of our conversion as below line.
FontSettings.setFontsFolder(“FONTS_DIR”, false);

Still we are facing issues with some of the fonts not applied in the generated PDF file of the input HTML.

Please find the attached input(Georgia_Helvetica_Times_font_Issue.txt html) and output PDF file.

For reference i have attached the preview of the HTML(input) and PDF(output) as an image attachment.

Please let me know if more details required on this.

Thanks!

Hi Hana,

Thanks for your inquiry. We have tested the scenario using latest version of Aspose.Words for Java 15.12.0 with following code example and have not found the shared issue. Please use Aspose.Words for Java 15.12.0. We have attached the output Pdf with this post for your kind reference.

Moreover, the shared output Pdf is generated by Aspose.Pdf. Please create a standalone Java application (source code without compilation errors) that helps us reproduce your problem on our end and attach it here for testing.

Document docAspose = new Document(MyDir + "input.html");
FontSettings.*setFontsFolder*("C:\\MyFonts\\", true);
docAspose.save(MyDir + "Out.pdf");