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