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 ac...@idginteractive.de on 2002/09/04 17:24:11 UTC

Problems with external-graphics in 2-Columns

Hi there,

I have a problem with external-graphics in 2-Column-PDF's generated with 
FOP.
Some images couldn't placed into the PDF. The Error is an eternal loop, 
when
FOP wants to place the image into the column. I think it's a bug in FOP.
Usualy FOP looks, if a image has enough space to insert it on the site. If 
not,
it would be placed to the next site. But some times, I get this eternal 
loop an the process
could only stopped by killing it.

Can somebody help me with my problem?



The Image-Template looks like this:

                <fo:block span="none">
                                        <fo:table space-after.optimum="5pt" space-before.optimum="15pt" table-omit-footer-at-break="true">
                                                <fo:table-column column-width="7.5cm"/>
                                                <fo:table-body>
                                                        <fo:table-row>
                                                                <fo:table-cell>
                                                                        <xsl:element name="fo:external-graphic">
 <xsl:attribute name="src"><xsl:value-of select="$BILD_ID"/>/original.jpg</xsl:attribute>
 <xsl:attribute name="scaling">uniform</xsl:attribute>
                                                                        </xsl:element>
                                                                </fo:table-cell>
                                                        </fo:table-row>
                                                </fo:table-body>
                                        </fo:table>
                                        ..... 

Re: Problems with external-graphics in 2-Columns

Posted by "J.Pietschmann" <j3...@yahoo.de>.
acsaszar@idginteractive.de wrote:
> I have a problem with external-graphics in 2-Column-PDF's generated with 
> FOP.
> Some images couldn't placed into the PDF. The Error is an eternal loop, 
> when
> FOP wants to place the image into the column. I think it's a bug in FOP.
> Usualy FOP looks, if a image has enough space to insert it on the site. If 
> not,
> it would be placed to the next site. But some times, I get this eternal 
> loop an the process
> could only stopped by killing it.
A unterminating loop usually indicates that something
is too large to fit onto a page all by itself.

It might help to scale down the image.

> Can somebody help me with my problem?

There are a lot of factors which influence rendering,
it is hard to deduce this from a XSLT snippet. You'll
have to post a small but complete FO document which
demonstrates the problem. You can try:
1. Run your XML+XSL through Xalan or Saxon to get a
  FO file. Run this through FOP to confirm that the
  problem is still there.
2. Minimize the FO file by deleting as much stuff as
  possible from  it while still showing the problem.
  In particular, delete unnecessary fo:external-graphics.
  Try to delete stuff like font-size and fint-family as
  well.
3. Try to replace the offending image by a black GIF of
  the same height*width (in pixels) and check whether
  the problem persists.
4. Post the remaining FO file and the h*w of the image.

J.Pietschmann