Namespace: PdfSharp.Pdf
Represents an outline item in the outlines tree. An ‘outline’ is also known as a ‘bookmark’.
public sealed class PdfOutline : PdfDictionary, System.ICloneable, System.Collections.Generic.IEnumerable`1[[System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[PdfSharp.Pdf.PdfItem, PdfSharp, Version=0.1.3.0, Culture=neutral, PublicKeyToken=null]], System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Collections.IEnumerable
Inheritance Object → PdfItem → PdfObject → PdfDictionary → PdfOutline
Implements ICloneable, IEnumerable<KeyValuePair<String, PdfItem>>, IEnumerable
Gets the parent of this outline item. The root item has no parent and returns null.
public PdfOutline Parent { get; internal set; }
Gets or sets the title.
public string Title { get; set; }
Gets or sets the destination page.
public PdfPage DestinationPage { get; set; }
Gets or sets the left position of the page positioned at the left side of the window. Applies only if PageDestinationType is Xyz, FitV, FitR, or FitBV.
public Nullable<double> Left { get; set; }
Gets or sets the top position of the page positioned at the top side of the window. Applies only if PageDestinationType is Xyz, FitH, FitR, ob FitBH.
public Nullable<double> Top { get; set; }
Gets or sets the right position of the page positioned at the right side of the window. Applies only if PageDestinationType is FitR.
public double Right { get; set; }
Gets or sets the bottom position of the page positioned at the bottom side of the window. Applies only if PageDestinationType is FitR.
public double Bottom { get; set; }
Gets or sets the zoom faction of the page. Applies only if PageDestinationType is Xyz.
public Nullable<double> Zoom { get; set; }
Gets or sets whether the outline item is opened (or expanded).
public bool Opened { get; set; }
Gets or sets the style of the outline text.
public PdfOutlineStyle Style { get; set; }
Gets or sets the type of the page destination.
public PdfPageDestinationType PageDestinationType { get; set; }
Gets or sets the color of the text.
public XColor TextColor { get; set; }
XColor
The color of the text.
Gets a value indicating whether this outline object has child items.
public bool HasChildren { get; }
Gets the outline collection of this node.
public PdfOutlineCollection Outlines { get; }
Gets the dictionary containing the elements of this dictionary.
public DictionaryElements Elements { get; }
Gets or sets the PDF stream belonging to this dictionary. Returns null if the dictionary has no stream. To create the stream, call the CreateStream function.
public PdfStream Stream { get; set; }
Gets the PdfDocument this object belongs to.
public PdfDocument Owner { get; }
Indicates whether the object is an indirect object.
public bool IsIndirect { get; }
Gets the PdfInternals object of this document, that grants access to some internal structures which are not part of the public interface of PdfDocument.
public PdfObjectInternals Internals { get; }
Gets the indirect reference of this object. If the value is null, this object is a direct object.
public PdfReference Reference { get; internal set; }
Gets the indirect reference of this object. Throws if it is null.
public PdfReference ReferenceNotNull { get; }
InvalidOperationException
The indirect reference must be not null here.
Initializes a new instance of the PdfOutline class.
public PdfOutline()
Initializes a new instance from an existing dictionary. Used for object type transformation.
public PdfOutline(PdfDictionary dict)
dict
PdfDictionary
Initializes a new instance of the PdfOutline class.
public PdfOutline(string title, PdfPage destinationPage, bool opened, PdfOutlineStyle style, XColor textColor)
title
String
The outline text.
destinationPage
PdfPage
The destination page.
opened
Boolean
Specifies whether the node is displayed expanded (opened) or collapsed.
style
PdfOutlineStyle
The font style used to draw the outline text.
textColor
XColor
The color used to draw the outline text.
Initializes a new instance of the PdfOutline class.
public PdfOutline(string title, PdfPage destinationPage, bool opened, PdfOutlineStyle style)
title
String
The outline text.
destinationPage
PdfPage
The destination page.
opened
Boolean
Specifies whether the node is displayed expanded (opened) or collapsed.
style
PdfOutlineStyle
The font style used to draw the outline text.
Initializes a new instance of the PdfOutline class.
public PdfOutline(string title, PdfPage destinationPage, bool opened)
title
String
The outline text.
destinationPage
PdfPage
The destination page.
opened
Boolean
Specifies whether the node is displayed expanded (opened) or collapsed.
Initializes a new instance of the PdfOutline class.
public PdfOutline(string title, PdfPage destinationPage)
title
String
The outline text.
destinationPage
PdfPage
The destination page.
Counts the open outline items. Not yet used.
internal int CountOpen()
Creates key/values pairs according to the object structure.
internal void PrepareForSave()
internal void WriteObject(PdfWriter writer)
writer
PdfWriter