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

Free Support Forum - aspose.com

Converting Presentation to PDF with Hebrew Reverses Sentences

Hi,


I’m trying to convert PPT/PPTX files with Hebrew text in them to PDF. The resulting PDF file has the sentences have the words reversed:

Text from PowerPoint file
נדרשים IRM חשבון ולקוח

Text from PDF file
	<div class="page" title="Page 1" style="">
		<div class="section" style="">
			<div class="layoutArea" style="">
				<div class="column" style="">
					<div style="color: rgb(51, 51, 51); font-family: Arial, Helvetica; font-size: 13px;"><p style="margin-top: 0pt; margin-bottom: 0pt; direction: ltr; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: 12pt; font-family: Arial; color: black;">חשבון ולקוח</span><span style="font-size: 12pt; font-family: 'Trebuchet MS'; color: black;"> IRM </span><span style="font-size: 12pt; font-family: Arial; color: black;">נדרשים</span></p></div><p style="color: rgb(51, 51, 51); font-family: Arial, Helvetica; font-size: 13px;"><span style="font-family: Arial; font-size: small; line-height: 18px;">This is happening with Aspose.Slides 14.6.</span></p><p style="color: rgb(51, 51, 51); font-family: Arial, Helvetica; font-size: 13px;"><span style="font-family: Arial; font-size: small; line-height: 18px;">The code I'm using is:</span></p><p><span style="color: rgb(51, 51, 51); font-family: Arial; font-size: small; line-height: 18px;">String filename = ""/Users/ianc/Desktop/untitled folder 2/hebrew/HE_PPT_היישומים.ppt";</span><br><span style="color: rgb(51, 51, 51); font-family: Arial; font-size: small; line-height: 18px;">try {</span><br><font color="#333333" face="Arial" size="2"><span style="line-height: 18px;">      Presentation presentationEx = new Presentation(</span></font><span style="color: rgb(51, 51, 51); font-family: Arial; font-size: small; line-height: 18px;">filename</span><font color="#333333" face="Arial" size="2"><span style="line-height: 18px;">);</span></font><font color="#333333" face="Arial" size="2"><span style="line-height: 18px;"><br></span></font><span style="color: rgb(51, 51, 51); font-family: Arial; font-size: small; line-height: 18px;">      String targetFile = file.getAbsolutePath() + ".pdf";</span><br><span style="color: rgb(51, 51, 51); font-family: Arial; font-size: small; line-height: 18px;">      PdfOptions saveOptions = new PdfOptions();</span><br><span style="color: rgb(51, 51, 51); font-family: Arial; font-size: small; line-height: 18px;">      presentationEx.save(targetFile, SaveFormat.Pdf, saveOptions);</span><br><span style="color: rgb(51, 51, 51); font-family: Arial; font-size: small; line-height: 18px;">} catch (Exception x) {</span><br><span style="color: rgb(51, 51, 51); font-family: Arial; font-size: small; line-height: 18px;">      x.printStackTrace();</span><br><span style="color: rgb(51, 51, 51); font-family: Arial; font-size: small; line-height: 18px;">}</span></p><p><font color="#333333" face="Arial" size="2"><span style="line-height: 18px;">I've attached a ZIP file with the original PowerPoint files and resulting PDFs.</span></font></p><p><span style="line-height: 18px; color: rgb(51, 51, 51); font-family: Arial; font-size: small;">Thanks, Ian.</span></p><p><span style="color: rgb(51, 51, 51); font-family: Arial; font-size: small; line-height: 18px;"> </span></p></div></div></div></div></div>

Hi Ian,


I have worked with the presentation file shared by you using Aspose.Slides for Java 14.6.0 on my end. I have not been able to observe the issue specified. I suggest you to please try using the specified version on your end. If there is still an issue then please share the complete issue details with us along with slide and shape reference. I have also attached the generated PDF files for your reference.

Many Thanks,

Hi,



I’ve just retested this with Aspose.Slides 14.7.0 and I’m still seeing issues with PPT files converted to PDF. The PPTX files are converted properly. I’ve attached a screenshot comparing the PPT file open in PowerPoint and the PDF open in Adobe Reader.



Thanks, Ian.

Hi Ian,

Thanks for sharing the additional details. I have observed the comparison snapshot shared by you and unfortunately I am unable to read and identify words in Hebrew language. But still, I have been able to observe the rendering difference as highlighted. What I have observed is that there seems to be font missing issue on machine where you are performing PDF export. Can you please make sure that the fonts that have been used in your presentation are also available or installed on machine where you are performing rendering. I hope availability of fonts will sort the issue. However, if there is still an issue then please share the fonts used in your PPT with us and I will try the same on my end to help you further in this regard.

Many Thanks,

The fonts used in the presentation are on the machine doing the conversion.


PowerPoint shows I’m using 3 fonts:
  • Times New Roman
  • Arial
  • MS Trebuchet
The hebrew characters are using either Times New Roman or Arial. Standard fonts on a Windows computer.

I’ve attached the PowerPoint file for your testing.

Thansk, Ian.

Hi Ian,

I have further investigate the issue on my end and have been able to verify the presence of the said fonts on my end as well but still the rendering has not been in accordance with what is observed in PPT. I have created an issue with ID SLIDESJAVA-34604 in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be resolved.

We are sorry for your inconvenience,

The issues you have found earlier (filed as SLIDESJAVA-34604) have been fixed in this update.