DOM.Elements.PageSize
Describes the physical size of a page. Supports common named paper sizes (A4, A5, Letter, Legal) as well as custom sizes expressed using ainstance.
The class holds ainstance representing width and height (and units). Setting theproperty will update the storedto the canonical dimensions for that paper. Conversely, assigningattempts to map the provided dimensions back to a knownvalue; if no match is found thebecomes.
7 members
Constructors
PageSize
3 overloadsPageSize()Initializes a new instance ofusing the default dimensions. The default value is A4 (8.27in × 11.69in).
PageSize(double width, double height, Units units)Initializes a new instance ofwith a custom width and height using the specified units.
Parameters
- width
- Width value in the provided.
- height
- Height value in the provided.
- units
- Units used forand.
PageSize(PaperSize paper)Initializes a new instance ofusing a predefined.
Parameters
- paper
- Named paper size to use (A4, A5, Letter, Legal or Custom).
Properties
Gets or sets the custom page dimensions.
Assigning ainstance updates the internal measurements and will attempt to recognize the dimensions as one of the knownvalues by comparing the width/height in inches against canonical values: - A4 = 8.27in × 11.69in - A5 = 5.83in × 8.27in - Letter = 8.5in × 11in - Legal = 8.5in × 14in If an exact match is not found the is set to. Note: the comparison is an exact numeric comparison of the inch values as implemented.
Internal storage for the current dimensions. Defaults to A4 dimensions (8.27in × 11.69in).
Backing field for theproperty.
Gets or sets the named paper size.
When set to a known paper size (A4, A5, Letter, Legal) the is updated to the canonical dimensions for that paper (values stored in inches). Setting towill not change.