xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raphael Finkel <raph...@cs.uky.edu>
Subject Bug in fop: bidi direction bleeds forward
Date Tue, 06 Aug 2013 14:30:33 GMT
Quick summary: RTL inserts in a bi-directional document modify the
directionality of brackets following those inserts.

I am using Apache fop-1.1 on Ubuntu 12.04.2 to generate PDF output from

File mini.xml:

	<?xml version='1.0' encoding='UTF-8'?>
	<notes><br/>[1] RTL insert קום <br/>[2] (parens
	wrong).<br/>[3] Back to normal because of this RTL insert: בּ .</notes>

File mini.fo:

	<?xml version="1.0" encoding="ISO-8859-1"?>
	<xsl:stylesheet version="1.0"
	<xsl:template match="/">
			<fo:simple-page-master master-name="myPage">
				<fo:region-body />
		<fo:page-sequence master-reference="myPage">
			<fo:flow flow-name="xsl-region-body">
				<fo:block font-family="FreeSans">
					<xsl:apply-templates select="data/notes"/>
	<xsl:template match="br">

File mini-fo.cfg:

	<fop version="1.0">
	<renderer mime="application/pdf">
				<font-triplet name="FreeSans" style="normal" weight="normal"/>

Invocation of fop-1.1:

	/tmp/fop-1.1/fop -c mini-fo.cfg -xml mini.xml -xsl mini.fo mini.pdf

I attach mini.pdf.  You can also see its contents by looking at what
pdftotext outputs:

	[1] RTL insert ‫קום‬
	]2[ )parens wrong(.
	[3] Back to normal because of this RTL insert: ּ‫. ב‬

(There are some Unicode \u202b (RIGHT-TO-LEFT EMBEDDING) and \u202c (POP
DIRECTIONAL FORMATTING) characters in that pdftotext output.)

When I use xmlroff instead of fop, the result is correct:

	[1] RTL insert ‫קום‬
	[2] (parens wrong).
	[3] Back to normal because of this RTL insert: ּ ‫. ב‬


View raw message