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.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2013 eZ Systems AS (except where otherwise noted). All rights reserved.