lzjun567 / python_scripts

一些python相关的演示代码
Apache License 2.0
716 stars 527 forks source link

创建PDF时出错 #18

Open nsscc opened 7 years ago

nsscc commented 7 years ago

Traceback (most recent call last): File "crawler.py", line 165, in crawler.run() File "crawler.py", line 99, in run pdfkit.from_file(htmls, self.name + ".pdf", options=options) File "/usr/local/lib/python3.5/dist-packages/pdfkit/api.py", line 49, in from_file return r.to_pdf(output_path) File "/usr/local/lib/python3.5/dist-packages/pdfkit/pdfkit.py", line 156, in to_pdf raise IOError('wkhtmltopdf reported an error:\n' + stderr) OSError: wkhtmltopdf reported an error: The switch --outline-depth, is not support using unpatched qt, and will be ignored.Error: This version of wkhtmltopdf is build against an unpatched version of QT, and does not support more then one input document. Exit with code 1, due to unknown error.

nsscc commented 7 years ago

生成的pdf 无 书签

yangtao4389 commented 6 years ago

试试这个解决方法

https://itaken.github.io/python/2017/02/18/pdfkit%E9%94%99%E8%AF%AF%E8%B0%83%E8%AF%95.html