I have Python 3.6 and want to know how to convert 30+ pdf images into jpgs. I have these pdf images stored in one folder and would like to run a script to run through all the pdfs, convert them to jpgs and split them out into a new folder.
I tried to test this out on one image (see code below):
from pdf2jpg import pdf2jpg
inputpath = r"C:\Users\Admin-dsc\Documents\Image project\pdfinputs\RWG003209_2 Red.pdf"
outputpath = r"C:\Users\Admin-dsc\Documents\Image project\jpgoutputs"
result = pdf2jpg.convert_pdf2jpg(inputpath, outputpath, pages="1")
print(result)
The code runs fine, but when I look in the folder:
C:\Users\Admin-dsc\Documents\Image project\jpgoutputs
I see a folder called RWG003209_2 Red.pdf which is empty. I am confused - shouldn't the jpgs be saved here? Have I misunderstood something?