You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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;
}
The text was updated successfully, but these errors were encountered:
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:And change to this library
src/Pdf/Engine/WkHtmlToPdfEngine.php
:The text was updated successfully, but these errors were encountered: