header
Summary
Inserts a header / title.Usage
pdf(header, hash( text, header_text, level, header_level, size, font_size, [ align, text_alignment, ] [ font, font_type ] ) )
Parameters
Name | Type | Description | Required |
---|---|---|---|
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. |
Description
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:
- Chapters
- Section
- Subsection
- Subsubsection
- 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.
Examples
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)
Comments
There are no comments.