-
Notifications
You must be signed in to change notification settings - Fork 685
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
to_image doesn't accept parameter "width" #798
Comments
Hi @pseudomonas, and thanks for raising this issue. Right now, |
Thanks to @pseudomonas in #798 for flagging. Decided to go for a stricter approach, given the complexity of getting a more flexible approach right. But open to PRs that provide the more flexible approach.
I had previously converted the PDF to images with In the end, I found another way to do it. But it'd be really useful to have some methods to do scaling of objects, where I can convert the pdf measurement units to pixels given one of an page-image height, an page-image width, or a DPI value. |
Thanks, that's helpful context. If I'm understanding correctly, I think your suggestion is this: To be able to call, e.g., |
My original usecase was exactly as you say there, yes. My second request was for a general translator of user-units to pixels so I could say:
|
(actual use-case of that: find the pixel region just to the right of the last character in each line, and see if there's an un-OCR'ed hyphen lurking there) Actually a pair of methods |
As for your second request:
|
Describe the bug
page.to_image(resolution=300)
works fine (for any value of 300)page.to_image(width=1000)
does not work, despite the docs referring to https://docs.wand-py.org/en/latest/wand/image.html#wand.image.Image which says thatwidth
should be an accepted parameterEnvironment
The text was updated successfully, but these errors were encountered: