Reputation: 29
I am trying to make pdf with inline blocs that are next to each other. For a reason i can not understand for the moment it seems to put spaces in between the outputs if there was nothing, for example (i selected the text to better show):
<fo:inline>I</fo:inline><fo:inline>I</fo:inline>
results in :
example 1
the strange thing is that with text between the two those spaces disapear:
<fo:inline>I</fo:inline>I<fo:inline>I</fo:inline>
example 2
At the end i would like to do pdf from an udeterminated number of blox with xslt transformation, to be able to have results like this : strangely formated output and having space in the middle of words would not do it.
EDIT: for more precision i generate these elements by :
<xsl:for-each select="./*"><fo:inline><xsl:value-of select="."/></fo:inline></xsl:for-each>
or
<xsl:for-each select="./*"><fo:inline><xsl:value-of select="."/></fo:inline>I</xsl:for-each>
with nodes containing "I"s. but i got the same results by trying with manual generation. tried: with space between nodes, all together (no space between nodes), and commentaries.
Upvotes: 0
Views: 1745
Reputation: 29
I ended up finding a work around (i am not sure how much it is a good way to do it tough so i prefer to post it as "an answer instead of "the answer" ) if i put the tag:
<fo:block font-size="0px">
</fo:block>
around my inline tags, and then add a real size to my tags, i got the results i wanted. On a side not even the supplementary I characters diaper and can not be selected anymore. I guess the process of XSL-FO needs to be seen more as a "printing" then a text editing.
Upvotes: 0
Reputation: 6061
Try to introduce an empty comment like this:
<fo:inline>I</fo:inline><!--
--><fo:inline>I</fo:inline>
Upvotes: 0