Issue Details (XML | Word | Printable)

Key: FOR-413
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Ferdinand Soethe
Reporter: Olivier Jacques
Votes: 1
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Forrest

PDF: rendering fails when graphics too big - workaround inside

Created: 10/Dec/04 12:27 PM   Updated: 19/Nov/09 01:53 AM
Return to search
Component/s: Plugin: output.pdf
Affects Version/s: 0.6
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
Text File added-wide-PNG-to-howto.patch 2007-12-13 05:03 PM Johannes Schaefer 0.6 kB
Zip Archive FOP-Test.zip 2007-12-07 07:25 AM Johannes Schaefer 503 kB
XML File murks.fo 2005-02-22 04:37 PM Johannes Schaefer 2 kB
XML File murks.fo 2005-02-22 04:33 PM Johannes Schaefer 2 kB
Zip Archive murks.zip 2005-02-22 04:38 PM Johannes Schaefer 67 kB
Zip Archive Licensed for inclusion in ASF works recovered-files.zip 2007-11-20 02:23 PM Johannes Schaefer 68 kB
Text File Licensed for inclusion in ASF works remove-double-id.patch 2008-01-15 07:51 AM Johannes Schaefer 0.7 kB


 Description  « Hide
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)


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Johannes Schaefer made changes - 22/Feb/05 04:33 PM
Field Original Value New Value
Attachment murks.fo [ 10404 ]
Johannes Schaefer made changes - 22/Feb/05 04:37 PM
Attachment murks.fo [ 10405 ]
Johannes Schaefer made changes - 22/Feb/05 04:38 PM
Attachment murks.zip [ 10406 ]
Dave Brondsema made changes - 10/Mar/05 02:21 AM
Component/s Plugin: pdf-output [ 10042 ]
Component/s Core operations [ 10010 ]
David Crossley made changes - 24/Dec/05 11:31 AM
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)
Other Info [Patch available]
Ross Gardler made changes - 09/Feb/06 03:53 AM
Assignee Ross Gardler [ rgardler ]
Ross Gardler made changes - 14/Feb/06 08:53 PM
Other Info [Patch available]
Ross Gardler made changes - 30/Mar/06 08:49 PM
Assignee Ross Gardler [ rgardler ]
Johannes Schaefer made changes - 26/Jun/07 08:11 AM
Assignee Johannes Schaefer [ josch ]
Johannes Schaefer made changes - 20/Nov/07 02:23 PM
Attachment recovered-files.zip [ 12369880 ]
Johannes Schaefer made changes - 07/Dec/07 07:25 AM
Attachment FOP-Test.zip [ 12371205 ]
Ferdinand Soethe made changes - 09/Dec/07 02:21 PM
Assignee Johannes Schaefer [ josch ] Ferdinand Soethe [ f.soethe ]
Johannes Schaefer made changes - 13/Dec/07 05:03 PM
Attachment added-wide-PNG-to-howto.patch [ 12371607 ]
Johannes Schaefer made changes - 15/Jan/08 07:51 AM
Attachment remove-double-id.patch [ 12373149 ]