1
我正在通过django视图创建pdf,动态使用用户输入使用ReportLab API。以下是我实施的代码:
from reportlab.pdfgen import canvas
p = canvas.Canvas(name) #create pdf object
p.drawString(100, 100, b) #variable b being the user input
p.showPage()
p.save()
pdf保存在项目文件夹本身中。我如何设置保存pdf的理想路径?如何设置django保存通过reportlab创建的pdf的目录?
谢谢一吨!为我工作,这是解决我的问题的更基本的方法。开心:) – 2015-02-07 14:58:41