python转html页面为pdf:
安装wkhtmltopdf略
apt-get install python-pip
pip install pdfkit
vi aa.py
#!/usr/bin/python
import pdfkit
pdfkit.from_url('http://google.com','baidu.pdf')
:wq
python aa.py
pdfkit.from_string('hello,python','baidu.pdf')
pdfkit.from_file('aa.html','baidu.pdf')