Skip to content

How can i get the actual dpi of a picture in pdf #1801

Discussion options

You must be logged in to vote

I hope you are extracting the "pictures" via doc.extract_image(xref). Given this, if you make a Pixmap of the image or, equivalently, a Pillow Image, then you will get access to the DPI value stored in it. This is all that is available. Depending on the packages, a few default assumptions are made if no, or an invalid DPI is stored.

Replies: 2 comments 16 replies

Comment options

You must be logged in to vote
12 replies
@R4Y-R4Y
Comment options

@R4Y-R4Y
Comment options

@JorjMcKie
Comment options

@R4Y-R4Y
Comment options

@JorjMcKie
Comment options

Answer selected by R4Y-R4Y
Comment options

You must be logged in to vote
4 replies
@JorjMcKie
Comment options

@R4Y-R4Y
Comment options

@JorjMcKie
Comment options

@R4Y-R4Y
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants