centos 6.10html
import pdfkit pdfkit.from_url('http://google.com','out.pdf') pdfkit.from_file('test.html','out.pdf') pdfkit.from_string('Hello!','out.pdf')
系统安装wkhtmltopdf:参考 https://github.com/JazzCore/python-pdfkit/wiki/Installing-wkhtmltopdfpython
安装wkhtmltox 须要安装如下两个系统包git
xorg-x11-fonts-75dpi is needed by wkhtmltox-1:0.12.5-1.centos6.x86_64
xorg-x11-fonts-Type1 is needed by wkhtmltox-1:0.12.5-1.centos6.x86_64github
效果不太好
centos