API Reference
OdgPage
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.
Returned or exposed by
- Method OdgDocument.AddPage
- Method OdgDocument.ClonePage
- Method OdgDocument.ImportPage
- Property OdgDocument.Pages
Methods
public OdfConversionResult<OfficeDrawing> ToDrawing(OdfConversionLossPolicy lossPolicy = ReportOnly, Boolean forPrint = false) #OdfConversionResult<OfficeDrawing>Projects supported backgrounds, master artwork and page shapes, applying transforms and layer visibility.
Parameters
- lossPolicy OfficeIMO.OpenDocument.OdfConversionLossPolicy = ReportOnly
- Treatment of unsupported content and approximations.
- forPrint System.Boolean = false
- Selects print-visible layers instead of screen-visible layers.
public OdfConversionResult<OfficeDrawing> ToDrawing(OdfConversionLossPolicy lossPolicy, Boolean forPrint, CancellationToken cancellationToken) #OdfConversionResult<OfficeDrawing>Projects supported shapes with cooperative cancellation before each shape and nested group.
Parameters
- lossPolicy OfficeIMO.OpenDocument.OdfConversionLossPolicy
- forPrint System.Boolean
- cancellationToken System.Threading.CancellationToken
public OdfConversionResult<OfficeDrawing> ToDrawing(OdfConversionLossPolicy lossPolicy, Boolean forPrint, CancellationToken cancellationToken, OdfDateTimeFieldProjectionOptions dateTimeFields) #OdfConversionResult<OfficeDrawing>Projects a page with deterministic, opt-in date/time field evaluation.
Parameters
- lossPolicy OfficeIMO.OpenDocument.OdfConversionLossPolicy
- forPrint System.Boolean
- cancellationToken System.Threading.CancellationToken
- dateTimeFields OfficeIMO.OpenDocument.OdfDateTimeFieldProjectionOptions
public OdfConversionResult<OfficeDrawing> ToDrawing(OfficeRenderingProfile renderingProfile, OdfConversionLossPolicy lossPolicy = ReportOnly, Boolean forPrint = false, CancellationToken cancellationToken = default, OdfDateTimeFieldProjectionOptions dateTimeFields = null) #OdfConversionResult<OfficeDrawing>Projects a page using caller-supplied fonts and shaping before assessing text fitting and clipping.
Parameters
- renderingProfile OfficeIMO.Drawing.OfficeRenderingProfile
- lossPolicy OfficeIMO.OpenDocument.OdfConversionLossPolicy = ReportOnly
- forPrint System.Boolean = false
- cancellationToken System.Threading.CancellationToken = default
- dateTimeFields OfficeIMO.OpenDocument.OdfDateTimeFieldProjectionOptions = null
Inherited Methods
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.