📜  poppler 不在路径中 - 无论代码示例

📅  最后修改于: 2022-03-11 14:59:45.748000             🧑  作者: Mango

代码示例1
#1st of all Download Poppler from here here,Then extract it.
#In the code section just add poppler_path=r'C:\Program Files\poppler-0.68.0\bin'
#(for eg.) like below

from pdf2image import convert_from_path
images = convert_from_path("mypdf.pdf", 500,poppler_path=r'C:\Program Files\poppler-0.68.0\bin')
for i, image in enumerate(images):
    fname = 'image'+str(i)+'.png'
    image.save(fname, "PNG")