Where I can find pdfkit or wkhtmltopdf logs?

4.2k views Asked by At

I'm trying to debug issue with error on pdf generation in Ruby on Rails app. I'm using the pdfkit + wkhtmltopdf-binnary gems. Because of some issue I'm receiving the 500 and this info in logs:

RuntimeError (command failed (exitstatus=1): /home/ubuntu/phys-track/shared/bundle/ruby/2.0.0/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'm wondering where I can find any log where I can see any more verbose information about the issue.

1

There are 1 answers

0
ahmadelmorshedy On

You can try set verbose to true in PDFKit configuration.. for example, you may have config/application.rb file to be like this

require 'pdfkit'
PDFKit.configure do |config|
  # other options here
  config.verbose = true #to turn off --quiet mode
end

you can refer to https://github.com/pdfkit/pdfkit/blob/master/spec/pdfkit_spec.rb for configuration examples