I am trying to convert pdf to image using pdfplumber in python (IDE JUPYTER)
I have tried following code
with pdfplumber.open("path to pdf") as pdf:
first_page = pdf.pages[0]
im = first_page.to_image()
I have downloaded the dependencies ImageMagick and ghostscript and also defined the system path in environment variables
I am getting following error:
DelegateError: FailedToExecuteCommand `"gswin64c.exe" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" -dFirstPage=1 -dLastPage=1 "-sOutputFile=C:/Users/irg/AppData/Local/Temp/magick-xwn2OA2S47mta_1fpsoqvDw2WyROBAJq%d" "-fC:/Users/irg/AppData/Local/Temp/magick-FzpgZxweNEIZ03bmz0yeYtNa8wctH3sw" "-fC:/Users/irg/AppData/Local/Temp/magick-PdLhGJhkX1m7ozduIxlzmXaLKEegAz98"' (The system cannot find the file specified.) @ error/delegate.c/ExternalDelegateCommand/475
Please help me to get rid of this issue.