xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas L. Delmelle" <andreas.delme...@telenet.be>
Subject Re: floating elements issue
Date Thu, 21 Jul 2011 19:31:51 GMT
On 21 Jul 2011, at 14:37, Marcos GarcĂ­a wrote:

Hi Marcos

> <snip />

> Is there something I am missing, or do you think I should change my approach altogether,
and use another mechanism for inserting textboxes or other floating elements using Apache-Fop?

XSL-FO defines fo:float, which FOP unfortunately does not yet support. I am unsure whether
that is what you would need. fo:float can be used for before/start/end floating content. To
have content float on the after-edge (i.e. the bottom of the page), one would have to resort
to fo:footnotes, which would imply that the floating content is then mixed with other footnotes,
if present.

That said, you might be able to pull it off using a regular block-container that takes up
100% of the available height, and then insert the text-boxes in 'absolute' positioned block-containers
within the regular block-container. Absolute will then mean relative to the outer block-container.
Granted, the boxes would then be independent of the surrounding content --i.e. there would
be no intrusions; the surrounding content will just be rendered as if they weren't there--,
so that may not correspond with the expectations about 'floating'...

At any rate, if you can use explicit 'top' coordinates, it would not matter in which order
they appear in the FO. The only constraints are that FOP has no support for z-index, so if
the boxes would overlap, the one that appears last in the stream will always be rendered 'on

The following sample probably may give a better idea of what I mean:

<fo:block-container height="100%" border="0.5pt solid red">
  <fo:block-container absolute-position="absolute" top="100% - 1.2em" left="0" border="0.5pt
solid blue">
    <fo:block>Bottom of the page</fo:block>
  <fo:block-container absolute-position="absolute" top="0" left="0" border="0.5pt solid
    <fo:block>Top of the page</fo:block>

Try putting a fo:block in between those two fo:block-containers, and you'll also see what
I mean by 'no intrusions' higher up. That block would just overlap with the text-box at the

Also, unless it is really needed for some reason (special text-effects, rotations, transformations...),
I would try to cut out SVG and work as much in pure XSL-FO as possible.



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

View raw message