You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by "Al-Dhahir, Haitham" <Ha...@gs.com> on 2002/07/23 20:05:23 UTC
Preserving Linefeed character
Hi,
I have an XML document which contains a linefeed character in one of the
lines. However, when I process this into PDF using FOP, the outputted line
has a space where the linefeed should be.
My XML:
<Data val="Line1
Line2"/>
My XSL:
<fo:block text-align="left" font-weight="normal"
linefeed-treatment="preserve"><xsl:value-of select="Data/@val"/></fo:block>
What I want to appear in the PDF:
Line1
Line2
What is actually appearing:
Line1Line2
The FO documentation indicates that linefeed-treatment="preserve" should
keep the linefeed, but it is not. What am I doing wrong here? Have I got the
right linefeed character (0A)?
Thanks,
Haitham.
Re: Preserving Linefeed character
Posted by "J.Pietschmann" <j3...@yahoo.de>.
Al-Dhahir, Haitham wrote:
...
Please do not crosspost to both FOP lists.
> The FO documentation indicates that linefeed-treatment="preserve" should
> keep the linefeed, but it is not. What am I doing wrong here? Have I got the
> right linefeed character (0A)?
FOP currently does not implement the linefeed-treatment property.
Actually, FOP implements an early draft of the spec in this regard,
whitespace-collapse="false" will preserve linefeeds (in addition
to keep runs of spaces). Check whether this works for you.
J.Pietschmann