问题描述:

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

相关阅读:
Top