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

set_margin

Summary

Sets the page margins or line spacing (DEPRECATED).

Usage

pdf( set_margin, hash( [ left,       left_margin,  ]
                       [ right,      right_margin, ]
                       [ top,        top_margin,   ]
                       [ bottom,     bottom_margin,]
                       [ x,          x_offset,     ]
                       [ y,          y_offset,     ]
                       [ line_space, line_space    ] ) )

Parameters

NameTypeDescriptionRequired
left float Left page margin. No.
right float Right page margin. No.
top float Top page margin. No.
bottom float Bottom page margin. No.
x float Page x offset. No.
y float Page y offset. No.
line_space float Line space size. No.

Description

This function sets the page margins of the current and following pages. The "left", "right", "top", and "bottom" parameters specify the distances from the edges. The parameters "x" and "y" specify a point on the current page where the new margin starts. For the next pages, the parameters "x" and "y" are ignored and thus the margins will affect the entire area of the upcoming pages. The "line_space" parameter specifies the amount of white space between each line. The default margins are configured in the "pdf.ini" file.

Examples

Example 1

{pdf( 'set_margin', hash( 'left', 370, 'right', 100 ) )}
{pdf( 'text', 'The text written on this page is presented in a small column.
The space between each new line is also adjusted.'|wash( 'pdf' ) )}

This example creates a small column with some text.

Balazs Halasy (14/05/2004 9:58 am)

Julia Shymova (11/01/2008 1:09 pm)

Balazs Halasy, Julia Shymova


Comments

There are no comments.