Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

OdgPage

Namespace OfficeIMO.OpenDocument
Assembly OfficeIMO.OpenDocument
Modifiers sealed

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

Inheritance

  • Object
  • OdgPage

Usage

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

Methods

ToDrawing 4 overloads
public OdfConversionResult<OfficeDrawing> ToDrawing(OdfConversionLossPolicy lossPolicy = ReportOnly, Boolean forPrint = false) #
Returns: OdfConversionResult<OfficeDrawing>

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

Parameters

lossPolicy OfficeIMO.OpenDocument.OdfConversionLossPolicy = ReportOnly optionalposition: 0
Treatment of unsupported content and approximations.
forPrint System.Boolean = false optionalposition: 1
Selects print-visible layers instead of screen-visible layers.
public OdfConversionResult<OfficeDrawing> ToDrawing(OdfConversionLossPolicy lossPolicy, Boolean forPrint, CancellationToken cancellationToken) #
Returns: OdfConversionResult<OfficeDrawing>

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

Parameters

lossPolicy OfficeIMO.OpenDocument.OdfConversionLossPolicy requiredposition: 0
forPrint System.Boolean requiredposition: 1
cancellationToken System.Threading.CancellationToken requiredposition: 2
public OdfConversionResult<OfficeDrawing> ToDrawing(OdfConversionLossPolicy lossPolicy, Boolean forPrint, CancellationToken cancellationToken, OdfDateTimeFieldProjectionOptions dateTimeFields) #
Returns: OdfConversionResult<OfficeDrawing>

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

Parameters

lossPolicy OfficeIMO.OpenDocument.OdfConversionLossPolicy requiredposition: 0
forPrint System.Boolean requiredposition: 1
cancellationToken System.Threading.CancellationToken requiredposition: 2
dateTimeFields OfficeIMO.OpenDocument.OdfDateTimeFieldProjectionOptions requiredposition: 3
public OdfConversionResult<OfficeDrawing> ToDrawing(OfficeRenderingProfile renderingProfile, OdfConversionLossPolicy lossPolicy = ReportOnly, Boolean forPrint = false, CancellationToken cancellationToken = default, OdfDateTimeFieldProjectionOptions dateTimeFields = null) #
Returns: OdfConversionResult<OfficeDrawing>

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

Parameters

renderingProfile OfficeIMO.Drawing.OfficeRenderingProfile requiredposition: 0
lossPolicy OfficeIMO.OpenDocument.OdfConversionLossPolicy = ReportOnly optionalposition: 1
forPrint System.Boolean = false optionalposition: 2
cancellationToken System.Threading.CancellationToken = default optionalposition: 3
dateTimeFields OfficeIMO.OpenDocument.OdfDateTimeFieldProjectionOptions = null optionalposition: 4

Properties

public OdgBackground Background { get; } #

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

public OdgBackground MasterBackground { get; } #

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

public OdgBackgroundSize MasterBackgroundSize { get; set; } #

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

public String Name { get; set; } #

Unique page name.

public OdgShapes Shapes { get; } #

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

public OdgLayers Layers { get; } #

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

public OdgLayers EffectiveLayers { get; } #

Layer definitions after page, master, and document inheritance.

public OdfLength Width { get; set; } #

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

public OdfLength Height { get; set; } #

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

public String MasterPageName { get; set; } #

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; } #

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; } #

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.