Why are page and image dimensions different after conversion? #2215
Unanswered
jscodecode
asked this question in
Q&A
Replies: 2 comments 1 reply
-
This is a typical "Discussions" post not an issue, therefore I will first transfer it. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
`
doc = fitz.open()
#1. open image as fitz.Document and convert it to a PDF in memory
imgpdf = fitz.open('1.png').convert_to_pdf()
#2. append memory PDF as a page
doc.insert_pdf(fitz.open("pdf", imgpdf))
doc.save('1.pdf')
`
image size is changed from w:{595 },h:{842}(1.png size) to w:{447},h:{632}(1.pdf size)
How can I solve this problems?
Beta Was this translation helpful? Give feedback.
All reactions