class_docstr: default setting for report constants
docstr: override FPDF header function, show report name, author and create date
docstr_tok: ["override","FPDF","header","function",",","show","report","name",",","author","and","create","date"]
code: def header(self):
      """
      override FPDF header function, show report name, author and create date
      """
      # Calculate width of title and position
  
      self.set_font(self.title_font, "B", CustomPdf.TITLE_FONTSIZE)
      text_width = self.get_string_width(self.title) + 6
  
      self.set_x((CustomPdf.A4_PAPER_WIDTH - text_width) / 2)
      # Colors of frame, background and text
  
      self.set_fill_color(**CustomPdf.DEFAULT_FILL_COLOR)
      self.set_text_color(**CustomPdf.DEFAULT_TEXT_COLOR)
      # Thickness of frame (1 mm)
      self.set_line_width(0)
      # Title
      self.cell(text_width, 9, self.title, 0, 0, "C", 1)
      # Line break
      self.ln(10)
  
      author_date = "created on %s" % self._create_date
      text_width = self.get_string_width(author_date) + 6
      self.set_x((CustomPdf.A4_PAPER_WIDTH - text_width) / 2)
  
      self.set_font("", "", CustomPdf.AUTHOR_DATE_FONTSIZE)
      self.set_fill_color(**CustomPdf.DEFAULT_FILL_COLOR)
      self.set_text_color(**CustomPdf.DEFAULT_TEXT_COLOR)
      self.set_line_width(0)
      # Title
      self.cell(text_width, 5, author_date, 0, 0, "C", 1)
      # Line break
      self.ln(10)
  
      # reset back the font
      self.set_font(self.content_font, "", 12)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import warnings
  import datetime
  import re
  from fpdf import FPDF
label_desc: Use image node_id 6 for calling the CustomPdf obj's underlying member method code with example usage: obj.header() without return types