I am trying to put wkhtmltopdf onto a virtualbox'ed ubuntu 12.04 64bit server. So far no luck. The package from the repositories wants to have xserver running and the static version:
wkhtmltopdf google.com tesss.pdf
Loading pages (1/6)
QSslSocket: cannot resolve SSLv2_client_method ] 10%
QSslSocket: cannot resolve SSLv2_server_method
Counting pages (2/6)
Resolving links (4/6)
Loading headers and footers (5/6)
Printing pages (6/6)
QPixmap: Cannot create a QPixmap when no GUI is being used===] Page 1 of 1
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
Segmentation fault
Any ideas how could I approach this?
I know this is an old issue but for those still running into this, try upgrading to the latest version (0.12.6 at the time of writing). A lot of these issues have been fixed in the last few releases.
After that, try adjusting your ulimit
on your machine as others have mentioned.
Then finally, if you are showing the current and total pages in your header or footer, see this answer for a good tip and solution.
http://code.google.com/p/wkhtmltopdf/issues/detail?id=730
Basically, it got fixed around a year ago, but has still not been released. What a mess :(
Try using 0.10.0_rc2 version instead, which worked perfectly for me
The QPixmap errors are not causing the segmentation fault. In fact, adding the --disable-javascript
option solves the issue. You will still get the warnings but the PDF is generated correctly. HTH.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With