Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not run command wkhtmltopdf on centos 7 #361

Open
myasir00 opened this issue Sep 24, 2020 · 2 comments
Open

Could not run command wkhtmltopdf on centos 7 #361

myasir00 opened this issue Sep 24, 2020 · 2 comments

Comments

@myasir00
Copy link

myasir00 commented Sep 24, 2020

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.

@mikehaertl
Copy link
Owner

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.

@myasir00
Copy link
Author

myasir00 commented Sep 24, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants