xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pascal Sancho <pascal.san...@takoma.fr>
Subject Re: How to avoid vertical space between blocks containing images
Date Mon, 09 Nov 2009 09:18:05 GMT
Hi list,

This is due to how FOP (and other FO engines) handles half-leading (Cf 
REC 1.1 §4.5: line-area [1] and $6.5.2 - fo:block [2])
To avoid blank space between 2 contigous blocks containing only 
graphical materials, you should ensure that both line-height and 
font-size traits are set to zero.

As line-height initial value is [1.2] (witch means 1.2 * font-size), 
setting font-size property to 0pt is sufficient.

[1] http://www.w3.org/TR/2006/REC-xsl11-20061205/#area-line
[2] http://www.w3.org/TR/2006/REC-xsl11-20061205/#fo_block



Peter Coppens a écrit :
> Perhaps you find inspiration in
> http://www.antennahouse.com/support/qa/QA/2005052701.html
> "Because fo:external-graphic is an inline element, it makes line area. The
> default height of line area is 1.2em, so you should specify line-height="1"
> for the block.
> However, even though line-height="1" is specified, a graphic is placed on
> top of a baseline and there remains a space under the baseline as a result.
> In order to avoid this, you should specify font-size="0pt", too."
> Hth
> Peter
>> From: fopaddict <richard@uttner.de>
>> My .fo code contains nothing but a sequence of images exactly fitting into
>> page height (because page margins are defined accordingly):
>> <fo:block space-before="0mm" space-after="0mm">
>> <fo:external-graphic src="url(images/{@picture})" />
>> </fo:block>
>> When printing to the page, FOP 0.94 and 0.95 are inserting 2mm vertical
>> space between each block. Only when I set space-after to -2mm, the output is
>> as I would expect it normally (exactly no gap between images). Is there
>> another way to keep FOP from adding space in general? If not: How do I know
>> how much I have to subtract in order to get zero space?

To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org

View raw message