python
import pdfkit pdfkit.from_url('url', 'name.pdf') pdfkit.from_file('name.html', 'name.pdf') pdfkit.from_string('hslhweklw', 'name.pdf')
也可以
with open('name.html') as f: pdfkit.from_file(f, 'name.pdf')