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

Free Support Forum - aspose.com

Error converting RTF (comprising both english and arabic text) to PDF

Hello,
I am trying to evaluate Aspose.Words for .NET.
I want to convert RTF documents (created using DevExpress’ XtraReports for .NET component) to PDF, but the order of arabic words is reversed by the conversion.
I have attached example files where you can see the problem.
Is there a solution for this ?

Please advise

Thanks

John

Hi John,


Thanks for your inquiry. I have tested the scenario by using latest version of Aspose.Words and have not found any issue with output Pdf/Xps. I suggest you please upgrade to latest version of Aspose.Words for .NET 13.6.0 from here:
http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/entry478555.aspx

I have attached the output Pdf/Xps with this post for your kind reference. Please let us know if you have any more queries.


Hi Tahir,

Thanks for your reply.
I had used the latest (trial) version 13.6.0 of Aspose.Words to do the conversion.
I don’t know if there is something wrong in the contents of the RTF file but what is actually happening is this :
If you open the RTF file with MS Word you see, for example, the text “Client Name / العميل اسم” (which is not correct).
But, if you add an Arabic language in your Keyboard (<span style=“font-size:11.0pt;font-family:
“Calibri”,“sans-serif”;mso-ascii-theme-font:minor-latin;mso-fareast-font-family:
Calibri;mso-fareast-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:“Times New Roman”;mso-bidi-theme-font:minor-bidi;
mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA” lang=“EN-US”>Control Panel > Region And Language > Keyboards and Languages<!–[if gte mso 9]>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EL</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>AR-SA</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
<m:mathPr>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val="–"/>
<m:smallFrac m:val=“off”/>
<m:dispDef/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>
</m:mathPr></w:WordDocument>
<![endif]–><!–[if gte mso 10]>

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-fareast-language:EN-US;}

<![endif]–>) then you will see the text “Client
Name /
اسم العميل
<span style=“font-size:9.0pt;line-height:
115%;font-family:“Verdana”,“sans-serif”;mso-fareast-font-family:“Times New Roman”;
mso-fareast-theme-font:minor-fareast;mso-bidi-font-family:Verdana;color:black;
mso-ansi-language:EL;mso-fareast-language:EL;mso-bidi-language:AR-SA”>” (the order of the 2 arabic words is reversed), which is the correct form of the arabic text.
You can see the same image in the attached XPS file of my first message (which is also created by DevExpress’ XtraReports).
Now, the resulting PDF file converted from RTF by Aspose.Words is always in the wrong form (whether arabic language was added in Keyboard or not).

Thanks again

John


Hi John,


Thanks for sharing the detail. I have managed to reproduce the same issue at my side. I have logged this issue as WORDSNET-8681 in our issue tracking system. 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-8681) have been fixed in this Aspose.Words for .NET 18.11 update and this Aspose.Words for Java 18.11 update.