1#The pdf2image library can be used
2#You can install it simply using,
3
4pip install pdf2image
5#Once installed you can use following code to get images.
6
7from pdf2image import convert_from_path
8pages = convert_from_path('pdf_file', 500)
9
10#Saving pages in jpeg format
11
12for page in pages:
13 page.save('out.jpg', 'JPEG')
1# import module
2from pdf2image import convert_from_path
3
4
5# Store Pdf with convert_from_path function
6images = convert_from_path('example.pdf')
7
8for i in range(len(images)):
9
10 # Save pages as images in the pdf
11 images[i].save('page'+ str(i) +'.jpg', 'JPEG')
12