python-pdfkit
python-pdfkit copied to clipboard
Needed to enable local file access
Hi, I'm not sure the best way to advertise this info going forward, but I had an issue my first time running pdfkit.from_file
, getting the below error
OSError: wkhtmltopdf reported an error:
Exit with code 1 due to network error: ProtocolUnknownError
This issue in the wkhtmltopdf repo provides a solution.
It didn't necessarily take too much effort to find the options
arg and provide the --enable-local-file-access
option, but it also added some initial confusing friction to first usage.
If you want to just close, that's fine by me, but figured it'd be helpful to log this somewhere in case someone in the future has a similar issue!
You can specify all wkhtmltopdf options. You can drop ‘–’ in option name. If option without value, use None, False or ‘’ for dict value:
options={'enable-local-file-access': None}
this dosen't work for me :(
You can specify all wkhtmltopdf options. You can drop ‘–’ in option name. If option without value, use None, False or ‘’ for dict value:
options={'enable-local-file-access': None}
i am using symfony and this doesnt work for me