Page 1 of 1

Support for right to left and fonts?

PostPosted: Thu Jul 19, 2012 5:09 pm
by vargohoat
Hi,
We're using docxj to convert arabic text docs into PDF. While reviewing the FO, the right to left reading is not being set.

Also, the use of rFonts ascii eastasia hansi cs.
The docx has <w:rFonts w:ascii="Arial" w:eastAsia="Times New Roman" w:hAnsi="Arial" w:cs="GE Dinar One"/>

while this is converted to
<fo:block color="#494949" font-family="Arial" font-size="11.0pt" font-weight="bold" line-height="150%" space-after="0.07in" space-before="0.07in">
<inline xmlns="http://www.w3.org/1999/XSL/Format" color="#494949" font-family="Arial" font-size="11.0pt" font-weight="bold"> </inline>
</fo:block>

in the FO. Any idea how to propagate GE Dinar One into the FO?

Best regards,
VH

Re: Support for right to left and fonts?

PostPosted: Sat Jul 21, 2012 6:34 pm
by jason
There is org.docx4j.wml.TextDirection, and RPR.setRtl.

org.docx4j.wml.TextDirection is the direction of the text flow for this paragraph.

RPR.setRtl specifies whether the contents of this run shall have right-to-left characteristics

Could you please post some WordML which shows which of these properties you are using?

We will convert to suitable FO and paragraph and/or run level.

But is this even going to work at the FO end? Please see http://stackoverflow.com/questions/1921 ... e-fop-0-95

If you could provide guidance as to FO property name and value which will do what you want in FOP, we can take it from there.

The font stuff I'll leave to another reply.