Belval / pdf2image

A python module that wraps the pdftoppm utility to convert PDF to PIL Image object
MIT License
1.51k stars 187 forks source link

How to get an Image object ? #246

Open Laxmi530 opened 1 year ago

Laxmi530 commented 1 year ago

Hai, Thank you for providing such a beautiful library. I have gone through the PyPi site and github README.MD file. I wanted to convert pdf into an image and wanted to store the image into a variable as an object not in memory. When we check the variable type, it should return <class 'PIL.Image.Image'>. Can someone please guide me how to do.

Thanking you in advance.

Belval commented 1 year ago

All the APIs in pdf2image will return a list of PIL Image object. If you follow the example in the README.md you should get exactly what you want.

Hope that helps.