我正在努力如何用Python中的另一个PDF作为模板来创建PDF报告。 我有一个PDF文件(模板.pdf)可以作为每天创建报表的模板。 模板.pdf如下所示:
ABC Corp
SalesName订单数量确认数量发货数量
我需要按程序填写ReportDate和销售数据,并准备PDF格式的报告,如下所示: ABC公司
Daily Sales Report Report Date: 20120117
SalesName订单数量确认数量发货数量
杰森1000 900 50
彼得500 50 450
穆拉利2000 1000 900
可以假设销售人员的数量是固定的(即报表中的行数是固定的)。在
您可以尝试reportlab,因为您的pdf模板相对容易。我不确定您将从何处提取数据,以及您的模板到底是什么样子,但我编写了一个小代码,让您查看或启动。最好能看看reportlab的用户指南。在
您可以查看html到pdf的python解决方案。这也应该是你想要的。在
Reportlab示例:
相关问题 更多 >
编程相关推荐