Converting Word files to PDF with Hebrew reverses words in PDF

Hi,


I’m trying to convert DOC/DOCX files with Hebrew text in them to PDF. The resulting PDF file has the some of the hebrew words backwards (i.e. first letter is last, etc). As well as the sentences have the words reversed:

Text from Word file

Text from PDF file
.הז ךמסמ לע ןגמ
	<div class="page" title="Page 1">
		<div class="section" style="background-color: rgb(100.000000%, 100.000000%, 100.000000%)">
			<div class="layoutArea">
				<div class="column">
					<p><font face="Arial" size="2">This is happening with Aspose.Words 14.1.  I tried with the latest Aspose.Words 14.8 but it throws the following exception on save:</font></p><p><span style="font-family: Arial; font-size: small;">java.lang.IndexOutOfBoundsException: Index: 3, Size: 3</span><br><span class="Apple-tab-span" style="font-family: Arial; font-size: small; white-space: pre;">	</span><span style="font-family: Arial; font-size: small;">at java.util.ArrayList.rangeCheck(ArrayList.java:635)</span><br><span class="Apple-tab-span" style="font-family: Arial; font-size: small; white-space: pre;">	</span><span style="font-family: Arial; font-size: small;">at java.util.ArrayList.get(ArrayList.java:411)</span><br><span class="Apple-tab-span" style="font-family: Arial; font-size: small; white-space: pre;">	</span><span style="font-family: Arial; font-size: small;">at com.aspose.words.zzAH.zzF(Unknown Source)</span><br><span class="Apple-tab-span" style="font-family: Arial; font-size: small; white-space: pre;">	</span><span style="font-family: Arial; font-size: small;">at com.aspose.words.zzZ41.zzd(Unknown Source)</span><br><span class="Apple-tab-span" style="font-family: Arial; font-size: small; white-space: pre;">	</span><span style="font-family: Arial; font-size: small;">at com.aspose.words.zzZ41.zzT(Unknown Source)</span><br><span class="Apple-tab-span" style="font-family: Arial; font-size: small; white-space: pre;">	</span><span style="font-family: Arial; font-size: small;">at com.aspose.words.zzZPW.zzZLd(Unknown Source)</span><br><span class="Apple-tab-span" style="font-family: Arial; font-size: small; white-space: pre;">	</span><span style="font-family: Arial; font-size: small;">at com.aspose.words.zzZPW.zzZLi(Unknown Source)</span><br><span class="Apple-tab-span" style="font-family: Arial; font-size: small; white-space: pre;">	</span><span style="font-family: Arial; font-size: small;">at com.aspose.words.zzZPW.zzT(Unknown Source)</span><br><span class="Apple-tab-span" style="font-family: Arial; font-size: small; white-space: pre;">	</span><span style="font-family: Arial; font-size: small;">at com.aspose.words.zzZQ3.zzS(Unknown Source)</span><br><span class="Apple-tab-span" style="font-family: Arial; font-size: small; white-space: pre;">	</span><span style="font-family: Arial; font-size: small;">at com.aspose.words.zzZQ2.zzQ(Unknown Source)</span><br><span class="Apple-tab-span" style="font-family: Arial; font-size: small; white-space: pre;">	</span><span style="font-family: Arial; font-size: small;">at com.aspose.words.zzZQ2.zzX(Unknown Source)</span><br><span class="Apple-tab-span" style="font-family: Arial; font-size: small; white-space: pre;">	</span><span style="font-family: Arial; font-size: small;">at com.aspose.words.zzWO.zzZ(Unknown Source)</span><br><span class="Apple-tab-span" style="font-family: Arial; font-size: small; white-space: pre;">	</span><span style="font-family: Arial; font-size: small;">at com.aspose.words.zzZ5J.zzZkB(Unknown Source)</span><br><span class="Apple-tab-span" style="font-family: Arial; font-size: small; white-space: pre;">	</span><span style="font-family: Arial; font-size: small;">at com.aspose.words.zzZ5J.zzZ(Unknown Source)</span><br><span class="Apple-tab-span" style="font-family: Arial; font-size: small; white-space: pre;">	</span><span style="font-family: Arial; font-size: small;">at com.aspose.words.zzXK.zzvh(Unknown Source)</span><br><span class="Apple-tab-span" style="font-family: Arial; font-size: small; white-space: pre;">	</span><span style="font-family: Arial; font-size: small;">at com.aspose.words.zzXK.zzX(Unknown Source)</span><br><span class="Apple-tab-span" style="font-family: Arial; font-size: small; white-space: pre;">	</span><span style="font-family: Arial; font-size: small;">at com.aspose.words.zzZE9.zzJ(Unknown Source)</span><br><span class="Apple-tab-span" style="font-family: Arial; font-size: small; white-space: pre;">	</span><span style="font-family: Arial; font-size: small;">at com.aspose.words.zzZE9.zzS(Unknown Source)</span><br><span class="Apple-tab-span" style="font-family: Arial; font-size: small; white-space: pre;">	</span><span style="font-family: Arial; font-size: small;">at com.aspose.words.zzZDR.zzy(Unknown Source)</span><br><span class="Apple-tab-span" style="font-family: Arial; font-size: small; white-space: pre;">	</span><span style="font-family: Arial; font-size: small;">at com.aspose.words.zzZ3R.zzSu(Unknown Source)</span><br><span class="Apple-tab-span" style="font-family: Arial; font-size: small; white-space: pre;">	</span><span style="font-family: Arial; font-size: small;">at com.aspose.words.zzDE.zzXV(Unknown Source)</span><br><span class="Apple-tab-span" style="font-family: Arial; font-size: small; white-space: pre;">	</span><span style="font-family: Arial; font-size: small;">at com.aspose.words.zzDF.zz9k(Unknown Source)</span><br><span class="Apple-tab-span" style="font-family: Arial; font-size: small; white-space: pre;">	</span><span style="font-family: Arial; font-size: small;">at com.aspose.words.zzZR4.zzZ(Unknown Source)</span><br><span class="Apple-tab-span" style="font-family: Arial; font-size: small; white-space: pre;">	</span><span style="font-family: Arial; font-size: small;">at com.aspose.words.Document.updatePageLayout(Unknown Source)</span><br><span class="Apple-tab-span" style="font-family: Arial; font-size: small; white-space: pre;">	</span><span style="font-family: Arial; font-size: small;">at com.aspose.words.Document.zzXZ(Unknown Source)</span><br><span class="Apple-tab-span" style="font-family: Arial; font-size: small; white-space: pre;">	</span><span style="font-family: Arial; font-size: small;">at com.aspose.words.Document.zza0(Unknown Source)</span><br><span class="Apple-tab-span" style="font-family: Arial; font-size: small; white-space: pre;">	</span><span style="font-family: Arial; font-size: small;">at com.aspose.words.Document.getPageCount(Unknown Source)</span><br><span class="Apple-tab-span" style="font-family: Arial; font-size: small; white-space: pre;">	</span><span style="font-family: Arial; font-size: small;">at com.aspose.words.zz2O.zzY(Unknown Source)</span><br><span class="Apple-tab-span" style="font-family: Arial; font-size: small; white-space: pre;">	</span><span style="font-family: Arial; font-size: small;">at com.aspose.words.zz2O.zzZ(Unknown Source)</span><br><span class="Apple-tab-span" style="font-family: Arial; font-size: small; white-space: pre;">	</span><span style="font-family: Arial; font-size: small;">at com.aspose.words.Document.zzZ(Unknown Source)</span><br><span class="Apple-tab-span" style="font-family: Arial; font-size: small; white-space: pre;">	</span><span style="font-family: Arial; font-size: small;">at com.aspose.words.Document.save(Unknown Source)</span></p><p><span style="font-family: Arial; font-size: small;">The code I'm using is as follows:</span></p><p><span style="font-family: 'Courier New'; font-size: small;">String filename = </span><br><span style="font-family: 'Courier New'; font-size: small;">    "/Users/ianc/Desktop/untitled folder2/hebrew/HE_doc_היישומים.docx";</span><br><span style="font-family: 'Courier New'; font-size: small;">try {</span><br><span style="font-family: 'Courier New'; font-size: small;">  Document document = new Document(</span><span style="font-family: 'Courier New'; font-size: small;">filename</span><span style="font-family: 'Courier New'; font-size: small;">);</span><br><span style="font-family: 'Courier New'; font-size: small;">  PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();</span><br><span style="font-family: 'Courier New'; font-size: small;">  String targetFile = </span><span style="font-family: 'Courier New'; font-size: small;">filename </span><span style="font-family: 'Courier New'; font-size: small;">+ ".pdf";</span><br><span style="font-family: 'Courier New'; font-size: small;">  document.save(targetFile, pdfSaveOptions);</span><br><span style="font-family: 'Courier New'; font-size: small;">} catch (Exception x) {</span><br><span style="font-family: 'Courier New'; font-size: small;">  x.printStackTrace();</span><br><span style="font-family: 'Courier New'; font-size: small;">}</span></p><p><span style="font-size: small;"><font face="Arial">I've attached a ZIP file with the test Word files and resulting PDFs</font></span></p><p><span style="font-size: small;"><font face="Arial">Thanks, Ian.</font></span></p><p></p><div><br></div>
				</div>
			</div>
		</div>
	</div></div>

Hi Ian,

Thanks for your inquiry. I have tested the scenario and have managed to reproduce the exception issue at my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-10773. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-10773) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Hi,



I’ve tried the latest version of Aspose Words (14.10) and I’m still see a couple of errors in the converted PDF. I’ve attached a screenshot comparison of the original DOC/DOCX file open in MS Word and the resulting PDF open in Adobe Reader. The issues happen for both the DOC and DOCX file.

Hi Ian,

Thanks for your inquiry. I
have tested the scenario and have managed to reproduce the exception
issue at my side. For the sake of correction, I have logged this problem
in our issue tracking system as WORDSNET-11022. I have linked this
forum thread to the same issue and you will be notified via this forum
thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-11022) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.