-
Greetings! I wonder if it's possible to resize pdf along with all the content relevant to it (images, text, svg elements, etc.). |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
You mean you want to increase the dimension of each page? No problem: src = fitz.open("input.pdf")
doc = fitz.open() # new output PDF
for page in src:
w, h = page.rect.br # extract input page widht and height
newpage = doc.new_page(width=2*w, height=2*h)
newpage.show_pdf_page(newpage.rect, src, page.number)
doc.ez_save("output.pdf") The output will show the original pages stretched by a factor of 2. |
Beta Was this translation helpful? Give feedback.
-
Let me transfer this to Discussions. |
Beta Was this translation helpful? Give feedback.
-
Works perfectly, thank you! |
Beta Was this translation helpful? Give feedback.
-
@JorjMcKie this goes back to something I posted the other day, but when you resize this, can you not include the annotations with that? |
Beta Was this translation helpful? Give feedback.
You mean you want to increase the dimension of each page? No problem:
The output will show the original pages stretched by a factor of 2.