-
-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Page rot
metadata and size
param interact incorrectly in convert_from_path()
#272
Comments
Page rot
metadata appresolved incorrectly in convert_from_path()Page rot
metadata and size
param interact incorrectly in convert_from_path()
Could you try to manually run popper on the asset? Something like:
As you pointed out this might be an issue with poppler but I'd like to confirm first. You can also try to use |
|
Ok so the issue is with pdf2image somehow. Can you share the asset? |
Forgot to mention that pdftocairo works fine. |
I just ran into a similar issue also with dpi not being set correctly. Not sure if this helps the debug process, but in my code I decided to the following: and saw this error in PIL/TiffImagePlugin.py: which led me to believe dpi should be a 2 element list. So I then tried: and when I checked the .tif in Preview, the resolution was correct at 300dpi instead of 72. Just to sum up, I converted a 11 x 8.5 pdf to tiff using the following lines and removed Hope this helps. |
Describe the bug
Attempting to convert a pdf with a
size
param, with pdfPage rot
rotation metadata changing its original orientation (90, 270 etc) forces the scanned pages onto i.e a horizontal template, despite it being vertical. Any PDF viewer displays the pdf, correctly, as a vertical one. As a result of this issue, half of the page is cut off, and its remainder is squished.To Reproduce
Steps to reproduce the behavior:
Expected behavior
Rotation metadata and size param get applied correctly.
Screenshots
![An example page from a pdf with rotation](https://camo.githubusercontent.com/b3a06a05e2186efde6ae74a820ffcec1082703adf0b354561ff54b2239545b4e/68747470733a2f2f692e696d6775722e636f6d2f74426965484e362e706e67)
Desktop (please complete the following information):
Notes:
I'm well aware that it's probably an issue with Poppler, not with pdf2image, but there may be some walkaround, or some info may be gathered here for a Poppler issue.
Theoretically the issue will be resolved if the rotation gets applied into the file permanently, instead of being embedded in metadata.
The text was updated successfully, but these errors were encountered: