Laurent Yaish created PDFBOX-2371:
-------------------------------------
Summary: Overlay page off by one when using -useAllPages
Key: PDFBOX-2371
URL: https://issues.apache.org/jira/browse/PDFBOX-2371
Project: PDFBox
Issue Type: Bug
Components: Utilities
Affects Versions: 1.8.7
Reporter: Laurent Yaish
Attachments: Overlay.java.patch
When using the new -useAllPages option added in 1.8.7, the usePageNum doesn't
account for the fact that the specificOverlayPage is indexed by zero and the
output ends up with overlay pages shifted
e.g. The output page 1 has page 2 from the overlay.
We need to subtract 1 from the pageNumber when getting the overlay page number.
int usePageNum = (pageNumber - 1) % numberOfOverlayPages;
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)