phpwkhtmltopdf icon indicating copy to clipboard operation
phpwkhtmltopdf copied to clipboard

Could not run command wkhtmltopdf on centos 7

Open myasir00 opened this issue 5 years ago • 2 comments
trafficstars

On ubuntu its working fine but on centos 7 its not working. My Settings are

        'no-outline',         // Make Chrome not complain
        'orientation' => 'Landscape',
        //'binary' => '/usr/bin/wkhtmltopdf', AND //'binary' => '/usr/local/bin/wkhtmltopdf',
        //'zoom'=>1.5,
        'title'=>$title,
        'page-size' => 'A4',
        'margin-top' => '5',
        'margin-left' => '10',
        'margin-right' => '10',
        'margin-bottom' => '10',
        'footer-html'=>$footer_html,
        //'dpi'=>500,
        // Default page options
        'disable-smart-shrinking',
        'user-style-sheet' => 'css/table-report.css',
        'commandOptions' => array(
          'useExec' => true or false //no luck
        ),
      ));

Version info: wkhtmltopdf 0.12.6 (with patched qt) Please help me to resolve the issue.

myasir00 avatar Sep 24 '20 05:09 myasir00

Do you get an error message from getError()? The most likely cause is a permission problem. I can not really help you much as this is specific to your OS, but PHP needs permissions to write to the temp directory and to execute commands with proc_open().

Also search for "centos" in the closed issues. Maybe you find some hints what configuration you need to change.

mikehaertl avatar Sep 24 '20 06:09 mikehaertl

I remove the proc_open() from disable_function. now the other error You need to specify at least one input file, and exactly one output file Use - for stdin or stdout

myasir00 avatar Sep 24 '20 09:09 myasir00