Class PageSize
- Namespace
- SoftZenPdf
- Assembly
- SoftZenPdf.dll
A page size in points (1/72 inch). Use a predefined size or create one from points, millimetres or inches.
public sealed record PageSize : IEquatable<PageSize>
- Inheritance
-
PageSize
- Implements
- Inherited Members
Examples
document.AddPage(PageSize.Letter, PageOrientation.Landscape);
document.AddPage(PageSize.FromMillimeters(100, 150));
Constructors
- PageSize(double, double)
Creates a page size from a width and height in points.
Fields
- MaxDimension
The largest allowed width or height, in points (200 inches; ISO 32000-1 Annex C).
- MinDimension
The smallest allowed width or height, in points (ISO 32000-1 Annex C).
Properties
- A0
ISO A0, 841 × 1189 mm (about 2384 × 3370 pt).
- A1
ISO A1, 594 × 841 mm (about 1684 × 2384 pt).
- A2
ISO A2, 420 × 594 mm (about 1191 × 1684 pt).
- A3
ISO A3, 297 × 420 mm (about 842 × 1191 pt).
- A4
ISO A4, 210 × 297 mm (about 595 × 842 pt). The default DefaultPageSize.
- A5
ISO A5, 148 × 210 mm (about 420 × 595 pt).
- A6
ISO A6, 105 × 148 mm (about 298 × 420 pt).
- Height
Height in points.
- Legal
US Legal, 8.5 × 14 in (612 × 1008 pt).
- Letter
US Letter, 8.5 × 11 in (612 × 792 pt).
- Width
Width in points.
Methods
- FromInches(double, double)
Creates a page size from inches.
- FromMillimeters(double, double)
Creates a page size from millimetres.
- WithOrientation(PageOrientation)
Returns this size in the given orientation, swapping width and height if needed.