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

Free Support Forum - aspose.com

Arabic characters are not linking correctly in aspose.words java

Hi,

We are trying to use aspose words for java to convert html to pdf, with arabic content used in html.
we observed that after conversion, the characters linking is not correct, that is the spaces required before word starts is not proper, few characters are missing.

Please find the attached image for the reference.
code snippet used.

InputStream is = new ByteArrayInputStream(mergedHtml.getBytes(“UTF-8”));
com.aspose.words.Document doc = new com.aspose.words.Document(is);
doc.getFirstSection().getPageSetup().setTopMargin(30);
com.aspose.words.DocumentBuilder builder = new com.aspose.words.DocumentBuilder(doc);
builder.getPageSetup().setBottomMargin(220);
//lastly save the document
builder.getDocument().save(returnFilePath);

Thanks,
Shivaji

Hi Shivaji,

Thanks for your inquiry. Please note that Aspose.Words requires TrueType fonts when
rendering documents to fixed-page formats (JPEG, PNG, PDF or XPS). Make sure
you have all the Fonts installed on your machine you’re using to convert
Html document to Pdf format. I would suggest you please read the
following articles:
http://www.aspose.com/docs/display/wordsjava/How+Aspose.Words+Uses+True+Type+Fonts
http://www.aspose.com/docs/display/wordsjava/How+to++Specify+True+Type+Fonts+Location

If the problem still remains, please attach your input Html document here for testing. I will investigate the issue on my side and provide you more information.