To make an image or a PDF page as background or template for the forms:

  • Use any pdf file as background image for pdf report:
  • Pput the pdf template file in reporting/forms folder;
  • After creating FrontReport object call SetHeaderType() method passing basename of the template file;
  • Refer reporting/includes/header2.inc - this is typical template file for document layout.

To add any additional constant elements printed on every page (like titles, additional graphics):

  • Create *.php file with the same base name.
  • Place it in the reporting/forms folder.
  • Put any needed code in it.

How the template page is used:

  • The pages in template file are used in cycle.
  • If there is only one page in template file - this page will be used for every page of report generated.
  • If your template has 3 pages and the generated report has 4 - the last page of report will use page 1 as background again.