PDF::Template::Container::PageDef
To provide the page definition for a given page. Without a pagedef, nothing
renders
- MARGINS / LEFT_MARGIN / RIGHT_MARGIN - This determines any space kept
empty on the left and right margins. MARGINS is a shortcut for specifying
both the left and right margins to the same value.
- PAGE_HEIGHT / PAGE_WIDTH - the height and width of the paper you want this
pagedef to render to. If both are not specified, the value in PAGESIZE
will be used.
- PAGESIZE - This is the paper size you want this pagedef to render to.
Choices are: Letter, Legal, A0, A1, A2, A3, and A4. This attribute will
only be used if PAGE_HEIGHT and PAGE_WIDTH are not set.
- LANDSCAPE - The default orientation is portrait. If LANDSCAPE is set to a
true value, then PAGE_HEIGHT and PAGE_WIDTH will be swapped.
- NOPAGENUMBER - If this is set to a true value, then this pagedef will not
increment the __PAGE__ parameter. Useful for title pages and the
like.
<pagedef pagesize="Legal" landscape="1">
... Children will render to a Legal-sized paper in landscape orientation ...
</pagedef>
It is very possible, and often useful, to have more than one pagedef in a given
template. Also, the PAGEDEF does not have to be the direct child of the
PDFTEMPLATE node. It is sometimes useful to have something like:
<pdftemplate>
<loop name="PAGEDEFS">
<pagedef
pagesize="$PaperSize"
landscape="$Orientation"
nopagenumber="$TitlePage"
>
... Children here ...
</pagedef>
</loop>
</pdftemplate>
Rob Kinyon (rob.kinyon@gmail.com)
Hey! The above document had some coding errors, which are explained
below:
- Around line 196:
- =back doesn't take any parameters, but you said =back 4