Question: How to merge cropped PDF page with full pdf page in PyPDF? #717
Replies: 7 comments 2 replies
-
Try
|
Beta Was this translation helpful? Give feedback.
-
If I merge pages this way then my overlay ends up being underneath the background. Is there a way to crop a page and save it in a new pdf without any data for the entire page? Right now if I crop a page using |
Beta Was this translation helpful? Give feedback.
-
Hi @lananelson, I'm having a similar problem but can't figure out how to solve it. Did you find a way around it? I'm cropping a page |
Beta Was this translation helpful? Give feedback.
-
@tincho89 I moved on from this a while ago and unfortunately don't exactly remember what the solution was (I don't have access to the repo anymore either). I think in your case you could try creating a blank page with the desired cropped dimensions and then merge your cropped page on top of it. |
Beta Was this translation helpful? Give feedback.
-
@lananelson thanks for the response. I was doing a proof of concept so I'm going to work on it again on some weeks, that approach looks good though. Will try it! Thanks! |
Beta Was this translation helpful? Give feedback.
-
See PR #240 for a fix. |
Beta Was this translation helpful? Give feedback.
-
I have a similar problem - did you ever find a solution to your problem? |
Beta Was this translation helpful? Give feedback.
-
I am trying to merge two pdf pages using PyPDF2:
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
Beta Was this translation helpful? Give feedback.
All reactions