PDF::FromHTML::Template::Container::PageDef3pm
Provide the page definition for a given page
Node name
PAGEDEF
Inheritance
PDF::FromHTML::Template::Container
Attributes
- •
-
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.
Children
None
Affects
None
Dependencies
None
Usage
<pagedef pagesize="Legal" landscape="1">... Children will render to a Legal-sized paper in landscape orientation ...</pagedef>
Note
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"><pagedefpagesize="$PaperSize"landscape="$Orientation"nopagenumber="$TitlePage">... Children here ...</pagedef></loop></pdftemplate>