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.
wkhtmltopdf和wkhtmltoimage是开源(LGPLv3)命令行工具,可使用Qt WebKit渲染引擎将HTML渲染为PDF和各种图像格式。
1、官网下载rpm安装包
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox-0.12.5-1.centos7.x86_64.rpm
2、安装依赖包
#在线安装所需依赖包
yum install -y fontconfig libX11 libXext libXrender libjpeg libpng xorg-x11-fonts-75dpi xorg-x11-fonts-Type1
3、安装rpm包
rpm -ivh wkhtmltox-0.12.5-1.centos7.x86_64.rpm