I am trying to convert a multi-page .pdf file to several individual .png files. I am using pdf2Image to do this. I have installed poppler using brew install poppler. I am unsure how to find and explicitly write the path in the shell. This is my code:
from pdf2image import convert_from_path
from pdf2image.exceptions import (
PDFInfoNotInstalledError,
PDFPageCountError,
PDFSyntaxError
)
images = convert_from_path('Bliss.pdf')
for i, image in enumerate(images):
fname = 'Bliss'+str(i)+'.png'
image.save(fname, "PNG")
And this is the error I am getting:
File "/opt/anaconda3/lib/python3.7/site-packages/pdf2image/pdf2image.py", line 468, in pdfinfo_from_path
"Unable to get page count. Is poppler installed and in PATH?"
PDFInfoNotInstalledError: Unable to get page count. Is poppler installed and in PATH?
Any ideas? Thanks in advance.