django-wkhtmltopdf
django-wkhtmltopdf copied to clipboard
Exit code 1 Not managed in the way WKHTMLTOPDF intended
Please see connected issue: https://github.com/incuna/django-wkhtmltopdf/issues/67 which stumbles across this issue.
I have an html document that contains an image url that 404's. WKHTMLTOPDF will return exit code 1 however looking at the issue below exit codes 0, 1 and Z still renders the pdf.
https://github.com/KnpLabs/snappy/issues/177#issuecomment-141008420
Despite I feel that django-wkhtmltopdf is doing the right thing, it does not reflect what wkhtmltopdf is documented todo.
I want to display the PDF even if one of the error codes is returned from wkhtmltopdf, but django-wkhtmltopdf trumps the output with an error. For this reason, I expect django-wkhtmltopdf to replicate the documented behaviour of wkhtmltopdf.
This request does make sense at first glance. @brownerg do you mind trying to submit a PR for this?
I'm not sure the exit codes mentioned in that link are correct. Here's my solution to this problem: https://github.com/incuna/django-wkhtmltopdf/pull/128