# OfficePageSize

Represents a physical page size used by image/page composition.

Struct 

`OfficeIMO.Drawing`

**Namespace**

`OfficeIMO.Drawing`

**Assembly**

`OfficeIMO.Core`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[OfficePageSize.cs:11](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficePageSize.cs#L11)

**Base**

`ValueType`

**Modifiers**

sealed

Represents a physical page size used by image/page composition.

## Inheritance

- ValueType
- OfficePageSize

## Usage

Explore 26 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 26

- Method [OfficePageSize.Landscape](/api/core/officeimo-drawing-officepagesize/#method-landscape)
- Method [OfficePageSize.Portrait](/api/core/officeimo-drawing-officepagesize/#method-portrait)
- Property [OfficePageSizes.A3](/api/core/officeimo-drawing-officepagesizes/#property-a3)
- Property [OfficePageSizes.A4](/api/core/officeimo-drawing-officepagesizes/#property-a4)
- Property [OfficePageSizes.A5](/api/core/officeimo-drawing-officepagesizes/#property-a5)
- Property [OfficePageSizes.A6](/api/core/officeimo-drawing-officepagesizes/#property-a6)
- Property [OfficePageSizes.B4Jis](/api/core/officeimo-drawing-officepagesizes/#property-b4jis)
- Property [OfficePageSizes.B5Jis](/api/core/officeimo-drawing-officepagesizes/#property-b5jis)
- Property [OfficePageSizes.B6Jis](/api/core/officeimo-drawing-officepagesizes/#property-b6jis)
- Property [OfficePageSizes.Billfold](/api/core/officeimo-drawing-officepagesizes/#property-billfold)
- Property [OfficePageSizes.CSheet](/api/core/officeimo-drawing-officepagesizes/#property-csheet)
- Property [OfficePageSizes.Envelope10](/api/core/officeimo-drawing-officepagesizes/#property-envelope10)
- Property [OfficePageSizes.Envelope9](/api/core/officeimo-drawing-officepagesizes/#property-envelope9)
- Property [OfficePageSizes.EnvelopeB5](/api/core/officeimo-drawing-officepagesizes/#property-envelopeb5)
- Property [OfficePageSizes.EnvelopeC4](/api/core/officeimo-drawing-officepagesizes/#property-envelopec4)
- Property [OfficePageSizes.EnvelopeC5](/api/core/officeimo-drawing-officepagesizes/#property-envelopec5)
- Property [OfficePageSizes.EnvelopeDl](/api/core/officeimo-drawing-officepagesizes/#property-envelopedl)
- Property [OfficePageSizes.EnvelopeMonarch](/api/core/officeimo-drawing-officepagesizes/#property-envelopemonarch)
- Property [OfficePageSizes.Executive](/api/core/officeimo-drawing-officepagesizes/#property-executive)
- Property [OfficePageSizes.IndexCard](/api/core/officeimo-drawing-officepagesizes/#property-indexcard)
- Property [OfficePageSizes.JapanesePostcard](/api/core/officeimo-drawing-officepagesizes/#property-japanesepostcard)
- Property [OfficePageSizes.Ledger](/api/core/officeimo-drawing-officepagesizes/#property-ledger)
- Property [OfficePageSizes.Legal](/api/core/officeimo-drawing-officepagesizes/#property-legal)
- Property [OfficePageSizes.Letter](/api/core/officeimo-drawing-officepagesizes/#property-letter)
- Property [OfficePageSizes.Statement](/api/core/officeimo-drawing-officepagesizes/#property-statement)
- Property [OfficePageSizes.Tabloid](/api/core/officeimo-drawing-officepagesizes/#property-tabloid)

Filter members 

Show inherited

## Constructors

`public OfficePageSize(OfficeLength width, OfficeLength height)` [#](#constructor-ctor-officeimo-officelength-officeimo-officelength)

[OfficePageSize.cs:11](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficePageSize.cs#L11)

Creates a physical page size from positive document lengths.

Parameters

**width OfficeIMO.OfficeLength required**

**height OfficeIMO.OfficeLength required**

## Methods

`public OfficePageSize Landscape()` [#](#method-landscape)

[OfficePageSize.cs:37](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficePageSize.cs#L37)

Returns this page size in landscape orientation.

Returns

`OfficePageSize`

`public OfficePageSize Portrait()` [#](#method-portrait)

[OfficePageSize.cs:31](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficePageSize.cs#L31)

Returns this page size in portrait orientation.

Returns

`OfficePageSize`

`public int ToPixelHeight(double dpi, double scale = 1)` [#](#method-topixelheight-double-double)

[OfficePageSize.cs:49](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficePageSize.cs#L49)

Converts the page height to pixels for the requested DPI and scale.

Parameters

**dpi double required**

**scale double = 1 optional**

Returns

`int`

`public int ToPixelWidth(double dpi, double scale = 1)` [#](#method-topixelwidth-double-double)

[OfficePageSize.cs:43](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficePageSize.cs#L43)

Converts the page width to pixels for the requested DPI and scale.

Parameters

**dpi double required**

**scale double = 1 optional**

Returns

`int`

## Inherited Methods

`public override bool Equals(object? obj)` [#](#method-equals-object)

Inherited from ValueType

Parameters

**obj object? required**

Returns

`bool`

`public override int GetHashCode()` [#](#method-gethashcode)

Inherited from ValueType

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public override string? ToString()` [#](#method-tostring)

Inherited from ValueType

Returns

`string?`

## Properties

`public OfficeLength Width { get; }` [#](#property-width)

[OfficePageSize.cs:22](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficePageSize.cs#L22)

Physical page width.

`public OfficeLength Height { get; }` [#](#property-height)

[OfficePageSize.cs:25](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficePageSize.cs#L25)

Physical page height.

<!-- PowerForge markdown artifact sha256:454639E4DC5646B699B3085D57DAE042F5428E7A02832F4996FC43C0EDB43363 -->
