[prev in list] [next in list] [prev in thread] [next in thread]
List: fop-user
Subject: RE: Not want Space between inlines
From: "Michonska Sylvie" <smichonska () sopragroup ! com>
Date: 2009-02-12 17:52:49
Message-ID: 4392_1234461169_499461F1_4392_1378695_1_499E59796457414795C9F2C818DFFE257EA71F () WBE11 ! ancy ! fr ! sopra
[Download RAW message or body]
Hello,
This problem (space between inline) come CRLF (linebreak) between the
inline tags in the file .fo
If i suppress the linebreak, i don't have the space between the text.
If i transform by fop (0.94) directly the xml file in pdf file,
i don't have this problem.
I have this problem only, during the debug test, if i transform the xml
file
in fo file, and then the fo file in pdf file.
Sorry for my first message,
if i transform in FOP 0.20.5 the xml file in fo file, then, fo file in
pdf file,
i have the same problem.
My main need is to transform a xml file to pdf file.
If the xml file don't content CRLF (linebreak) between tags,
the pdf file is good.
For the moment, it's OK.
Thank you.
Sylvie.
-----Message d'origine-----
De : Andreas Delmelle [mailto:andreas.delmelle@telenet.be]
Envoye : lundi 9 fevrier 2009 18:41
A : fop-users@xmlgraphics.apache.org
Objet : Re: Not want Space between inlines
On 09 Feb 2009, at 17:41, Michonska Sylvie wrote:
Hi
> I use a style sheet to transform my XML to FO :
> For an paragraph, i build a fo:block with some inlines,
> each inline contents differents attributs (different font, different
> color or/and ..)
A small hint:
If you can, try to use fo:wrapper instead of fo:inline. That's much
less of a drain on resources. This is only possible if you do NOT need
non-inheritable properties (like border or padding, for example) or
special alignment-adjust.
For inheritable properties like font-* and color, fo:wrappers work
just as well, but they are much more light-weight than fo:inlines.
[Note to self: should REALLY add this remark to the performance hints
on the site. Can have a significant impact in larger documents.]
> With FOP 0.94, in my PDF, the inlines are separate by a space
> (between each inline).
> I don't want this space.
> Before, with FOP 0.20.5, the same fo:block and some fo:inline don't
> product these spaces.
As Jeremias already noted: very difficult to judge without looking at
the FO file, but it is very likely that the undesirable white-space is
actually a result of the built-in template rule for text() being
triggered somewhere (so actually comes from the source XML).
Overriding that built-in template rule in your stylesheet, like so:
<xsl:template match="text()">
<xsl:value-of select="normalize-space(.)" />
</xsl:template>
Could mean that you don't even need special FO attributes, as it will
already filter out this unwanted white-space at the XSLT stage, so FOP
doesn't even see it.
HTH!
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic