I am new in programming and have got weak background to deal with snippet. My problem is that I have no idea about how to use the snippet included in the ReportLab user guide
https://www.reportlab.com/docs/reportlab-userguide.pdf
I just follow by this protocol All I have done is the code in section 2.1 - 2.6 But in section 2.7, I have no idea how to use function (def...) to create pdf
My question is:
(1) What is the basic background that I should know? (2) Could you please give me some example code that show how to deal with this stuff?
Try this tutorial. The snippet below should create a file "hello.pdf" in the same directory as your python script.
http://www.blog.pythonlibrary.org/2010/03/08/a-simple-step-by-step-reportlab-tutorial/
from reportlab.pdfgen import canvas
c = canvas.Canvas("hello.pdf")
c.drawString(100,750,"Welcome to Reportlab!")
c.save()