mfenniak / pyPdf

Pure-Python PDF Library; this repository is no longer maintained, please see https://github.com/knowah/PyPDF2/ insead.
https://github.com/knowah/PyPDF2/
Other
276 stars 85 forks source link

merging a cropped page reveals the region cropped away #22

Open sdghosh opened 13 years ago

sdghosh commented 13 years ago

Hi, Thanks for the great function additions in 1.13, especially the "merge page" functions. I'm however having difficulty using them with cropped files.

Suppose I want to rid myself of unwanted text on one side of a page, and so apply a crop: page.mediaBox.upperRight = (page.mediaBox.upperRight[0]/2, page.mediaBox.upperRight[1])

Now, let us merge this page onto a newly created blank page using: newblank = PageObject.createBlankPage(None, 612,792) newblank.mergePage(page)

Unfortunately, in the merged page "newpage", all the cropped region in "page" get displayed again, i.e. the mergePage function does not honor the mediaBox/cropBox of the file being merged. Can this be fixed?

Thanks! Soum

dtornow commented 12 years ago

+1