cd ~
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 ln -s /usr/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf
Instalar pacotes auxiliares
sudo apt-get install libfontconfig1 libxrender1
sudo apt remove libssl-dev
sudo apt autoremove
sudo apt-get update
sudo apt-get install libssl-dev=1.0.2g-1ubuntu4.10
# In case not found 4.10 use 4.15
sudo apt-get install libssl-dev=1.0.2g-1ubuntu4.15
# Return back the PHP version which you are using
sudo apt-get install php7.1-dev
sudo apt-cache policy libssl-dev
# Test this version
wkhtmltopdf --lowquality --dpi '52' --margin-bottom '10mm' --margin-left '0' --margin-right '0' --margin-top '10mm' --orientation 'landscape' --no-outline --viewport-size '1280x1024' http://www.google.com google.pdf
# If is everything ok hold this version
sudo apt-mark hold libssl-dev