[xep-support] FW: RTL direction attribute in SVG background image

Darren Munt darrenm at ardex.com.au
Thu Dec 8 14:49:29 PST 2016


May have sent this to the wrong support address….

From: Darren Munt
Sent: Thursday, 8 December 2016 5:31 PM
To: 'support at renderx.com' <support at renderx.com>
Subject: RTL direction attribute in SVG background image

Trying to use an SVG background image to an fo:block. The SVG contains Arabic text, which is RTL. I have set the direction attribute on the SVG element to “RTL” but it does not appear to be honoured. The output text is back to front.

The SVG looks like this:

<svg width="16cm" height="2cm" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" direction="rtl">
  <text fill="#000000" x="8cm" y="1cm" font-size="1.5cm" font-family="Arabic Typesetting" text-anchor="middle"> انسحاب</text>
</svg>

I have it in a separate file at present and I’m importing it as follows:

<fo:block keep-together.within-page="always" space-after="0.0cm" font-size="0.5cm" background-image="url('nonrunnerbanner-ar.svg')" border-bottom-width="0.02cm" border-bottom-color="#a59266" border-bottom-style="solid">
…

</fo:block>

In the English version of this document, I am using an embedded base64 version of the SVG. I want to do the same here but I can’t get it writing right to left.

Is there a way to get this text RTL, or do I need to resort to using an image instead?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.renderx.com/pipermail/xep-support/attachments/20161209/97af60ed/attachment.html>


More information about the Xep-support mailing list