On 25/08/2011 22:25, Samuel Penn wrote:
Hi,

Hello,

I'm having some issues with the placement of images with external-graphic.
The graphic (a jpeg) is being inserted into a text flow in one column of
a two column page layout (i.e., it's not meant to spread across multiple
text columns). What happens, is that the correct amount of whitespace is
reserved for the image, but the bottom of the image is aligned with the
top of where it should be, so the image overwrites the text paragraph
immediately above it.

This is happening with several of the inserted images (the one that
works is quite small).

I'm using FOP 0.95 on Linux (Ubuntu 11.4). On a previous computer, using
theoretically the same stylesheets and FOP version, the images seemed to be
placed correctly, so I'm not sure what's changed.

Have you tested your XSL-FO on FOP v1.0? There have been a lot of fixes between 1.0 and 0.95, some of them relates to multi-column layout.

The XML looks something like this:

<fo:block font-size="10pt" font-family="Times" line-height="12pt"
                   space-after="10pt">
    Blah blah blah blah blah blah...  Blah blah blah blah blah blah...
    Blah blah blah blah blah blah...  Blah blah blah blah blah blah...
    Blah blah blah blah blah blah...  Blah blah blah blah blah blah...
    Blah blah blah blah blah blah...  Blah blah blah blah blah blah...
    Blah blah blah blah blah blah...  Blah blah blah blah blah blah...
</fo:block>

<fo:block space-after="0pt" space-before="0px" text-align="center">
     <fo:external-graphic src="images/sizes.jpg"
                             display-align="center" content-width="60mm"/>
</fo:block>

<fo:block font-size="10pt" font-family="Times" line-height="12pt"
                   space-after="10pt">
    Blah blah blah blah blah blah...  Blah blah blah blah blah blah...
    Blah blah blah blah blah blah...  Blah blah blah blah blah blah...
    Blah blah blah blah blah blah...  Blah blah blah blah blah blah...
    Blah blah blah blah blah blah...  Blah blah blah blah blah blah...
    Blah blah blah blah blah blah...  Blah blah blah blah blah blah...
</fo:block>

What renders, is the first paragraph, the image overlaid on top of
it, a chunk of whitespace (equal in size to the image), then the
second paragraph.

Difficult to tell what could be the problem from a snippet of the FO. You could try taking out the space-before/after attributes in case that causes some problems within multi-column layouts. If that still fails on FOP 1.0, could you send us a trimmed down XSL-FO File that demonstrates the issue?

There's an image of the output here:

https://picasaweb.google.com/lh/photo/-T-EK3oVgCrkfc4aUie6HQ?feat=directlink

Any ideas on what I'm doing wrong?

Thanks.
Regards,

Chris



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

Reply via email to