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

    Show / Hide Table of Contents

    PdfOutline Class

    Namespace:
    GemBox.Pdf
    Assembly:
    GemBox.Pdf.dll

    A PDF document may contain a document outline that the conforming reader may display on the screen, allowing the user to navigate interactively from one part of the document to another. The outline consists of a tree-structured hierarchy of outline items (sometimes called bookmarks), which serve as a visual table of contents to display the document's structure to the user.

    PdfOutline represents a single outline item that is a node in the doubly linked list of outline items represented by PdfOutlineCollection.

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

    Properties

    Actions

    (Optional; PDF 1.1; shall not be present if a Dest entry is present) The action that shall be performed when this item is activated (see 12.6, "Actions").

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

    The action that shall be performed when this item is activated.

    Closed

    Gets or sets a value indicating whether this PdfOutline is closed.

    • C#
    • VB.NET
    public bool Closed { get; set; }
    Public Property Closed As Boolean
    Property Value
    System.Boolean

    true if PdfOutline is closed; otherwise, false.

    Destination

    (Optional; shall not be present if an A entry is present) The destination that shall be displayed when this item is activated (see 12.3.2, "Destinations").

    • C#
    • VB.NET
    public PdfDestination Destination { get; set; }
    Public Property Destination As PdfDestination
    Property Value
    PdfDestination

    The explicit destination that shall be displayed when this item is activated.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.3.2 Destinations'

    DestinationName

    (Optional; shall not be present if an A entry is present) The named destination that shall be displayed when this item is activated (see 12.3.2.3, "Named Destinations").

    • C#
    • VB.NET
    public string DestinationName { get; set; }
    Public Property DestinationName As String
    Property Value
    System.String

    The named destination that shall be displayed when this item is activated.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.3.2.3 Named Destinations'

    Next

    (Required for all but the last item at each level; shall be an indirect reference) The next item at this outline level.

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

    The next item at this outline level.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.3.3 Document Outline'

    Outlines

    Gets the PdfOutlines contained directly under this PdfOutline.

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

    The PdfOutlines contained directly under this PdfOutline.

    Parent

    Gets the parent PdfOutline of this PdfOutline in the outline hierarchy.

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

    The parent PdfOutline of this PdfOutline in the outline hierarchy.

    ParentCollection

    Gets the PdfOutlineCollection that the PdfOutline belongs to.

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

    The PdfOutlineCollection that the PdfOutline belongs to.

    Previous

    (Required for all but the first item at each level; shall be an indirect reference) The previous item at this outline level.

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

    The previous item at this outline level.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.3.3 Document Outline'

    Title

    (Required) The text that shall be displayed on the screen for this item.

    • C#
    • VB.NET
    public string Title { get; set; }
    Public Property Title As String
    Property Value
    System.String

    The text that shall be displayed on the screen for this item.

    Exceptions
    System.ArgumentNullException

    Value is null.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.3.3 Document Outline'

    Methods

    SetDestination(PdfPage, PdfDestinationViewType, Nullable<Double>[])

    Sets the explicit destination that shall be displayed when this item is activated (see 12.3.2.2, "Explicit Destinations").

    parameters represent the following values depending on the viewType parameter:

    • FitRectangle

      Left, Bottom, Right and Top.

    • LeftTopZoom

      Left, Top and Zoom.

    • FitPageVertical and FitContentVertical Left.
    • FitPageHorizontal and FitContentHorizontal Top.
    • FitPage and FitContentNone.

    • C#
    • VB.NET
    public PdfDestination SetDestination(PdfPage page, PdfDestinationViewType viewType, params double? [] parameters)
    Public Function SetDestination(page As PdfPage, viewType As PdfDestinationViewType, ParamArray parameters As Double?()) As PdfDestination
    Parameters
    page
    PdfPage

    The page that shall be displayed when this item is activated.

    viewType
    PdfDestinationViewType

    Type of the view.

    parameters
    System.Nullable<System.Double>[]

    The parameters of the view.

    Returns
    PdfDestination

    The explicit destination that shall be displayed when this item is activated.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.3.2.2 Explicit Destinations'

    ToString()

    Returns a System.String that represents this PdfOutline instance.

    • C#
    • VB.NET
    public override string ToString()
    Public Overrides Function ToString As String
    Returns
    System.String

    A System.String that represents this PdfOutline instance.

    Overrides
    System.Object.ToString()
    Remarks

    This method should be used primarily for debugging purposes and should be considered volatile (format of its return value might change in future versions).

    Inherited Properties

    Metadata

    (Optional; PDF 1.4) A metadata stream containing metadata for the component.

    (Inherited from PdfObject)

    Extension Methods

    PdfObjectExtensions.GetDictionary(PdfObject)
    PdfObjectExtensions.GetOrAddDictionary(PdfObject)
    PdfObjectExtensions.GetArray(PdfObject)

    Examples

    Outlines example

    See Also

    PDF Specification ISO 32000-1:2008, section '12.3.3 Document Outline'
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.