# OdgPage

A drawing page. Page dimensions resolve through its referenced master and layout.

Class 

`OfficeIMO.OpenDocument`

**Namespace**

`OfficeIMO.OpenDocument`

**Assembly**

`OfficeIMO.OpenDocument`

**Source revision**

`15caddadea70` with working tree changes

**Source**

[OdgPage.cs:10](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdgPage.cs#L10)

**Modifiers**

sealed

A drawing page. Page dimensions resolve through its referenced master and layout.

## Inheritance

- object
- OdgPage

## Usage

Explore 4 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 4

- Method [OdgDocument.AddPage](/api/open-document/officeimo-opendocument-odgdocument/#method-addpage-string-nullable-officeimo-opendocument-odflength-nullable-officeimo-opendocument-odflength)
- Method [OdgDocument.ClonePage](/api/open-document/officeimo-opendocument-odgdocument/#method-clonepage-int32-string)
- Method [OdgDocument.ImportPage](/api/open-document/officeimo-opendocument-odgdocument/#method-importpage-officeimo-opendocument-odgdocument-int32-string)
- Property [OdgDocument.Pages](/api/open-document/officeimo-opendocument-odgdocument/#property-pages)

Filter members 

Show inherited

## Methods

ToDrawing 4 overloads

`public OdfConversionResult<OfficeDrawing> ToDrawing(OdfConversionLossPolicy lossPolicy = ReportOnly, bool forPrint = false)` [#](#method-todrawing-officeimo-opendocument-odfconversionlosspolicy-boolean)

[OdgPage.Drawing.cs:10](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdgPage.Drawing.cs#L10)

Projects supported backgrounds, master artwork and page shapes, applying transforms and layer visibility.

Parameters

**lossPolicy OfficeIMO.OpenDocument.OdfConversionLossPolicy = ReportOnly optional**

Treatment of unsupported content and approximations.

**forPrint bool = false optional**

Selects print-visible layers instead of screen-visible layers.

Returns

`OdfConversionResult<OfficeDrawing>`

`public OdfConversionResult<OfficeDrawing> ToDrawing(OdfConversionLossPolicy lossPolicy, bool forPrint, CancellationToken cancellationToken)` [#](#method-todrawing-officeimo-opendocument-odfconversionlosspolicy-boolean-threading-cancellationtoken)

[OdgPage.Drawing.cs:14](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdgPage.Drawing.cs#L14)

Projects supported shapes with cooperative cancellation before each shape and nested group.

Parameters

**lossPolicy OfficeIMO.OpenDocument.OdfConversionLossPolicy required**

**forPrint bool required**

**cancellationToken System.Threading.CancellationToken required**

Returns

`OdfConversionResult<OfficeDrawing>`

`public OdfConversionResult<OfficeDrawing> ToDrawing(OdfConversionLossPolicy lossPolicy, bool forPrint, CancellationToken cancellationToken, OdfDateTimeFieldProjectionOptions? dateTimeFields)` [#](#method-todrawing-officeimo-opendocument-odfconversionlosspolicy-boolean-threading-cancellationtoken-officeimo-opendocument-odfdatetimefieldprojectionoptions)

[OdgPage.Drawing.cs:19](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdgPage.Drawing.cs#L19)

Projects a page with deterministic, opt-in date/time field evaluation.

Parameters

**lossPolicy OfficeIMO.OpenDocument.OdfConversionLossPolicy required**

**forPrint bool required**

**cancellationToken System.Threading.CancellationToken required**

**dateTimeFields OfficeIMO.OpenDocument.OdfDateTimeFieldProjectionOptions? required**

Returns

`OdfConversionResult<OfficeDrawing>`

`public OdfConversionResult<OfficeDrawing> ToDrawing(OfficeRenderingProfile renderingProfile, OdfConversionLossPolicy lossPolicy = ReportOnly, bool forPrint = false, CancellationToken cancellationToken = default, OdfDateTimeFieldProjectionOptions? dateTimeFields = null)` [#](#method-todrawing-officeimo-drawing-officerenderingprofile-officeimo-opendocument-odfconversionlosspolicy-boolean-threading-cancellationtoken-officeimo-opendocument-odfdatetimefieldprojectionoptions)

[OdgPage.Drawing.cs:26](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdgPage.Drawing.cs#L26)

Projects a page using caller-supplied fonts and shaping before assessing text fitting and clipping.

Parameters

**renderingProfile OfficeIMO.Drawing.OfficeRenderingProfile required**

**lossPolicy OfficeIMO.OpenDocument.OdfConversionLossPolicy = ReportOnly optional**

**forPrint bool = false optional**

**cancellationToken System.Threading.CancellationToken = default optional**

**dateTimeFields OfficeIMO.OpenDocument.OdfDateTimeFieldProjectionOptions? = null optional**

Returns

`OdfConversionResult<OfficeDrawing>`

## Inherited Methods

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

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

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

Inherited from object

Returns

`int`

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

Inherited from object

Returns

`Type`

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

Inherited from object

Returns

`string?`

## Properties

`public OdgBackground Background { get; }` [#](#property-background)

[OdgPage.Background.cs:14](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdgPage.Background.cs#L14)

Page-local background declarations. Page no-fill retains the master's fill in native Draw.

`public OdgBackground MasterBackground { get; }` [#](#property-masterbackground)

[OdgPage.Background.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdgPage.Background.cs#L18)

Background declarations of the referenced master. Edits affect every page using this master.

`public OdgBackgroundSize MasterBackgroundSize { get; set; }` [#](#property-masterbackgroundsize)

[OdgPage.Background.cs:24](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdgPage.Background.cs#L24)

The master's full-page or inside-margin paint area, shared by pages referencing that master.

`public string Name { get; set; }` [#](#property-name)

[OdgPage.cs:10](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdgPage.cs#L10)

Unique page name.

`public OdgShapes Shapes { get; }` [#](#property-shapes)

[OdgPage.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdgPage.cs#L18)

Shapes in paint order, including preserved shapes outside the editable profile.

`public OdgLayers Layers { get; }` [#](#property-layers)

[OdgPage.cs:20](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdgPage.cs#L20)

Layers declared on this page. An explicit page set overrides master and document layers.

`public OdgLayers EffectiveLayers { get; }` [#](#property-effectivelayers)

[OdgPage.cs:24](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdgPage.cs#L24)

Layer definitions after page, master, and document inheritance.

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

[OdgPage.cs:33](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdgPage.cs#L33)

Page width. Changing a shared layout affects all pages referencing it.

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

[OdgPage.cs:35](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdgPage.cs#L35)

Page height. Changing a shared layout affects all pages referencing it.

`public string MasterPageName { get; set; }` [#](#property-masterpagename)

[OdgPage.Master.cs:11](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdgPage.Master.cs#L11)

Referenced master name, or an empty string when absent in imported XML. Assigning an existing master shares its layout and inherited layers without changing page shapes or page layers.

Exceptions

- `ArgumentException` – The name is empty or does not identify a master in this document.
- `InvalidDataException` – The master name is ambiguous or its page layout cannot be resolved.

`public OdgLayers MasterLayers { get; }` [#](#property-masterlayers)

[OdgPage.Master.cs:26](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdgPage.Master.cs#L26)

Layers declared on the referenced master. Adding a master layer set overrides document layers for pages using this master. An explicit page layer set continues to take precedence. Edits affect every page inheriting this master.

Exceptions

- `InvalidDataException` – The page does not reference a resolvable master.

`public OdgShapes MasterShapes { get; }` [#](#property-mastershapes)

[OdgPage.Master.cs:35](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdgPage.Master.cs#L35)

Artwork on the referenced master, in paint order. Edits affect every page using this master. Clone the master and assign its name to this page before making independent artwork edits. Unknown drawing elements remain visible and preserved outside the editable profile.

Exceptions

- `InvalidDataException` – The page does not reference a resolvable master.

<!-- PowerForge markdown artifact sha256:7B41C3D4AFA6F7CF049E3BFF02AD0BAA96797D0DC12BE3BBA2629839277303A1 -->
