-
Notifications
You must be signed in to change notification settings - Fork 182
Open
Description
Issue to be enhanced
There is many linux server which don't have any interface and could not run directly the command /usr/bin/wkhtmltopdf which required another command behavior to execute this library by /usr/bin/xvfb-run /usr/bin/wkhtmltopdf.
This is the solution to solve this on Linux servers:
Configure in bootstrap.php to change:
Configure::write('CakePdf', [
'engine' => [
'className' => 'CakePdf.WkHtmlToPdf',
//'binary' => '/usr/bin/wkhtmltopdf', // from this (Normal Linux)
'binary' => '/usr/bin/xvfb-run /usr/bin/wkhtmltopdf', // to this (many linux server)
//...
'skipCheckingExecutableBinary' => true, // add one more configuration here (default is false/null)
],
//...
]);And change to this library src/Pdf/Engine/WkHtmlToPdfEngine.php:
// add this code in method "getBinaryPath" below this line "$binary = $this->getConfig('binary', $this->_binary);"
if ($this->getConfig('skipCheckingExecutableBinary')) {
return $binary;
}Metadata
Metadata
Assignees
Labels
No labels