Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Struct

OfficePageSize

OfficeIMO.Drawing

Namespace
OfficeIMO.Drawing
Assembly
OfficeIMO.Core
Source revision
ba882f6b0d07 with working tree changes
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.

Constructors

public OfficePageSize(OfficeLength width, OfficeLength height) #

Creates a physical page size from positive document lengths.

Parameters

width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required

Methods

public OfficePageSize Landscape() #

Returns this page size in landscape orientation.

public OfficePageSize Portrait() #

Returns this page size in portrait orientation.

public int ToPixelHeight(double dpi, double scale = 1) #

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) #

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

Parameters

dpi double required
scale double = 1 optional

Returns

int

Properties

public OfficeLength Width { get; } #

Physical page width.

public OfficeLength Height { get; } #

Physical page height.