Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.



Inserts a header / title.


pdf(header, hash( text,  header_text,
                  level, header_level,
                  size,  font_size,
                [ align, text_alignment, ]
                [ font,  font_type       ] ) )


text string The header text. Yes.
level integer The header level. Yes.
size integer The font size. Yes.
align string The text alignment. No.
font string The font that should be used. No.


This function inserts a header or title. The main difference between the "text" and the header function is the "level" parameter. This parameter specifies the type of the header. The level number goes from 1 and up:

  1. Chapters
  2. Section
  3. Subsection
  4. Subsubsection
  5. etc.

The level has nothing to do with the header text, it controls how the text appears in the table of contents. The font size, font type, and text alignment can be specified using the "size", "font", and "align" parameters. Please refer to the documentation of the "text" function for an explanation of these parameters.


Example 1

{pdf( 'header', hash( 'level', 1, 'text', 'The first chapter'|wash( 'pdf' ), 'size', 20 ) )}
{pdf( 'header', hash( 'level', 2, 'text', 'The first section'|wash( 'pdf' ), 'size', 16 ) )}
{pdf( 'header', hash( 'level', 2, 'text', 'The second section'|wash( 'pdf' ), 'size', 16 ) )}
{pdf( 'header', hash( 'level', 3, 'text', 'The first subsection'|wash( 'pdf' ), 'size', 14 ) )}
{pdf( 'header', hash( 'level', 1, 'text', 'The second chapter'|wash( 'pdf' ), 'size', 20 ) )}

This example shows how to create a chapters, section and subsections.

Balazs Halasy (13/05/2004 2:27 pm)

Balazs Halasy (04/05/2005 12:49 pm)


There are no comments.