You can check [here](https://github.com/wkhtmltopdf/wkhtmltopdf/releases/) for getting the latest version. Change the wget url to download newer versions. | Install instructions | |---| |[wkhtmltopdf 0.12.6 - Ubuntu 22.04 x64](#wkhtmltopdf-0126---ubuntu-2204-x64)| |[wkhtmltopdf 0.12.5 - Ubuntu 18.04 x64](#wkhtmltopdf-0125---ubuntu-1804-x64)| |[wkhtmltopdf 0.12.4 - Ubuntu 16.04 x64](#wkhtmltopdf-0124---ubuntu-1604-x64)| |[wkhtmltopdf 0.12.5 - Ubuntu 16.04 x64](#wkhtmltopdf-0125----ubuntu-1604-x64)| |[wkhtmltopdf 0.12.6 - macOS Ventura 13.6](#wkhtmltopdf-0125---macos-ventura-13.6)| |[Install verification](#verify-that-it-is-working)| ## wkhtmltopdf 0.12.6 - Ubuntu 22.04 x64 ```shell $ sudo apt-get update && sudo apt-get -y install wkhtmltopdf ``` ## wkhtmltopdf 0.12.5 - Ubuntu 18.04 x64 Credits to [@J5Dev](https://gist.github.com/srmds/2507aa3bcdb464085413c650fe42e31d#gistcomment-2668984) and [@bcalik](https://gist.github.com/srmds/2507aa3bcdb464085413c650fe42e31d#gistcomment-2858646) ```shell $ sudo apt-get install -y software-properties-common && \ sudo apt-add-repository -y "deb http://security.ubuntu.com/ubuntu bionic-security main" && \ sudo apt-get -yq update && \ sudo apt-get install -y libxrender1 libfontconfig1 libx11-dev libjpeg62 libxtst6 \ fontconfig xfonts-75dpi xfonts-base libpng12-0 && \ wget "https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb" && \ sudo dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb && \ sudo apt-get -f install ``` ## wkhtmltopdf 0.12.4 - Ubuntu 16.04 x64 ### Prerequisites - libxrender1 Credits to [danielghitoiu](https://gist.github.com/srmds/2507aa3bcdb464085413c650fe42e31d#gistcomment-2594195) ``` $ sudo apt-get install libxrender1 ``` ```shell $ wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz $ tar -xvf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz $ cd wkhtmltox/bin/ $ sudo mv wkhtmltopdf /usr/bin/wkhtmltopdf $ sudo mv wkhtmltoimage /usr/bin/wkhtmltoimage $ sudo chmod a+x /usr/bin/wkhtmltopdf $ sudo chmod a+x /usr/bin/wkhtmltoimage ``` ## wkhtmltopdf 0.12.5 - Ubuntu 16.04 x64 Credits to [@vmdao](https://gist.github.com/srmds/2507aa3bcdb464085413c650fe42e31d#gistcomment-2641131) and [@TurkerTunali](https://gist.github.com/srmds/2507aa3bcdb464085413c650fe42e31d#gistcomment-2949332) ```shell $ wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.xenial_amd64.deb $ sudo dpkg -i wkhtmltox_0.12.5-1.xenial_amd64.deb $ sudo apt -f install ``` ## wkhtmltopdf 0.12.6 - macOS Ventura 13.6 ### Prerequisites - [brew](brew.sh) ```shell $ brew update && brew install wkhtmltopdf --cask ``` ---------------------------------------------------------------------------------------------------------------------------- ## Verify that it is working ```shell $ wkhtmltopdf https://google.com google.pdf //Linux $ xdg-open google.pdf //MacOS $ open google.pdf // Clean up $ rm google.pdf ``` #### Output ```shell Loading pages (1/6) Counting pages (2/6) Resolving links (4/6) Loading headers and footers (5/6) Printing pages (6/6) Done ```