c.setFont("Times-Roman", 12)
c.drawRightString(148,750,"PARTICULARS")
c.drawRightString(148,475,"PARTICULARS")
c.drawRightString(148,200,"PARTICULARS")
Is there a way to shorten this code to achieve the same result? (Python Reportlab pdf canvas)
You can use a loop.
c.setFont("Times-Roman", 12);
for y in range(750, 199, -275):
c.drawRightString(148, y, "PARTICULARS")