xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fopaddict <rich...@uttner.de>
Subject Re: How to avoid vertical space between blocks containing images
Date Fri, 13 Nov 2009 10:19:21 GMT

Pascal and Peter,
perfect answer, it works for FOP 0.94 and 0.95 with font-size="0".
Regards,
Richard


Pascal Sancho wrote:
> 
> 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
> 
> HTH,
> 
> Pascal
> 
> 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 this message in context: http://old.nabble.com/How-to-avoid-vertical-space-between-blocks-containing-images-tp26252057p26334354.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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


Mime
View raw message