Install ReportLab
方法一:
python pip install reporlab
方法二:
https://pypi.python.org/pypi/reportlab 去下载python对应版本的reoplab文件
python3 -m pip install D:/*.whl
Example:
from reportlab.pdfgen import canvas def hello(c): c.setFont("Times-Roman", 20) string = r"Hello World!" c.drawString(50, 800, string) pdf = canvas.Canvas("hello.pdf") hello(pdf) pdf.showPage() pdf.save()
时间: 2024-10-14 00:49:35