Body: <blockquote>
    <p>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').</p>
  </blockquote>
  
  <p>Someone else had the same problem on <a href="https://forum.civicrm.org/index.php%3Ftopic=34247.0.html" rel="nofollow noreferrer">this forum</a> and was able to solve it by removing <code>proc_open</code> from disabled modules in the php.ini. Mine however makes no mention of <code>proc_open</code>.</p>
  
  <p>I checked that <code>/usr/bin/wkhtmltopdf.sh</code> exists and the Drupal status report shows, working:</p>
  
  <blockquote>
    <p>Printer, email and PDF versions - PDF generation library  wkhtmltopdf
    0.12.4</p>
  </blockquote>
  
  <p>Does anyone have experience with <a href="https://wkhtmltopdf.org/" rel="nofollow noreferrer">wkhtmltopdf</a> with CiviCRM and know how to resolve this error?</p>
  
  <p>I am using Drupal 7 and CiviCRM 5.3.1 with Linux and Apache.</p>
  
  <p>When I run the command manually, I get the following error:</p>
  
  <pre><code>/usr/bin/xvfb-run: 183: /usr/bin/xvfb-run: /usr/bin/wkhtmltopdf: not found
  </code></pre>
  
  <p>Here are the contents of the <code>/usr/bin/wkhtmltopdf.sh</code> Script:</p>
  
  <pre><code>#! /bin/sh
  /usr/bin/xvfb-run -a -s "-screen 0 640x480x16" /usr/bin/wkhtmltopdf $*
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-08-07T08:58:55.847Z
Comments.Text: 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.
Comments.UserDisplayName: Aidan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-08-07T20:55:57.957Z
Comments.Text: 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.
Comments.UserDisplayName: Christia
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-08-09T17:41:42.490Z
Comments.Text: 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?
Comments.UserDisplayName: Aidan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-08-20T20:54:32.603Z
Comments.Text: Correct, when I run the command manually. Is the binary different than the `usr/bin/wkhtmltopdf.sh` file?
Comments.UserDisplayName: Christia
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-10-03T21:52:09.987Z
Comments.Text: This seems weird, do you know why it's doing that?
Comments.UserDisplayName: Christia
Tags: <drupal><pdf><printing>
Title: Error when exporting reports to a PDF
ThreadText: # Error when exporting reports to a PDF
  
  (Asked by: username_0 on 2018-08-06)
  
  > 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](https://forum.civicrm.org/index.php%3Ftopic=34247.0.html) 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](https://wkhtmltopdf.org/) 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 $*
  
  ```
  
  **Tags:** drupal, pdf, printing
  
  > **Comments:**
  > **username_1**: 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.  
  > **username_0**: 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.  
  > **username_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?  
  > **username_0**: Correct, when I run the command manually. Is the binary different than the `usr/bin/wkhtmltopdf.sh` file?  
  > **username_0**: This seems weird, do you know why it's doing that?  
  
  ---
  
  ## 0 answers
  
  