pdf( frontpage, hash( text, page_text, [ align, text_alignment, ] [ size, text_size, ] [ top_margin, top_text_margin ] ) )
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. |
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.
{pdf( 'frontpage', hash( 'text', 'eZ Publish '|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.
Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2013 eZ Systems AS (except where otherwise noted). All rights reserved.