#conda install -c conda-forge poppler
#pip install pdf2image
from pdf2image import convert_from_path
from pdf2image.exceptions import (
PDFInfoNotInstalledError,
PDFPageCountError,
PDFSyntaxError
)
images = convert_from_path('myfile.pdf')
for i, image in enumerate(images):
fname = "image" + str(i) + ".png"
image.save(fname, "PNG")
Last Updated on 2022-09-13 by gantovnik
Recent Comments