Overview
Used in company projectswkhtmltopdf to convert PDF, due towkhtmltox-0.12.5 version echarts Graphic dotted line style needs to be upgraded to wkhtmltox-0.12.6 version to resolve.
Official website address
wkhtmltopdf :https://wkhtmltopdf.org/
windows installation
Download process and installation process
- Enter the official website:https://wkhtmltopdf.org/
- Click on Downloads in the upper right corner
- Select the windows version to download, I choose the first Installer... 64-bit
- After the download is complete, just click next.
Check the installed version
# 查看安装版本
wkhtmltopdf -V
PDF conversion test
stencil:
wkhtmltopdf 页面路径 转换文件名称
wkhtmltopdf 页面路径 /目录/转换文件名称
Screenshot operation process
Linux installation
premise
If you have installed an old version before, you need to uninstall it first.
# 先查询安装的软件(此处为包含wkhtml)
rpm -qa |grep wkhtml
# 卸载对应软件
rpm -e 软件名称
# 例如
rpm -e wkhtmltox-0.12.6-1.centos8.x86_64
Installation process
- Download method: official website download, download in liunx
# liunx下载 版本:centos7 wkhtmltox-0.12.6-1 版本
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox-0.12.6-1.centos7.x86_64.rpm
# liunx下载 版本:centos8 wkhtmltox-0.12.6-1 版本
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox-0.12.6-1.centos8.x86_64.rpm
- rpm installation: two are provided, depending on your server
# 版本:centos7 wkhtmltox-0.12.6-1 版本
rpm -ivh wkhtmltox-0.12.6-1.centos7.x86_64.rpm
# 版本:centos8 wkhtmltox-0.12.6-1 版本
rpm -ivh wkhtmltox-0.12.6-1.centos8.x86_64.rpm
- View version
wkhtmltopdf -V
The test is the same as Windows, so I won’t go into details.
- Directory location after wkhtmltopdf installation
# wkhtmltopdf 、wkhtmltoimages
cd /usr/local/bin/