pyPdf icon indicating copy to clipboard operation
pyPdf copied to clipboard

merging a cropped page reveals the region cropped away

Open sdghosh opened this issue 14 years ago • 1 comments

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

sdghosh avatar Feb 27 '11 06:02 sdghosh

+1

dtornow avatar Apr 22 '12 19:04 dtornow