What steps will reproduce the problem?
1. Prepare 5 well formatted XHTML files. Each file contains only one line and
has a footer with Page X of Y, where X/Y are defined in CSS as:
#pagenumber:before {
content: counter(page);
}
#pagecount:before {
content: counter(pages);
}
2. Generate a PDF using those 5 files with the following code:
Iterator<File> files = tempXHTMLs.iterator();
renderer.setDocument(files.next());
renderer.layout();
renderer.createPDF(os, false);
while (files.hasNext()) {
renderer.setDocument(files.next());
renderer.layout();
renderer.writeNextDocument(renderer.getWriter().getCurrentPageNumber() + 1);
}
3. The PDF was generated but pages counter is NOT correct.
Expected Output: 5 Pages in PDF with footer in correct sequential as: Page 1 of
5, Page 2 of 5, ..., Page 5 of 5
Acctual Output: Wrong total pages counter, which is: Page 1 of 1, Page 2 of 2,
..., Page 5 of 5.
I tried on both R8 and R9.0.1. Same.
Original issue reported on code.google.com by bingh...@gmail.com on 9 Aug 2012 at 8:33
Original issue reported on code.google.com by
bingh...@gmail.com
on 9 Aug 2012 at 8:33