Installing wkhtmltopdf
Odoo reports are just HTML pages that are then converted into PDF files. For this conversion, the wkhtmltopdf
command-line tool is used. Its name stands for Webkit HTML to PDF.
For reports to be generated correctly, the recommended version of the wkhtmltopdf
utility needs to be installed. Some versions of the wkhtmltopdf
library are known to have issues, such as not printing page headers and footers, so we need to be picky about the version we use.
Since Odoo 10, version 0.12.5 is the officially recommended one. The most up-to-date Odoo information about wkhtmltopdf
can be found at https://github.com/odoo/odoo/wiki/Wkhtmltopdf.
The packaged version provided by Debian or Ubuntu may not be appropriate. So, the recommendation is to directly download and install the correct package. The download links can be found at https://github.com/wkhtmltopdf/wkhtmltopdf/releases/tag/0.12.5.
To install the correct version of wkhtmltopdf
, follow these steps:
- ...