To install wkhtmltopdf
, start by switching to a suitable directory to download the package, in this case /tmp
:
cd /tmp
Download the appropriate wkhtmltopdf
version and package for Ubuntu 18.04 from the project’s page:
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb
Now install the package using the dpkg
tool:
sudo dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb
Next, copy all relevant executables to your /usr/bin/
directory:
If any error while installing like below -
dpkg: dependency problems prevent configuration of wkhtmltox:
wkhtmltox depends on xfonts-75dpi; however:
Package xfonts-75dpi is not installed.
dpkg: error processing package wkhtmltox (--install):
dependency problems - leaving unconfigured
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Errors were encountered while processing:
wkhtmltox
Install - sudo apt install xfonts-75dpisudo dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.debsudo cp /usr/local/bin/wkhtmlto* /usr/bin/
Once the files are in place, change their permissions to make them executable:
sudo chmod a+x /usr/bin/wk*
No comments yet. Login to start a new discussion Start a new discussion