【发布时间】:2016-01-05 00:11:33
【问题描述】:
我正在使用 xhtmltopdf.pisa 从 html 模板生成 pdf。代码运行良好。
pdf = pisa.pisaDocument(StringIO.StringIO(html.encode("UTF-8")), dest=result, link_callback=fetch_resources, default_css=open(pdf_css_path, 'r').read())
但有时我注意到,上面的代码不起作用。抛出的错误是No handlers could be found for logger "xhtml2pdf"。只有有时我能找到这个错误,但其他时候工作正常。
感谢任何帮助。
【问题讨论】:
标签: python django pdf logging pisa