Skip to main content

Header, Footer and Normal Section

A template is divided into multiple sections, and a section is where you can drag-and-drop components, such as Label, Image, Chart component, etc. There are three types of sections: Header, Normal, and Footer.

Header, Normal Section and Footer section Header, Normal Section and Footer section

Header section

The header section appears at the top of each page. This includes things such as page number, document title, and other information. You can use the system variables sys.pageNumber and sys.totalPages in the header section to display the current page number and the total number of pages.

Normal section

The normal section is the main content area of a template. It is where you place the components that render the body of the PDF, such as labels, images, charts, tables, and dynamic content.

The following topics show how you can make use of a normal section:

  • Data binding for normal sections: To generate repeated content from an array, enable data binding for the normal section. When data binding is enabled, CraftMyPDF renders the section once for each record in the selected array, making it suitable for invoices, order items, reports, lists, and other record-based layouts. Learn more in Data Binding for Normal Section.

  • Creating multiple-page PDFs with multiple sections and page breaks: When repeated content or long layouts extend beyond one page, normal sections can continue across pages. You can also use multiple sections and page breaks to control where new pages start. Learn more in Create Multiple Page PDF.

If you are displaying tabular data, consider using the Simple Table component.

The footer section appears on the bottom of each page, and it usually contains the page number, document title, or other information. You can use the system variables sys.pageNumber and sys.totalPages in the footer section to display the current page number and the total number of pages.