How can i get the actual dpi of a picture in pdf #1801
-
Hello |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 16 replies
-
I hope you are extracting the "pictures" via |
Beta Was this translation helpful? Give feedback.
-
neither do I, without any way to reproduce the situation. |
Beta Was this translation helpful? Give feedback.
I hope you are extracting the "pictures" via
doc.extract_image(xref)
. Given this, if you make aPixmap
of the image or, equivalently, a PillowImage
, 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.