-
Notifications
You must be signed in to change notification settings - Fork 0
/
report.py
52 lines (39 loc) · 1.38 KB
/
report.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
from app import result, display
print(result)
# def drawMyRuler(pdf):
# pdf.drawString(100,810, 'x100')
# pdf.drawString(200,810, 'x200')
# pdf.drawString(300,810, 'x300')
# pdf.drawString(400,810, 'x400')
# pdf.drawString(500,810, 'x500')
# pdf.drawString(600,810, 'x600')
# pdf.drawString(10,100, 'y100')
# pdf.drawString(10,200, 'y200')
# pdf.drawString(10,300, 'y300')
# pdf.drawString(10,400, 'y400')
# pdf.drawString(10,500, 'y500')
# pdf.drawString(10,600, 'y600')
# pdf.drawString(10,700, 'y700')
# pdf.drawString(10,800, 'y800')
from reportlab.pdfgen import canvas
fileName = 'WaitingReport.pdf'
documentTitle = 'Waiting Time Report'
title = 'TaramaOS'
subtitle = 'We are sorry to keep you waiting :('
textlines=['Group 0 = ','Group 1 = ','Group 2 = ','Group 3 = ','Group 4 = ']
pdf = canvas.Canvas(fileName)
pdf.setTitle(documentTitle)
pdf.drawString(270,770,title)
pdf.drawString(210,750,subtitle)
pdf.drawString(200,690,textlines[0])
pdf.drawString(300,690,result[3])
pdf.drawString(200,665,textlines[1])
pdf.drawString(300,665,result[3])
pdf.drawString(200,640,textlines[2])
pdf.drawString(300,640,result[4])
pdf.drawString(200,615,textlines[3])
pdf.drawString(300,615,result[5])
pdf.drawString(200,590,textlines[4])
pdf.drawString(300,590,result[6])
# drawMyRuler(pdf)
pdf.save()