xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fopaddict <rich...@uttner.de>
Subject FOP 0.95 problem with position=absolute
Date Fri, 13 Nov 2009 11:39:28 GMT

When trying to overprint an image with a line of text, I am using an embedded
block-container derived from an example found that explicitly has been
developed for absolute block positioning. My code is:

			<fo:block font-size="0">
				<fo:external-graphic src="url(images/{@picture})" />
			<fo:block-container position="absolute" top="48mm" left="0mm"
width="84mm" >
				<fo:block width="100%" text-align="center"
					 font-family="Helvetica" font-size="14pt" font-weight="normal">
					<xsl:value-of select="@text" />

This code works fine using FOP 0.94. All images are aligned without any
space and the texts appear always at the same position centered inside of
the image. With 0.95, all images are shifted down by an amount that seems to
be like the font size specified in the inner text block, leading to
overprint of the lower page border.

Searching for tutorials or examples on fo:block-container absolute, I am
finding other statements saying that one should specify "right" instead of
"width". Trying to substitute my "width" attribute just by "right" leads to
a totally spoiled output (the text is centered at offset 0 instead of the
middle of the area and then spreads over several lines). FOP prints a large
list of warnings saying something like "line 2 of a paragraph overflows the
available area by 45108mpts", but also many warnings about line 1 overflows.
Similar things happen if I dare to specify a "bottom" value. At this point I
am absolutely sure that I have not understand at all how absolute
positioning is intended to work in FOP or even XSL-FO. After searching for 2
hours in the web I did not find any coherent information where I could
unambiguously infer how to specify an absolute position for a line of text
simply overprinting an image. Even trying something totally different like
position=relative followed by a negative value for the top position does not
do anything I would expect (e.g. like it works in CSS). Please is anybody so
kind to tell me about places in the web or books or whatever where I can
read something revealing about the secrets of XSL-FO positioning?
Maybe somebody even knows why the code above behaves different in FOP 0.94
and FOP 0.95? Bug or feature?

View this message in context: http://old.nabble.com/FOP-0.95-problem-with-position%3Dabsolute-tp26335300p26335300.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

View raw message