lolalola
lolalola

Reputation: 3823

How can I convert PDF pages to images?

I need save PDF pages as images.

Is this possible with pypdf?

Upvotes: 1

Views: 2439

Answers (2)

Craig Blaszczyk
Craig Blaszczyk

Reputation: 972

ImageMagick also has Python bindings available, so you could output your images without having to use subprocess

Upvotes: 2

Zach Kelling
Zach Kelling

Reputation: 53879

As far as I know there is no good way to do this, not with pyPdf or any other libraries I've seen. PIL supports writing, but not reading PDF so it doesn't help here, either. Such support would be quite nice to have. I'd recommend using ImageMagick as a work around, you can call it with subprocess from your script, and have it handle the conversion.

Upvotes: 2

Related Questions