xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samuel Penn <...@glendale.org.uk>
Subject Placing external graphics
Date Thu, 25 Aug 2011 21:25:53 GMT

Hi,

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.

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.

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.

-- 
Be seeing you,
Sam.

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