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

Restore backward compatibility between Overlay and OverlayPDF

    Details

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

      Description

      There is a major difference with the way the overlay pages are handled between the Overlay tool from PDFBox 1.6.x and the latest OverlayPDF in 1.8.6.

      In the original version, when using a multi-page PDF overlay, all pages from the overlay would be combined with the original document. The latest version only uses the first page of the overlay.

      Example with a 6 page document and a 2 page (A, B) overlay:

      Expected behavior:
      A, B, A, B, A, B

      Current behavior:
      A, A, A, A, A, A

      Here's the reference to the documentation of the original behavior taken from http://svn.apache.org/viewvc/pdfbox/tags/1.6.0/pdfbox/src/main/java/org/apache/pdfbox/Overlay.java?view=markup

      /**
      * Overlay on document with another one.<br>
      * e.g. Overlay an invoice with your company layout<br>
      * <br>
      * How it (should) work:<br>
      * If the document has 10 pages, and the layout 2 the following is the result:<br>
      * <pre>
      * Document: 1234567890
      * Layout  : 1212121212
      * </pre>
      * <br>
      *
      * @author Mario Ivankovits (mario@ops.co.at)
      * @author <a href="ben@benlitchfield.com">Ben Litchfield</a>
      *
      * @version $Revision: 1.7 $
      */
      public class Overlay
      {
      ...
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: