Hi Team,
We are trying to Convert Word document to PDF, which includes various languages like Arabic, Hebrew, Chinese etc. The generated PDF in this Conversion has some different Text alignment which is causing the text to change its meaning.
Attached are the Source and Result file for your reference (refer for Arabic & Hebrew language).
Below is the code used -
Document doc = new Document(filePath);
DocumentBuilder builder = new DocumentBuilder(doc);
PageSetup pageSetup = builder.getPageSetup();
// pageSetup.setTopMargin(ConvertUtil.inchToPoint(0.5));
pageSetup.setBottomMargin(ConvertUtil.inchToPoint(0.5));
pageSetup.setLeftMargin(ConvertUtil.inchToPoint(0.5));
pageSetup.setRightMargin(ConvertUtil.inchToPoint(0.5));
pageSetup.setHeaderDistance(ConvertUtil.inchToPoint(0.2));
pageSetup.setFooterDistance(ConvertUtil.inchToPoint(0.2));
doc.save(DestfilePath+"/Out.pdf");
Also, We are loading all required fonts externally.
Please find the environment details below-
1. JDK version we are using is jdk1.7.0_65
2. Unix version is Solaris 10 9/10 s10s_u9wos_14a SPARC
Can you please explain if anything is missing or what exactly the problem is?
Thanks and Regards,
Ashwini