I have a multi-page pdf and the pages have different rotation values (180 and 270). I want to resize the pages, but the rotation is giving me difficulty.
-
I'm currently using PyPDF2's method, .getPage(n).get('/Rotate'). Is there a method in PyMuPDF that returns the correct rotation? page.rotation returns 0 degrees for all.
-
Do you know from prior experience how to resize the pdf page while dealing with rotation? I've been trying to create a new page using Document.newPage() with a newWidth and newHeight. And then I've been experimenting with Page.setMediaBox() and also just creating a Rect with coordinates before calling Page.showPDFpage(). All of the results crop the image before placing it on the page. (I'm trying to place the entire image on the new/smaller page.) Thanks for your help!
I have a multi-page pdf and the pages have different rotation values (180 and 270). I want to resize the pages, but the rotation is giving me difficulty.
I'm currently using PyPDF2's method, .getPage(n).get('/Rotate'). Is there a method in PyMuPDF that returns the correct rotation? page.rotation returns 0 degrees for all.
Do you know from prior experience how to resize the pdf page while dealing with rotation? I've been trying to create a new page using Document.newPage() with a newWidth and newHeight. And then I've been experimenting with Page.setMediaBox() and also just creating a Rect with coordinates before calling Page.showPDFpage(). All of the results crop the image before placing it on the page. (I'm trying to place the entire image on the new/smaller page.) Thanks for your help!