PageFormat

Overview

PageFormat is a class in Aspose.PDF FOSS for TypeScript.

A page size in points (1/72").

This class declares 4 methods for PageFormat objects in TypeScript programs. Available methods include: custom, landscape, mediaBox, portrait. All public members are accessible to any TypeScript application after installing the Aspose.PDF FOSS for TypeScript package. Properties: A4, Legal, Letter.

Properties

NameTypeAccessDescription
A4``ReadGets the a4.
Letter``ReadGets the letter.
Legal``ReadGets the legal.

Methods

SignatureDescription
custom(width: number, height: number)PageFormatA custom page size; both dimensions must be positive and finite.
landscape()PageFormatThis format oriented so width >= height (returns this if already so).
portrait()PageFormatThis format oriented so height >= width (returns this if already so).
mediaBox()number[]The /MediaBox rectangle [0, 0, width, height] for this format.