simple layout

master
Michael Murtaugh 5 years ago
parent bf44bfe200
commit 2a0f3d1112

@ -0,0 +1,19 @@
from reportlab.lib.pagesizes import letter, A4
from reportlab.pdfgen import canvas
from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
doc = SimpleDocTemplate("text.pdf", pagesize=A4,
rightMargin=72, leftMargin=72,
topMargin=72, bottomMargin=18)
content = []
styles = getSampleStyleSheet()
for i in range(10):
p = Paragraph('<font size=12>{}</font>'.format(i), styles["Normal"])
content.append(p)
content.append(Spacer(1, 12))
doc.build(content)
Loading…
Cancel
Save