简体   繁体   中英

Convert PDF to image using python (pdf2image module)

I am using Python with pdf2image module to convert a PDF to image.

My Code :

import numpy as np
from pdf2image import convert_from_path
pages = convert_from_path('file.pdf')
print(pages)

I don't know why i am getting this errors

在此处输入图片说明

在此处输入图片说明

the error is due to the path ! you should put the absolute path starting from C:\\ (windows)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM