我使用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 f
我试图让django-easy-pdf试一试,但我在安装依赖项时遇到了问题。我在运行Django时得到了ImportError: No module named xhtml2pdf.default。(from xhtml2pdf)。当重复pip install xhtml2pdf时,安装软件时不会出现任何问题。看起来这是在一些文件(util.py和__init__.py)中硬编码的:
if not (reportlab.Version[0] == &q