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 Manuel Mall <mm...@arcus.com.au> on 2009/07/28 14:11:42 UTC

RE: How to create a fo:block with the height of a fo:external-gra phic

I thought the workaround is font-size="0pt" not line-height="0pt". But may
be I got that wrong.

Manuel

-----Original Message-----
From: Georg Datterl [mailto:georg.datterl@geneon.de] 
Sent: Tuesday, 28 July 2009 8:00 PM
To: fop-users@xmlgraphics.apache.org
Subject: How to create a fo:block with the height of a fo:external-graphic

Hi, everybody!

Just found something strange. I wanted to define the space between a
textblock and an image block. The obvious solution: Take a fo:block with a
fo:inline, add a padding. Take another fo:block with a fo:external-graphic.
Render. 

Most of you will guess what happens and it's been on the list often enough:
The image block is higher than the image. Image is 1cm, block is spreading
.5mm  above and 1.4mm below. Reason: halfleading. 

Most often mentioned solution: set lineheight=0pt. 

Result: The image ignores padding-after and space-after of the previous
block. The block is 0.7cm high, but the image is painted on 1cm, starting at
the bottom line of the fo:inline:

<fo:block>
	<fo:block line-height="14.0pt" background-color="red"
padding-after="1mm" space-after="1mm">
		<fo:inline>testtext</fo:inline>
	</fo:block>
	<fo:block line-height="0pt" background-color="green">
		<fo:external-graphic content-height="1cm"
src="url('file:C:/temp/anyImage.png')"/>
	</fo:block>
</fo:block>

Am I missing something? 

Regards,
 
Georg Datterl
 
------ Kontakt ------
 
Georg Datterl
 
Geneon media solutions gmbh
Gutenstetter Straße 8a
90449 Nürnberg
 
HRB Nürnberg: 17193
Geschäftsführer: Yong-Harry Steiert 

Tel.: 0911/36 78 88 - 26
Fax: 0911/36 78 88 - 20
 
www.geneon.de
 
Weitere Mitglieder der Willmy MediaGroup:
 
IRS Integrated Realization Services GmbH:    www.irs-nbg.de 
Willmy PrintMedia GmbH:                            www.willmy.de
Willmy Consult & Content GmbH:                 www.willmycc.de 

---------------------------------------------------------------------
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