Skip to the content
Documentation

frontpage

No ratings yet

Summary

Adds content to the frontpage (DEPRECATED).

Usage

pdf( frontpage, hash( text,       page_text,
                    [ align,      text_alignment,  ]
                    [ size,       text_size,       ]
                    [ top_margin, top_text_margin  ] ) )

Parameters

Name Type Description Required
text string Text that will be added to the front page. Yes.
align string The text alignment. No.
size int The font size. No.
top_margin int The top margin. No.

Description

This function makes it possible to add text to the front page. If the frontpage is not present, a new front page will be created when the function is used for the first time. This function should be called after all other content has been added to the PDF document. The "align" and "size" parameters control the alignment and the size of the text. The "top_margin" parameter can be used to specify the top margin (vertical positioning) for the text.

Examples

Example 1

{pdf( 'frontpage', hash( 'text', 'Exponential
'|wash( 'pdf' ), 'align', 'center', 'size', 32, 'top_margin', 350) )}

{pdf( 'frontpage', hash( 'text', 'The road ahead'| wash( 'pdf' ), 'align', 'center', 'size', 22, 'top_margin', 400 ) )}

This example adds a main and a sub title to the front page. The sub title is smaller and positioned below the main title. Both titles are centered. Notice that the main title ends with a new line, this assures that the sub title is correctly centered.

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.