Wkhtmltopdf is a command line tool used to convert HTML to PDF format. In this article, I will cover how to download the latest .deb package, install prerequisites, and install wkhtmltopdf.
This was written to pair with our Odoo 16- Install on Debian 10/Debian 11 guide. I am not covering usage of wkhtmltopdf within this article. If you’d like more information on wkhtmltopdf, please leave a comment and I’d be happy to provide more information/usage instructions.
1: Install prerequisites:
Install wget (if not already installed):
# sudo apt update
# sudo apt install wget
2: Install wkhtmltopdf on Debian 11
The links below contain the latest releases as of 10/25/2022. Please double check GitHub for the latest available release: https://github.com/wkhtmltopdf/packaging/releases/latest
# wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.bullseye_amd64.deb
# sudo apt install ./wkhtmltox*bullseye_amd64.deb
Check that the version installed is what you were expecting:
# wkhtmltopdf --version
wkhtmltopdf 0.12.6.1 (with patched qt)
3: Success!!!
This was a quick and easy guide. At some point, I’ll script out an auto-installer that will grab the latest current release from GitHub, but today is not that day. Please leave a comment if you think I’ve missed anything.
2 Comments
Just to let you know that this was really useful ๐
Thank you! I’m glad it was useful. If there’s ever anything you would like to see added to the site, feel free to reach out to me on LinkedIn. If I get enough requests, I’ll likely build in a portal for people to request content, but for now, the volume is pretty low and I can manage through there.
Best of luck to you!