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

Overlay process forcing bounding box to 0,0, clipping overlayed page.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Incomplete
    • 2.0.8
    • None
    • None

    Description

      Hello,

      I am using the overlay functionality in PDFBox to stamp existing pdf file pages with some test running up the left margin and across the footer of each page. 

      I am creating an overlay page, based on the size, rotation, media and crop boxes with the text to stamp.  I then call the overlay method with my overlay pages to create the final document.   

      The overlay code creates a PDFormXObject representation of the overlay page to apply to the source page.  Overlay.createOverlayXObject() sets the bounding box of the new PDFormXObject using the source page media box, but it forces the x,y to 0,0. 

      The issue I have is when the original page has a media/crop box that starts in a negative quadrant, the overlay is clipped so some of the text is missing. The work around I am doing is to go through the results pages after the overlay method completes and update the bounding boxes of the PDFormXObject to be the media box as the source page. 

      I think it would be helpful if we could tell the overlay process whether it should manipulate the bounding box or not.

      Attachments

        Activity

          People

            Unassigned Unassigned
            greggc Gregg
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: