---
name: "PDF::FromHTML::Template::Container::PageDef"
section: "3pm"
platform: "linux"
package: "libpdf-fromhtml-perl"
version: "0.34-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/PDF::FromHTML::Template::Container::PageDef"
---

# PDF::FromHTML::Template::Container::PageDef(3pm)

Provide the page definition for a given page

## NAME

PDF::FromHTML::Template::Container::PageDef - 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">
      <pagedef
        pagesize="$PaperSize"
        landscape="$Orientation"
        nopagenumber="$TitlePage"
      >
        ... Children here ...
      </pagedef>
    </loop>
  </pdftemplate>
```

## AUTHOR

Rob Kinyon (rkinyon@columbus.rr.com)

## SEE ALSO
