我似乎找不到这个模块的工作教程或如何操作文档。有人在某处存在吗?在
此处的“待完成”部分: https://github.com/chrisglass/xhtml2pdf/blob/master/doc/usage.rst
是有缺陷的,似乎不包含工作代码。更正后,此代码序列:
from xhtml2pdf import pisa as pisa
filename = u'test.pdf'
pdf = pisa.CreatePDF("Hello <strong>World</strong>",file(filename, "wb"))
pisa.startViewer(filename)
产生一个空的测试.pdf文件(不完全是空的,它是一个没有内容的pdf文件)
因为它主要基于ReportLab,所以您可能find their tutorials有用。在
(两个包我都不用)。在
相关问题 更多 >
编程相关推荐