Skip to content

Latest commit

 

History

History
28 lines (21 loc) · 664 Bytes

Header.md

File metadata and controls

28 lines (21 loc) · 664 Bytes

Header

fdpf.header()

Description

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.

Example

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)

See also

AddPage, Footer.