History: wkhtmltopdf
Source of version: 54 (current)
Copy to clipboard
{syntax type="markdown" editor="wysiwyg"} {BOX()} Since ((Tiki18)), ((mPDF)) is the recommended PDF generator {BOX} For many years, wkhtmltopdf was the best available option. mPDF is vastly superior. wkhtmltopdf remains an optional available to Tiki, and thus, the information below is kept. {img src="display1494"} # 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. Source: http://wkhtmltopdf.org There are two options ([https://github.com/wkhtmltopdf/wkhtmltopdf/commit/6c82eef4cb42ceb8eb6eedcbd1e46a3c9dd138ff|wkhtmltopdf 0.13 aims to simplify this]) - standard: fewer features, requires X (and if your GNU/Linux OS is virtualized, it perhaps won't work) - patched QT: more features, doesn't require X (headless) ## OpenHub {HTML()}<script type='text/javascript' src='https://www.openhub.net/p/wkhtmltopdf/widgets/project_factoids_stats?format=js'></script>{HTML} ## 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: `/var/local/bin/wkhtmltopdf-amd64` (on a Linux 64-bit system, the path can be different depending on the installation). {CODE(caption="To know what “WebKit path” to provide")}which wkhtmltopdf {CODE} {CODE(caption="which will report something like:")}/usr/local/bin/wkhtmltopdf {CODE} ## Installation for various operating systems - http://wkhtmltopdf.org/downloads.html ## Issues - There might be problems for incorporating images or external content to the pdf file. Please see the wkhtmltopdf documentation. - If you are having issues with password protected pages, trying activating ((Token Access)) {include page="PDF related pages"} {DIV(class=titlebar)}Aliases{DIV} (alias(wkhtml2pdf)) (alias(wkhtmltoimage))