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.
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 (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
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).
which wkhtmltopdf
/usr/local/bin/wkhtmltopdf
Installation for various operating systems
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
Collection of References on doc.tiki.org
- Print general info about printing
- PDF general overview about PDF creation in Tiki
- mPDF create PDFs from Tiki content (advanced library that works even on shared hosting). Recommended for Tiki18+
- PluginPDF alter default settings of mPDF per wiki page
- PluginPDFPageBreak add a page break for PDFs created with mPDF
- PluginMediaPlayer display PDF file from file gallery
- PDF.js viewer PDF.js from Mozilla
- ViewerJS: a script to view PDFs and ODFs, which bundles WebODF
- PluginArchiveBuilder Generate a zip file, including PDFs from wiki pages
- WeasyPrint A PDF generation option in Python
- wkhtmltopdf create PDFs from Tiki content (needs root installation)
- dompdf once used for PDF print of slideshows