wkhtmltopdf
and wkhtmltoimage
are open source (LGPLv3) command line tools to render HTML into PDF and various image formats using the Qt WebKit
rendering engine.
- Get the latest version of the RPM directly from the homepage.
wget https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox-0.12.5-1.centos7.x86_64.rpm
- Install RPM.
sudo yum install wkhtmltox-0.12.5-1.centos7.x86_64.rpm
- Confirm installation location.
rpm -ql wkhtmltox
- Add the installation path to the PATH.
cat >> ~/.bashrc <<- "EOM" export PATH=$PATH:{pathToBinaries} EOM
- Test w/ a local html file.
cat test.html | wkhtmltopdf - test.pdf
https://downloads.wkhtmltopdf.org doesn't exist
https://wkhtmltopdf.org/downloads.html is the downloads page