django-wkhtmltopdf icon indicating copy to clipboard operation
django-wkhtmltopdf copied to clipboard

Exit code 1 Not managed in the way WKHTMLTOPDF intended

Open brownerg opened this issue 8 years ago • 2 comments

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.

brownerg avatar May 04 '16 08:05 brownerg

This request does make sense at first glance. @brownerg do you mind trying to submit a PR for this?

johnraz avatar May 11 '16 07:05 johnraz

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

ghost avatar Jan 27 '17 16:01 ghost