xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glenn Adams <gl...@skynav.com>
Subject Re: Arabic letters not formed properly after adding Zero Width Space (&#x200B;)
Date Mon, 20 Apr 2015 16:22:02 GMT
I need to see the FO input data, not XSLT.

On Mon, Apr 20, 2015 at 9:37 AM, kthangavel <kumar.thangavel@gmail.com>
wrote:

> Hi All,
> I am trying to generate a PDF report using Apache FOP in Arabic Language .
> The report generation is working fine but I have used the following snippet
> of xslt for wrapping the data within the cell.
>
> <xsl:template name="intersperse-with-zero-spaces">
>                 <xsl:param name="str"/>
>                 <xsl:variable name="spacechars">
>     &#x9;&#xA;
>     &#x2000;&#x2001;&#x2002;&#x2003;&#x2004;&#x2005;
>     &#x2006;&#x2007;&#x2008;&#x2009;&#x200A;&#x200B;
>                 </xsl:variable>
>
>                 <xsl:if test="string-length($str) &gt; 0">
>                         <xsl:variable name="c1" select="substring($str, 1,
> 1)"/>
>                         <xsl:variable name="c2" select="substring($str, 2,
> 1)"/>
>
>                         <xsl:value-of select="$c1"/>
>                         <xsl:if test="$c2 != '' and
>         not(contains($spacechars, $c1) or
>         contains($spacechars, $c2))">
>                                 <xsl:text>&#x200B;</xsl:text>
>                         </xsl:if>
>
>                         <xsl:call-template
> name="intersperse-with-zero-spaces">
>                                 <xsl:with-param name="str"
> select="substring($str, 2)"/>
>                         </xsl:call-template>
>                 </xsl:if>
>         </xsl:template>
>
> After calling this template for all the data , the Arabic characters are
> not
> forming properly and looks mis-formed. For examples , Please check the 5th
> column from right to left and Arabic character is not proper.  I am
> attaching the sample PDF and fo.xml for your reference. Could you please
> help me sort this issue out.
>
> Regards
> Kumar.T
>
> xslfo.xml <http://apache-fop.1065347.n5.nabble.com/file/n41977/xslfo.xml>
>
> TargetSearch_20042015_Bhavana_both.pdf
> <
> http://apache-fop.1065347.n5.nabble.com/file/n41977/TargetSearch_20042015_Bhavana_both.pdf
> >
>
>
>
>
> --
> View this message in context:
> http://apache-fop.1065347.n5.nabble.com/Arabic-letters-not-formed-properly-after-adding-Zero-Width-Space-x200B-tp41977.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>

Mime
View raw message