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

Free Support Forum - aspose.com

Fonts not applied html to pdf conversion


We are trying to convert HTML content to PDF using aspose.words(15.6.0-jdk16) for java. we are facing issue of applying the fonts. When we preview the html content it shows perfect, and in pdf generated using aspose words, its not applied all the fonts.

Please find the attached html(.txt) file for the input to words which we are sending.

below is the code snippet which we are using for the conversion.
InputStream is =
new ByteArrayInputStream(mergedHtml.getBytes(“UTF-8”));
com.aspose.words.Document doc = new com.aspose.words.Document(is);
com.aspose.words.DocumentBuilder builder = new com.aspose.words.DocumentBuilder(doc);
//lastly save the document
Also attached the output(pdf) generated by this code snippet.
Please let us know the solution for this.

Thank you!

Hi Shivaji,

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