Skip to content

PDFPageSize

Namespace: O2S.Components.PDF4NET

Defines a predefined size for PDF pages.

public class PDFPageSize

Inheritance ObjectPDFPageSize

Fields

A0

A0 page size.

public static PDFPageSize A0;

A1

A1 page size.

public static PDFPageSize A1;

A10

A10 page size.

public static PDFPageSize A10;

A2

A2 page size.

public static PDFPageSize A2;

A3

A3 page size.

public static PDFPageSize A3;

A4

A4 page size.

public static PDFPageSize A4;

A5

A5 page size.

public static PDFPageSize A5;

A6

A6 page size.

public static PDFPageSize A6;

A7

A7 page size.

public static PDFPageSize A7;

A8

A8 page size.

public static PDFPageSize A8;

A9

A9 page size.

public static PDFPageSize A9;

B0

B0 page size.

public static PDFPageSize B0;

B1

B1 page size.

public static PDFPageSize B1;

B10

B10 page size.

public static PDFPageSize B10;

B2

B2 page size.

public static PDFPageSize B2;

B3

B3 page size.

public static PDFPageSize B3;

B4

B4 page size.

public static PDFPageSize B4;

B5

B5 page size.

public static PDFPageSize B5;

B6

B6 page size.

public static PDFPageSize B6;

B7

B7 page size.

public static PDFPageSize B7;

B8

B8 page size.

public static PDFPageSize B8;

B9

B9 page size.

public static PDFPageSize B9;

C0

C0 page size.

public static PDFPageSize C0;

C1

C1 page size.

public static PDFPageSize C1;

C10

C10 page size.

public static PDFPageSize C10;

C2

C2 page size.

public static PDFPageSize C2;

C3

C3 page size.

public static PDFPageSize C3;

C4

C4 page size.

public static PDFPageSize C4;

C5

C5 page size.

public static PDFPageSize C5;

C6

C6 page size.

public static PDFPageSize C6;

C7

C7 page size.

public static PDFPageSize C7;

C8

C8 page size.

public static PDFPageSize C8;

C9

C9 page size.

public static PDFPageSize C9;

Delta

Delta value that is used when determining if a given size matches a predefined size.

public static double Delta;

Executive

Executive page size.

public static PDFPageSize Executive;

Folio

Folio page size.

public static PDFPageSize Folio;

Ledger

Ledger page size.

public static PDFPageSize Ledger;

Legal page size.

public static PDFPageSize Legal;

Letter

Letter page size.

public static PDFPageSize Letter;

Quarto

Quarto page size.

public static PDFPageSize Quarto;

Statement

Statement page size.

public static PDFPageSize Statement;

Tabloid

Tabloid page size.

public static PDFPageSize Tabloid;

Constructors

PDFPageSize(String, Double, Double)

Initializes a new PDFPageSize object with the specified size.

public PDFPageSize(string name, double width, double height)

Parameters

name String
The name of the predefined page size.

width Double
Initial width in PDF points

height Double
Initial height in PDF points


Properties

Height

Gets the page height in PDF points.

public double Height { get; }

Property Value

Double


Name

Gets the name of the predefined page size.

public string Name { get; }

Property Value

String


Width

Gets the page width in PDF points.

public double Width { get; }

Property Value

Double


Methods

Equals(Object)

Compares this object with another object.

public bool Equals(object obj)

Parameters

obj Object

Returns

Boolean
True if the objects are equal.


GetHashCode()

Gets the object's hash code.

public int GetHashCode()

Returns

Int32


GetPredefinedPageSize(Double, Double)

Gets the predefined page size that matches the given dimensions.

public static PDFPageSize GetPredefinedPageSize(double width, double height)

Parameters

width Double
Width.

height Double
Height.

Returns

PDFPageSize
A predefined page size if the dimensions match otherwise an unknown page size is returned.


IsMatch(PDFPageSize, Double)

Tests if the given object matches this object when the size different is less than delta.

public bool IsMatch(PDFPageSize other, double delta)

Parameters

other PDFPageSize
Object to compare.

delta Double
Allowed difference in size.

Returns

Boolean
True if the objects match.


IsMatch(Double, Double, Double)

Tests if the given size matches this object when the difference is less than delta.

public bool IsMatch(double width, double height, double delta)

Parameters

width Double
Width to compare.

height Double
Height to compare.

delta Double
Allowed difference in size.

Returns

Boolean
True if the sizes match.


ToString()

Converts the object to string representation.

public string ToString()

Returns

String
The object as string