GemBox.Document
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    DocumentModelPage Class

    Namespace:
    GemBox.Document
    Assembly:
    GemBox.Document.dll

    Represents a document page.

    • C#
    • VB.NET
    public sealed class DocumentModelPage
    Public NotInheritable Class DocumentModelPage
    Inheritance:
    System.Object
    DocumentModelPage

    Properties

    Height

    Gets the page height in Points.

    • C#
    • VB.NET
    public double Height { get; }
    Public ReadOnly Property Height As Double
    Property Value
    System.Double

    The page height in Points.

    PageContent

    Gets the content of the page.

    • C#
    • VB.NET
    public FrameworkElement PageContent { get; }
    Public ReadOnly Property PageContent As FrameworkElement
    Property Value
    System.Windows.FrameworkElement

    The content of the page.

    Range

    Gets the range in the DocumentModel that corresponds to this page.

    • C#
    • VB.NET
    public MultiContentRange Range { get; }
    Public ReadOnly Property Range As MultiContentRange
    Property Value
    MultiContentRange

    Width

    Gets the page width in Points.

    • C#
    • VB.NET
    public double Width { get; }
    Public ReadOnly Property Width As Double
    Property Value
    System.Double

    The page width in Points.

    Methods

    ConvertToDocument()

    Extracts a DocumentModel from this page.

    • C#
    • VB.NET
    public DocumentModel ConvertToDocument()
    Public Function ConvertToDocument As DocumentModel
    Returns
    DocumentModel

    The extracted document model.

    GetElementLayout(Element)

    Obtains position and size of the element on the page.

    • C#
    • VB.NET
    public FloatingLayout GetElementLayout(Element element)
    Public Function GetElementLayout(element As Element) As FloatingLayout
    Parameters
    element
    Element

    Element for which to obtain the position and size.

    Returns
    FloatingLayout

    The position and size of the element. null, if the element is not supported or it is not present on the page.

    Remarks

    Currently supported elements are Paragraph, Table, TableRow, and TableCell.

    Save(Stream, SaveOptions)

    Saves the document page in the specified stream.

    • C#
    • VB.NET
    public void Save(Stream stream, SaveOptions options)
    Public Sub Save(stream As Stream, options As SaveOptions)
    Parameters
    stream
    System.IO.Stream

    The stream in which to save the document page.

    options
    SaveOptions

    The saving options which can be used to define settings for save operation.

    Save(String)

    Saves the document page to a file with the specified path. Path must include file extension.

    • C#
    • VB.NET
    public void Save(string path)
    Public Sub Save(path As String)
    Parameters
    path
    System.String

    The path to which to save the document page.

    Remarks

    File extension that is extracted from the path is used to create the appropriate SaveOptions derived class instance that is then passed to the Save(String, SaveOptions) method.

    Exceptions
    System.InvalidOperationException

    If file extension is not specified or not supported. If file extension is not recognized, use Save(String, SaveOptions) method overload instead.

    Save(String, SaveOptions)

    Saves the document page to a file with the specified path.

    • C#
    • VB.NET
    public void Save(string path, SaveOptions options)
    Public Sub Save(path As String, options As SaveOptions)
    Parameters
    path
    System.String

    The path to which to save the document page.

    options
    SaveOptions

    The saving options which can be used to define settings for save operation.

    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.