pdfkit: upgrading to wkhtmltopdf 0.12.0 results in exitstatus 1 on middleware
I was having trouble getting all my Javascript loaded in time so upgraded to wkhtmltopdf 0.12.0
Generation through the use of kit = PDFKit.new(url); kit.to_file(location)
works as expected. However the middleware comes up with
RuntimeError (command failed (exitstatus=1): /usr/bin/wkhtmltopdf --quiet --page-size Letter --margin-top 0.75in --margin-right 0.75in --margin-bottom 0.75in --margin-left 0.75in --encoding UTF-8 - -):
I’ll try and set up a dummy Rails app to replicate this behaviour.
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 19 (6 by maintainers)
Encountered similar issue
According to @hachiwang https://github.com/pdfkit/pdfkit/issues/234#issuecomment-47814169
Removing the images worked since they were returning 404. But is there a way to silently ignore such images/resources(js, css) which are not reachable or broken ?
@JamesCropcho
+1
s are not helpful. Do you have anything else to add to the conversation? For example, can anyone give me the version of rails they’re using? How about the operating system?That aside, wkhtmltopdf specifically is tested on one version of wkhtmltopdf. I’m unsurprised there are issues with newer versions. I would guess an option has changed. If you’re using a newer version of PDFKit you can enable better error reporting like so:
This might tell you which of the options we’re using have changed/are invalid.