3

I am trying to convert HTML to pdf and I am using "wkhtmltopdf"

code is as follows

import pdfkit
path_wkhtmltopdf = r'C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe'
config = pdfkit.configuration(wkhtmltopdf=path_wkhtmltopdf)

urls= ['https://www.amazon.com/','https://www.google.com/']
pdfkit.from_url(urls, 'out.pdf', configuration=config)

It was working fine and suddenly I am getting this error

Exit with code 1 due to network error: HostNotFoundError

What should I do to avoid this error.

anonymous13
  • 581
  • 1
  • 5
  • 17

0 Answers0