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 kralik <kr...@ijablonec.cz> on 2006/03/30 17:16:30 UTC
"Source code" or "PRE" printed to PDF by FOP 0.91-beta
Hello!
I have a problem in new FOP 0.91-beta version. I want to make PDF file
from my input XML and XSL (XSLT+FO) file. In my output document I want to
have an example of some source code. In XML i use element <code> for it. In
FOP 0.20.5 I do this:
XML FILE:
<code>
<![CDATA[here is source code, for example XML
<message>
<from>Pavel</from>
<to>Lada</to>
<subject>meeting</subject>
<body>don't forget!</body>
</message>
]]>
</code>
XSL FILE:
<xsl:template match="code">
<fo:block font-family="monospace" text-align="left" font-size="10px"
color="#00008b" white-space-collapse="false" wrap-option="no-wrap">
<xsl:apply-templates select="*|text()"/>
</fo:block>
</xsl:template>
The structure of output document was without problem. All spaces, indents
and new lines were perfect. I could compare it with tag <PRE> in HTML.
But in FOP 0.91-beta I have problems. Neither white-space="pre" nor anything
else is funktionable.
Any idea? Can you help me?
Thanks, Pavel.
--
View this message in context: http://www.nabble.com/%22Source-code%22-or-%22PRE%22-printed-to-PDF-by-FOP-0.91-beta-t1369117.html#a3672102
Sent from the FOP - Users forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: "Source code" or "PRE" printed to PDF by FOP 0.91-beta
Posted by Andreas L Delmelle <a_...@pandora.be>.
On Mar 31, 2006, at 11:29, Jeremias Maerki wrote:
> On 30.03.2006 22:47:18 kralik wrote:
>> Btw. page http://xmlgraphics.apache.org/fop/compliance.html says,
>> that
>> white-space is complete in 0.91beta.
>
> Oops, that's wrong. This has been added after the 0.91beta release.
> It's
> available in FOP Trunk (and therefore in the next release).
Yep. My fault. I completed the shorthand implementation, and updated
the compliance page to reflect this... Should've waited until after
the release.
Sorry, people.
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: "Source code" or "PRE" printed to PDF by FOP 0.91-beta
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 30.03.2006 22:47:18 kralik wrote:
>
> Thank you very much.
> But is there any trick to preserve white spaces on the beggining of each
> line? (it was OK in old FOP)
There's a bug with leading white space which hasn't been fixed, yet.
:-(
> My thesis is full of examples (codes) and I need some automatic method.
> I think, that it could help now, when shothand white-space="pre" is not
> implemented correctly in new FOP.
>
> Btw. page http://xmlgraphics.apache.org/fop/compliance.html says, that
> white-space is complete in 0.91beta.
Oops, that's wrong. This has been added after the 0.91beta release. It's
available in FOP Trunk (and therefore in the next release).
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: "Source code" or "PRE" printed to PDF by FOP 0.91-beta
Posted by kralik <kr...@ijablonec.cz>.
Thank you very much.
But is there any trick to preserve white spaces on the beggining of each
line? (it was OK in old FOP)
My thesis is full of examples (codes) and I need some automatic method.
I think, that it could help now, when shothand white-space="pre" is not
implemented correctly in new FOP.
Btw. page http://xmlgraphics.apache.org/fop/compliance.html says, that
white-space is complete in 0.91beta.
--
View this message in context: http://www.nabble.com/%22Source-code%22-or-%22PRE%22-printed-to-PDF-by-FOP-0.91-beta-t1369117.html#a3678215
Sent from the FOP - Users forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: "Source code" or "PRE" printed to PDF by FOP 0.91-beta
Posted by "J.Pietschmann" <j3...@yahoo.de>.
kralik wrote:
>...
> FOP 0.20.5 I do this:
...
> <fo:block font-family="monospace" text-align="left" font-size="10px"
> color="#00008b" white-space-collapse="false" wrap-option="no-wrap">
...
> The structure of output document was without problem. All spaces, indents
> and new lines were perfect. I could compare it with tag <PRE> in HTML.
>
> But in FOP 0.91-beta I have problems. Neither white-space="pre" nor anything
> else is funktionable.
The implementation of white space handling in FOP 0.20.5 is based
on a rather old draft of the XSL spec and does not conform to
XSLFO 1.0.
The white-space shorthand is apparently not implemented yet in 0.91
(it wasn't implemented in 0.20.5 either).
You should probably use the following property set:
linefeed-treatment="preserve"
white-space-collapse="false"
white-space-treatment="preserve"
wrap-option="no-wrap"
J.Pietschmann
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org