This is the old documentation center for eZ Publish 4. We are currently migrating the eZ Publish documentation to http://confluence.ez.no the eZ Publish 5 documentation platform. Documentation for the eZ Publish legacy components are still located on this site, as well as all documentation for earlier releases.

set_margin

Summary

Sets the page margins or line spacing.

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 11:58 am)

Balazs Halasy (04/05/2005 1:33 pm)


Comments

There are no comments.