当前位置: 动力学知识库 > 问答 > 编程问答 >

python 3.x - Python3 html to pdf

问题描述:

how to convert HTML to PDF in Python3?

Xhtml2pdf does not work in Python3, got error:

import xhtml2pdf.pisa as pisa

Traceback (most recent call last):

File "", line 1, in

File "/home/hound/test/python/test_env/lib/python3.4/site-packages/xhtml2pdf/init.py", line 41, in

from xhtml2pdf.util import REPORTLAB22

File "/home/hound/test/python/test_env/lib/python3.4/site-packages/xhtml2pdf/util.py", line 302

raise Exception, "box not defined right way"

^

SyntaxError: invalid syntax

分享给朋友:
您可能感兴趣的文章:
随机阅读: