Bug 3475 - Large images cause PDF generation to run out of memory
Summary: Large images cause PDF generation to run out of memory
Status: CLOSED DUPLICATE of bug 2987
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: images (show other bugs)
Version: all
Hardware: PC All
: P3 major
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
: 4262 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-09-06 14:17 UTC by Paul Austin
Modified: 2012-04-01 13:54 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Austin 2001-09-06 14:17:42 UTC
When a large image is used that cannot fit on one page FOP creates a new page 
and tries to fit it on that page, unfortunately what happens is it can't fit on 
that page so it keeps trying until the VM runs out of memory.

This even happens if a max-width and max-height are specified on the external 
graphic.
Comment 1 Paul Austin 2001-09-09 03:27:56 UTC
The problem was that the code to check the height of the page was looking at 
the full page height and not the height of the body which is the available 
area. This caused the height to allways be too big and therefore the scaling 
did not take place. The following change solves this.

org/apache/fop/fo/flow/ExternalGraphic.java
Line 147 old: int pageHeight = area.getPage().getHeight();
Line 147 new: int pageHeight = area.getPage().getBody().getMaxHeight() - 
spaceBefore;

I do not have access to change the source in CVS can someone do this.

Cheers,
Paul
p_d_austin@yahoo.com
Comment 2 Paul Austin 2001-09-10 13:21:43 UTC
Can someone with cvs access pick this up?

Thanks,
Paul
Comment 3 J.Pietschmann 2002-04-22 12:38:17 UTC
*** Bug 4262 has been marked as a duplicate of this bug. ***
Comment 4 J.Pietschmann 2002-06-21 15:17:09 UTC
The patch has been applied but there are still problems with large images.

*** This bug has been marked as a duplicate of 2987 ***
Comment 5 Glenn Adams 2012-04-01 13:54:06 UTC
batch transition to closed remaining pre-FOP1.0 resolved bugs