Hello,
Attaching Code and HTML generated from the same code which is used for generating PDF
HtmlLoadOptions loadOptions = new HtmlLoadOptions();
loadOptions.setLoadFormat(LoadFormat.HTML);
loadOptions.setEncoding(Charset.forName("UTF-8"));
Document doc = new Document(MyDir + "input.html",loadOptions);
doc.save(MyDir + "awjava 17.6.pdf");
ok.
Hello,
I just installed Arial Unicode MS and the problem is solved.
HI Friend ,
I am using licensed version of aspose.word in our company product which is made of .Net library in windows platform.
I too facing the same issue, can you please provide me the respective link to download these fonts that you have mentioned.
Thanks,
Thanks for your inquiry. You can try Google Noto Fonts which is a collection of fonts that cover most of the ranges specified in the Unicode standard. Hope this helps you.
Best Regards,
Tahir Manzoor
Please Provide a particular download link.
Please note that Aspose.Words requires TrueType fonts when rendering documents to fixed-page formats (JPEG, PNG, PDF or XPS). You need to install fonts that are used in your document on the machine where you’re converting documents to PDF. Please refer to the following article:
How Aspose.Words Uses True Type Fonts
Could you please share your input document here for testing? We will investigate the issue and let you know the fonts that you need to install on your system.
Best Regards,
Tahir Manzoor
Thanks for your Support Tahir. I found the font which worked for me. It’s “wts11.ttf”.
Thanks for your feedback. It is nice to hear from you that your problem has been solved. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.
Best Regards,
Tahir Manzoor
Related to this issue:
val stream: InputStream = new ByteArrayInputStream(htmlDecoded.getBytes(StandardCharsets.UTF_8))
val loadOptions = new LoadOptions()
loadOptions.setEncoding(StandardCharsets.UTF_8)
val doc: Document = new Document(stream, loadOptions)
val docOutStream: ByteArrayOutputStream = new ByteArrayOutputStream()
doc.save(docOutStream, formatType)
Currently we have a html and wanted to convert to pdf, but some characters show as a rectangles.
aspose_word_14_special_characters_pdf.zip (42.0 KB)
Please let me know how to solve the issue.
thanks.
Thanks for your inquiry. Please note that Aspose.Words requires TrueType fonts when rendering documents to fixed-page formats (JPEG, PNG, PDF or XPS). You need to install fonts that are used in your document on the machine where you’re converting documents to PDF. Please refer to the following article:
How Aspose.Words Uses True Type Fonts
We have tested the scenario using latest version of Aspose.Words for Java 18.5 and have not found the shared issue. Please use Aspose.Words for Java 18.5. We have attached the output PDF with this post for your kind reference. 18.5.pdf (66.7 KB)