python script to get 2 images in one page of pdf code example
Example: pdf2image jupyter
#The pdf2image library can be used
#You can install it simply using,
pip install pdf2image
#Also need to install poppler library using,
pip install poppler
#Once installed you can use following code to get images.
from pdf2image import convert_from_path
pages = convert_from_path('my_pdf_file.pdf', 500)
#Saving pages in png format
for i, page in enumerate(pages):
pname = 'page' + str(i) + '.png'
page.save(pname, 'PNG')