HTML 转PDF----wkhtmltopdf
下载wkhtmltopdf
https://github.com/JazzCore/python-pdfkit/wiki/Installing-wkhtmltopdf
# 环境:CentOS 7.6
yum install wkhtmltopdf
which wkhtmltopdf
进入目录,创建个简单的html文件
cd /opt
vi index.html
# 在 index.html中写入如下内容,保存
<h1>hello world!</h1>
运行,将html转换为pdf
/usr/bin/wkhtmltopdf index.html index