-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
is-questionRather a question than an issue. Should usually be a Discussion insteadRather a question than an issue. Should usually be a Discussion instead
Description
I am trying to merge two pdf pages using PyPDF2:
background_page = background_pdf.getPage(0)
overlay = some_pdf.getPage(0)
# crop overlaying page vertically
overlay.mediaBox.lowerRight = (
overlay.mediaBox.getUpperRight_x(),
overlay.mediaBox.getUpperRight_y() / 2
)
# merge
background_page.mergePage(overlay)
Unfortunately cropping doesn't happen. mediaBox of the overlaying page appears to be ignored and I see entire page in the output.
Does anyone have any idea of how I can achieve this?
I posted this on SO as well http://stackoverflow.com/questions/27512246/how-to-merge-cropped-pdf-page-with-full-pdf-page-in-pypdf
oobug
Metadata
Metadata
Assignees
Labels
is-questionRather a question than an issue. Should usually be a Discussion insteadRather a question than an issue. Should usually be a Discussion instead