I have a website that has a url that ends in jobs/jif/id/1 - jobs/jif/id/1298. I need to print each one of those pages to pdf. There is a catch. The website information is protected by logging into the website. That issue I am ignoring until I figure out how to print to pdf given a url.
I have tried to use curl but that was a dead end for me. I am now using pdfkit to print each page. I am not married to using pdfkit or python. If I can just right a bat file for this that would be fine.
import pdfkit
url = 'https://registration.vtbigevent.org/committee/jobs/jif/id/'
config = pdfkit.configuration(wkhtmltopdf="C:/Program Files/wkhtmltopdf/bin")
for ids in range(1,1298):
new_url = url + str(ids)
pdf = str(ids) + '.pdf'
pdfkit.from_url(new_url, pdf, configuration=config)
It should create 1298 pdfs in a folder.
Actual results is a compilation error with wkhtmltopdf.
PermissionError: [Errno 13] Permission denied: 'C:/Program Files/wkhtmltopdf/bin'
Another issue is that i know this will not save the pdf to the intended folder but that is low priority right now.
I edited my code to add configuration = config in the pdfkit line. Does that do what I think it does? I still get the permission error.