Python reportlab库之hello world

作者: iCloudEnd | 来源:发表于2019-02-18 22:37 被阅读25次

ReportLab是一套用于创建复杂的数据驱动的PDF文档和自定义矢量图形的强大开源引擎。

ReportLab 简单来说就是一套创建PDF的Python 库。

如何安装呢

国内快速安装方式

pip install -i https://pypi.douban.com/simple reportlab

demo 制作一个hello world pdf

from reportlab.pdfgen import canvas
def hello(c):
    c.drawString(100,100,"Hello World")
c = canvas.Canvas("hello.pdf")
hello(c)
c.showPage()
c.save()

相关文章

网友评论

    本文标题:Python reportlab库之hello world

    本文链接:https://www.haomeiwen.com/subject/jkctyqtx.html