centos 6.10
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-wkhtmltopdf
安装wkhtmltox 需要安装以下两个系统包
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_64
效果不太好