Name
  page:SetSize -- set page size and direction
Synopsis

      status = page:SetSize(size, direction)

Function
  `page:SetSize()` changes the size and direction of a page to a predefined size.

  The `size` parameter must be one of the following constants:

  `#HPDF_PAGE_SIZE_LETTER`
    8.5 x 11 inches (612 x 792 pixels)
  `#HPDF_PAGE_SIZE_LEGAL`
    8.5 x 14 inches (612 x 1008 pixels)
  `#HPDF_PAGE_SIZE_A3`
    297 x 420 mm (841.89 x 1199.551 pixels)
  `#HPDF_PAGE_SIZE_A4`
    210 x 297 mm (595.276 x 841.89 pixels)
  `#HPDF_PAGE_SIZE_A5`
    148 x 210 mm (419.528 x 595.276 pixels)
  `#HPDF_PAGE_SIZE_B4`
    250 x 353 mm (708.661 x 1000.63 pixels)
  `#HPDF_PAGE_SIZE_B5`
    176 x 250 mm (498.898 x 708.661 pixels)
  `#HPDF_PAGE_SIZE_EXECUTIVE`
    7.25 x 10.5 inches (522 x 756 pixels)
  `#HPDF_PAGE_SIZE_US4x6`
    4 x 6 inches (288 x 432 pixels)
  `#HPDF_PAGE_SIZE_US4x8`
    4 x 8 inches (288 x 576 pixels)
  `#HPDF_PAGE_SIZE_US5x7`
    5 x 7 inches (360 x 504 pixels)
  `#HPDF_PAGE_SIZE_COMM10`
    4.125 x 9.5 inches (297 x 684 pixels)

  The `direction` parameter must be one of the following constants:

  `#HPDF_PAGE_PORTRAIT`
    Set the longer value to vertical.
  `#HPDF_PAGE_LANDSCAPE`
    Set the longer value to horizontal.

Inputs
  size
    predefined page size value (see above)
  direction
    the direction of the page (see above for possible values)
Results
  status
    status code
Errors
  `#HPDF_INVALID_PAGE` - An invalid page handle was set.

  `#HPDF_PAGE_INVALID_SIZE` - An invalid size was set.

  `#HPDF_PAGE_INVALID_DIRECTION` - An invalid direction was set.

  `#HPDF_FAILED_TO_ALLOC_MEM` - Memory allocation failed.

Show TOC