Some of our users are having issues saving reports to PDFs. They can view the HTML version of the report, but when they click the PDF link, they'll get this error.
There was an error (code:11) producing the pdf document
Failed command: /usr/local/bin/wkhtmltopdf -q --header-html https://reports.ourdomain.com/user/export_header_pdf.php --margin-top 13 /tmp/805917985.html -
I know this error would seem to be related to wkhtmltopdf but it does work for some of our users.
I've tried running the command as root (and as a normal user) . The command printed in the error is incomplete and needs the output file as the last argument.
If I add /tmp/foo.pdf to the end as a last argument:
"wkhtmltopdf --header-html https://reports.ourdomain.com/user/export_header_pdf.php --margin-top 13 /tmp/805917985.html /tmp/foo2.pdf"
This is the output I get:
====
Error: Failed loading page https://reports.ourdomain.com/user/export_header_pdf.php?page=1§ion=&title=Report Title Here&subsection=&frompage=1&subsubsection=&topage=1&doctitle=Report Title Here&webpage=/tmp/805917985.html&time=10:38:11&date=15 Apr 2013 (sometimes it will work just to ignore this error with --load-error-handling ignore)
QPaintDevice: Cannot destroy paint device that is being painted
Segmentation fault
===
Here's our facts:
===========
Non-working computers:
Windows machine A: tested 2 different users neither works. Tested with IE 10.0.9200.16521 , Firefox 20.0.1 , Chrome: 26.0.1410.64 m
* one of these users works find on a MAC, but not this windows machine
Windows machine B: tested 1 user works fine. Tested with IE 9 , Firefox 20.0
Mac A: tested 1 user works fine (this user doesn't work on windows machine A). Chrome 26.0.1410.65, Firefox 20.0.0
===
Server Information:
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.8 (Tikanga)
# uname -a
Linux servername.ourdomain.com 2.6.18-348.3.1.el5 #1 SMP Tue Mar 5 13:19:32 EST 2013 x86_64 x86_64 x86_64 GNU/Linux
# /usr/local/bin/wkhtmltopdf --version
Name: wkhtmltopdf 0.11.0 rc1
# md5sum /usr/local/bin/wkhtmltopdf 89ac9d9993c3463f88204d5cee78cfad /usr/local/bin/wkhtmltopdf
# httpd -v
Server version: Apache/2.2.3
Server built: Nov 19 2012 05:10:06
# php -v
PHP 5.4.12 (cli) (built: Feb 20 2013 14:03:27)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
with the ionCube PHP Loader v4.2.2, Copyright (c) 2002-2012, by ionCube Ltd.
# openssl version
OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008