-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPDF_prescription_slip.py
More file actions
38 lines (26 loc) · 1.15 KB
/
Copy pathPDF_prescription_slip.py
File metadata and controls
38 lines (26 loc) · 1.15 KB
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
from speech_to_text_BLOCK import MyText
from fpdf import FPDF
# saving FPDF() class into a variable pdf
pdf = FPDF()
# Adding page
pdf.add_page()
# setting style and size of font in the pdf
pdf.set_font("Arial", size = 15)
# hospital brand name
pdf.set_fill_color(153, 255, 255)
pdf.cell(0, 10, txt = "PANDA'S MEDICARE SOLUTIONS", border = 1, ln=1, align='C', fill = True)
# company tagline
pdf.set_fill_color(200, 200, 200)
pdf.set_text_color(0, 0, 0)
pdf.cell(0, 10, txt = '"Healing and empowering people through technology."', border = 1, ln=1, align='C', fill = True)
pdf.cell(0, 10, txt = " ", ln=2, align='C')
pdf.cell(0, 10, txt = "Dr. Rishabh Panda, M.B.B.S., M.S.(Ortho.)", ln=2, align='C')
pdf.cell(0, 10, txt = "Hyderabad, India (5000xx)", ln=2, align='R')
pdf.cell(0, 10, txt = "Ph: (+91)xxx-yyyy-zz", ln=2, align='R')
pdf.cell(0, 10, txt = "FAX:(207) 808 2015 2202", ln=2, align='R')
pdf.cell(0, 10, txt = " ", ln=2, align='C')
pdf.cell(0, 10, txt = "PRESCRIPTION (Rx)", ln=2, align='L')
pdf.cell(0, 10, txt = "_________________", ln=2, align='L')
pdf.cell(0, 10, txt = MyText, ln=2, align='L')
# save the pdf with name.pdf
pdf.output("ePrescription.pdf")