DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11902>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11902

fopDriver.getResults().getPageCount() returns wrong page count

           Summary: fopDriver.getResults().getPageCount() returns wrong page
                    count
           Product: Fop
           Version: 0.20.4
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: Other
         Component: general
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


If a page sequence ends with a forced page (for example created by a
force-page-count property), the getPageCount() method will return a page count
*not* including the forced page. This makes the page count unusable for most
practical purposes (such as sorting the created documents by nr. of sheets for a
print shop).

I rated the bug as major, because the financial impact can be quite high
if the number of processed documents is in thousands...)

Here's the fix (one-liner):

File: org/apache/fop/fo/pagination/PageSequence.java
Method: forcePage
        if (makePage) {
            try {
                this.isForcing = true;
                this.currentPageNumber++;
// FIX ABE: increase page count for forced pages
                this.pageCount++;     
// END FIX
                firstAvailPageNumber = this.currentPageNumber;
                currentPage = makePage(areaTree, firstAvailPageNumber, false,
                                       true);

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to