Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-2371

Overlay page off by one when using -useAllPages

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.7, 2.0.0
    • Fix Version/s: 1.8.8
    • Component/s: Utilities
    • Labels:

      Description

      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;

        Attachments

        1. Overlay.java.patch
          0.9 kB
          Laurent Yaish

          Activity

            People

            • Assignee:
              lehmi Andreas Lehmkühler
              Reporter:
              laurenty Laurent Yaish
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: