wkhtmltopdf | |
wkhtmltopdf is an open source (LGPLv3) command line tool (Simple shell utility) to render(convert) HTML into PDF using the QT Webkit rendering engine. It runs entirely "headless" and do not require a display or display service. There is also a C library.
There are two options (wkhtmltopdf 0.13 aims to simplify this)
|
OpenHub | |
|
Configure | |
To configure with Tiki, go to General » General Settings admin panel (tiki-admin.php?page=general&cookietab=2) and set "PDF from URL" to "WebKit (wkhtmltopdf)". Then in the "WebKit path" insert for example this full path to the executable file: To know what “WebKit path” to provide which wkhtmltopdf
which will report something like: /usr/local/bin/wkhtmltopdf
|
Installation for various operating systems | |
If using wkhtmltopdf v 0.13. with no X11 window system (...) /** * @param $url * @return mixed */ private function webkit( $url ) { (...) // Run shell_exec command to generate out file // NOTE: this requires write permissions $quotedFilename = '"'.$filename.'"'; $quotedCommand = '"'.$this->location.'"'; `xvfb-run $quotedCommand -q $arg $quotedFilename`; |
Issues | |
Aliases
|