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')