DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=40694>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=40694 Summary: Image gets moved into another area even if there is space Product: Fop Version: 0.20.5 Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P4 Component: page-master/layout AssignedTo: fop-dev@xmlgraphics.apache.org ReportedBy: [EMAIL PROTECTED] Sorry, can't provide test at this moment - need to filter out proprietary information. But, if you look at the code of ExternalGraphics and Area, you may notice the following: // We estimate the space left in the area if (area.spaceLeft() < (height + spaceBefore)) { return Status.AREA_FULL_NONE; } // ... blah // We modify the space left in the area (addDisplaySpace changes Area.currentHeight, and spaceLeft uses currentHeight) if ((spaceBefore != 0) && (this.marker == 0)) { area.addDisplaySpace(spaceBefore); } // ... blah // We modify the space left in the area if (spaceAfter != 0) { area.addDisplaySpace(spaceAfter); } // We use the space left in the area, but AFTER the modifications above if (breakBefore == BreakBefore.PAGE || ((spaceBefore + imageArea.getHeight()) > area.spaceLeft())) { return Status.FORCE_PAGE_BREAK; } The result is - sometimes image doesn't fit. Reading spaceLeft into a variable before modification and using the variable in the remaining places fixed the problem, for me at least. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.