This guide provides step-by-step instructions to resolve the "Invalid wkhtmltopdf version" error, commonly encountered in Frappe/ERPNext applications. Follow the steps below to install the correct version of wkhtmltopdf and ensure proper functionality.
Download the required version (0.12.6 with patched QT) using the following command:
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.debInstall the downloaded .deb package using the following command:
sudo apt install ./wkhtmltox_0.12.6-1.focal_amd64.debIf you encounter dependency issues during installation, run the following command to fix them:
sudo apt --fix-broken installThen, reinstall the package:
sudo apt install ./wkhtmltox_0.12.6-1.focal_amd64.debCheck the installed version of wkhtmltopdf to ensure it is correct:
wkhtmltopdf --versionThe output should be:
wkhtmltopdf 0.12.6 (with patched qt)Restart all services to apply the changes:
sudo supervisorctl restart allGo to your Print Format in Frappe/ERPNext and try generating a PDF. The "Invalid wkhtmltopdf version" error should no longer appear.