forked from reingart/pyfpdf
-
Notifications
You must be signed in to change notification settings - Fork 1
Header
Google Code Exporter edited this page Mar 18, 2015
·
1 revision
fdpf.header()
This method is used to render the page header. It is automatically called by AddPage and should not be called directly by the application. The implementation in FPDF is empty, so you have to subclass it and override the method if you want a specific processing.
class PDF(FPDF):
def header(self):
# Select Arial bold 15
self.set_font('Arial','B',15)
# Move to the right
self.cell(80)
# Framed title
self.cell(30,10,'Title',1,0,'C')
# Line break
self.ln(20)