Question

1.9.2 & rails 3.0.9 wicked_pdf 0.8.0 wkhtmltopdf 0.10.0 rc2 @ /usr/local/bin/ nginx and pow

It seems to barely work, if at all, and it's extremely slow when it does. What I've done:

after bundle install, went into rails console for simple test:

pdf = WickedPdf.new.pdf_from_string('Hello There!') "******\"/usr/local/bin/wkhtmltopdf\" -q - - ******"

which hangs like that for a very long time, like, 30 minutes or so, but eventually comes back.

Dropped to shell to test wkhhtmltopdf directly with wkhtmltopdf google.com google.pdf and that comes back with:

Loading page (1/2)
Printing pages (2/2)                                               
Done

Pretty quick, although I had to cntl-c out

After some digging, I added wkhtmltopdf-binary to gem file, bundle install... same results

My wicked_pdf.rb initializer:

WickedPdf.config = {
   :exe_path => '/usr/local/bin/wkhtmltopdf',
   :layout => 'pdf.html',
   :orientation => 'Landscape',
   :page_size => 'Letter'
}

Thanks in advance

Was it helpful?

Solution

It looks like your problem may be related to this issue:

https://github.com/mileszs/wicked_pdf/issues/110

Try rolling back wkhtmltopdf to version 0.9.9 and let me know if you still have issues.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top