Forrest
  1. Forrest
  2. FOR-413

PDF: rendering fails when graphics too big - workaround inside

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 0.6
    • Fix Version/s: None
    • Component/s: Plugin: output.pdf
    • Labels:
      None

      Description

      When "forresting" a document that has embedded images, the PDF rendering sometimes stops with this error message:

      BROKEN: org.apache.fop.apps.FOPException: No meaningful layout in block after many attempts. Infinite loop is assumed. Processing halted.

      I've found that this is caused by images that are too big to fit in the PDF page (took me some times :) )

      (Moved workaround from Description to Comment - see 2005-12-24)
      1. remove-double-id.patch
        0.7 kB
        Johannes Schaefer
      2. recovered-files.zip
        68 kB
        Johannes Schaefer
      3. FOP-Test.zip
        503 kB
        Johannes Schaefer
      4. ASF.LICENSE.NOT.GRANTED--murks.zip
        67 kB
        Johannes Schaefer
      5. ASF.LICENSE.NOT.GRANTED--murks.fo
        2 kB
        Johannes Schaefer
      6. ASF.LICENSE.NOT.GRANTED--murks.fo
        2 kB
        Johannes Schaefer
      7. added-wide-PNG-to-howto.patch
        0.6 kB
        Johannes Schaefer

        Activity

        Olivier Jacques created issue -
        Johannes Schaefer made changes -
        Field Original Value New Value
        Attachment murks.fo [ 10404 ]
        Johannes Schaefer made changes -
        Attachment murks.fo [ 10405 ]
        Johannes Schaefer made changes -
        Attachment murks.zip [ 10406 ]
        Dave Brondsema made changes -
        Component/s Core operations [ 10010 ]
        Component/s Plugin: pdf-output [ 10042 ]
        David Crossley made changes -
        Other Info [Patch available]
        Description When "forresting" a document that has embedded images, the PDF rendering sometimes stops with this error message:

        BROKEN: org.apache.fop.apps.FOPException: No meaningful layout in block after many attempts. Infinite loop is assumed. Processing halted.

        I've found that this is caused by images that are too big to fit in the PDF page (took me some times :) )
        I temporary "solved" it by modifying the document2fo.xsl. When I specify the "width" or "height" attribute to the img, then the value is taken and divided by 2. WARNING: the value has to be an integer and a "px" (pixels) size.

        We should find a way to reduce the size automatically.

        $ diff -bruN document2fo.xsl~ document2fo.xsl
        --- document2fo.xsl~ 2004-12-09 17:51:42.486185200 +0100
        +++ document2fo.xsl 2004-12-09 22:03:32.465852800 +0100
        @@ -755,10 +755,14 @@
               </xsl:variable>
               <fo:external-graphic src="{$imgpath}">
                 <xsl:if test="@height">
        - <xsl:attribute name="height"><xsl:value-of select="@height"/></xsl:attribute>
        + <xsl:variable name="reducedheight"
        + select="number(@height)" />
        + <xsl:attribute name="height"><xsl:value-of select="concat(number($reducedheight) div 2,'px')"/></xsl:attribute>
                 </xsl:if>
                 <xsl:if test="@width">
        - <xsl:attribute name="width"><xsl:value-of select="@width"/></xsl:attribute>
        + <xsl:variable name="reducedwidth"
        + select="number(@width)" />
        + <xsl:attribute name="width"><xsl:value-of select="concat(number($reducedwidth) div 2,'px')"/></xsl:attribute>
                 </xsl:if>
               </fo:external-graphic>
               <!-- alt text -->
        When "forresting" a document that has embedded images, the PDF rendering sometimes stops with this error message:

        BROKEN: org.apache.fop.apps.FOPException: No meaningful layout in block after many attempts. Infinite loop is assumed. Processing halted.

        I've found that this is caused by images that are too big to fit in the PDF page (took me some times :) )

        (Moved workaround from Description to Comment - see 2005-12-24)
        Ross Gardler made changes -
        Assignee Ross Gardler [ rgardler ]
        Ross Gardler made changes -
        Other Info [Patch available]
        Ross Gardler made changes -
        Assignee Ross Gardler [ rgardler ]
        Johannes Schaefer made changes -
        Assignee Johannes Schaefer [ josch ]
        Johannes Schaefer made changes -
        Attachment recovered-files.zip [ 12369880 ]
        Johannes Schaefer made changes -
        Attachment FOP-Test.zip [ 12371205 ]
        Ferdinand Soethe made changes -
        Assignee Johannes Schaefer [ josch ] Ferdinand Soethe [ f.soethe ]
        Johannes Schaefer made changes -
        Attachment added-wide-PNG-to-howto.patch [ 12371607 ]
        Johannes Schaefer made changes -
        Attachment remove-double-id.patch [ 12373149 ]

          People

          • Assignee:
            Ferdinand Soethe
            Reporter:
            Olivier Jacques
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development