from reportlab.pdfgen import canvas
from reportlab.lib.pagesizes import letter
pdf = canvas.Canvas("example.pdf", pagesize=letter)
total_page_x = 165
total_page_y = 580
pdf.setFont("Helvetica", 19)
pdf.drawString(total_page_x, total_page_y, "1")
total_page_x = 165
total_page_y = 542
pdf.drawString(total_page_x, total_page_y, "2024/02/02")
pdf.save()
使用ReportLab创建简单的PDF文件示例
最新推荐文章于 2024-03-08 17:39:33 发布