1👍
✅
The coordinates for “Address” and “School” are simply outside of the page. The origin of the reportlab coordinate system is bottom-left, with the x coordinate going to the right and the y coordinate going up. Try the following instead:
p.drawString(10, 800, "Name")
p.drawString(10, 790, "Address")
p.drawString(10, 780, "School")
👤sk1p
0👍
So this works. Just gave smaller values to y co-ordinates. Try playing with these values according to your needs.
p = canvas.Canvas(response)
p.drawString(10,750,'Name')
p.drawString(10,650,'Address')
p.drawString(10,550,"School")
p.showPage()
p.save()
- [Answer]-Django NOT NULL constraint failed: pages_newlist.user_id
- [Answer]-Django OneToOneField deleting child doesn't set parents parameter as None?
- [Answer]-How to use models associated with a user in Django when rendering an HTML page
Source:stackexchange.com