1

I'm looking for some help on figuring out why I cannot get the wkhtmltopdf to work as expected.

I have it running on my Dev machine which is the same build of ubuntu with the same packages installed. I cannot see any other difference apart from hardware.

I've followed some advice from various sources (Drupal.org and the code.google.com page for wkhtmltopdf) and mostly it's just suggestions to use the different versions.

I've used all versions listed on the downloads page and both 32 and 64 bit versions with the same error on each. Syslog doesn't show any meaningful errors. To check the library I ran 'wkhtmltopdf --version' this should just report the files version. Only the Dev machine provides an answer. The Production server just Seg Faults.

I am using the static file as it's only in use on a single site. I have considered installing the package or even compiling it but that's a product server and I'm not confident doing that at the moment.

At the moment I'm just looking for advice on how to move forward with this issue. I've tried dompdf as the php library but this only generates a white page pdf with no content. I've used dompdf elsewhere but the way I'm generating the templates in this situation doesn't give me the results I need. There are other libraries I may try out but testing in Dev then Production seems to give different results even though I've tried to keep the environments in sync.

Thanks in advance for any help and info you provide.

Information I have so far:

Prod and Dev:

Ubuntu 12.04.1 LTS "precise"

Dev:

Linux 3.2.0-35-generic #55-Ubuntu SMP Wed Dec 5 17:42:16 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Prod:

Linux 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Errors in syslog:

Jan 23 15:19:55 37 kernel: [13326706.768842] wkhtmltopdf-i38[14406]: segfault at 0 ip 00000000013d7142 sp 00000000ffadeaa0 error 4 in wkhtmltopdf-i386[c01000+7d7000]
Jan 23 15:26:53 37 kernel: [13327124.646237] wkhtmltopdf-amd[17411]: segfault at 200 ip 0000000000000200 sp 00007fff175f42c8 error 14 in wkhtmltopdf-amd64[400000+7eb000]
user687861
  • 51
  • 1
  • 5
  • What does the stack trace look like? – johnsyweb Jan 24 '13 at 10:06
  • Not familiar with strace but this is what 'strace ./wkhtmltopdf-amd64' shows: `execve("./wkhtmltopdf-amd64", ["./wkhtmltopdf-amd64"], [/* 21 vars */]) = 0 --- SIGSEGV (Segmentation fault) @ 0 (0) --- +++ killed by SIGSEGV +++ Segmentation fault` – user687861 Jan 24 '13 at 10:13
  • ANSWER: This was an issue with the upload. If I uploaded the original bz2 archives to the live server and extracted them there, everything worked without issue on both 32 and 64 bit versions. To make it clear. If you have a Seg Fault error with wkhtmltopdf or wkhtmltoimage please try re(up,down)load the files needed. Installing from apt-get or compiling from source would have worked as expected. – user687861 Jan 24 '13 at 15:23

0 Answers0