0

Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred. The file '/tmp/knp_snappy5b68b75c2e47a.pdf' was not created (command: /usr/bin/wkhtmltopdf.sh --lowquality --margin-bottom '1in' --margin-left '1in' --margin-right '1in' --margin-top '1in' --orientation 'landscape' --page-height '792pt' --page-width '612pt' '/tmp/knp_snappy5b68b75c2e3a2.html' '/tmp/knp_snappy5b68b75c2e47a.pdf').

Someone else had the same problem on this forum and was able to solve it by removing proc_open from disabled modules in the php.ini. Mine however makes no mention of proc_open.

I checked that /usr/bin/wkhtmltopdf.sh exists and the Drupal status report shows, working:

Printer, email and PDF versions - PDF generation library wkhtmltopdf 0.12.4

Does anyone have experience with wkhtmltopdf with CiviCRM and know how to resolve this error?

I am using Drupal 7 and CiviCRM 5.3.1 with Linux and Apache.

When I run the command manually, I get the following error:

/usr/bin/xvfb-run: 183: /usr/bin/xvfb-run: /usr/bin/wkhtmltopdf: not found

Here are the contents of the /usr/bin/wkhtmltopdf.sh Script:

#! /bin/sh
/usr/bin/xvfb-run -a -s "-screen 0 640x480x16" /usr/bin/wkhtmltopdf $*
  • What happens if you run the command in the message manually? You may need to substitute your own html file if the temporary one has gone. – Aidan Aug 7 '18 at 8:58
  • I get /usr/bin/xvfb-run: 183: /usr/bin/xvfb-run: /usr/bin/wkhtmltopdf: not found; even when I substitute for my own test html file in the tmp dir. – Christia Aug 7 '18 at 20:55
  • 1
    Just to check, you are running '/usr/bin/wkhtmltopdf.sh ...' but it is complaining about '/usr/bin/wkhtmltopdf' (no .sh), Where is your wkhtmltopdf binary? – Aidan Aug 9 '18 at 17:41
  • Correct, when I run the command manually. Is the binary different than the usr/bin/wkhtmltopdf.sh file? – Christia Aug 20 '18 at 20:54
  • This seems weird, do you know why it's doing that? – Christia Oct 3 '18 at 21:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.