Namespace: PdfSharp.Pdf
Represents a collection of outlines.
public class PdfOutlineCollection : PdfObject, System.ICloneable, System.Collections.Generic.ICollection`1[[PdfSharp.Pdf.PdfOutline, PdfSharp, Version=0.1.3.0, Culture=neutral, PublicKeyToken=null]], System.Collections.Generic.IEnumerable`1[[PdfSharp.Pdf.PdfOutline, PdfSharp, Version=0.1.3.0, Culture=neutral, PublicKeyToken=null]], System.Collections.IEnumerable, System.Collections.Generic.IList`1[[PdfSharp.Pdf.PdfOutline, PdfSharp, Version=0.1.3.0, Culture=neutral, PublicKeyToken=null]]
Inheritance Object → PdfItem → PdfObject → PdfOutlineCollection
Implements ICloneable, ICollection<PdfOutline>, IEnumerable<PdfOutline>, IEnumerable, IList<PdfOutline>
Use ‘Count > 0’ - HasOutline will throw exception.
Indicates whether the outline collection has at least one entry.
public bool HasOutline { get; }
Gets the number of entries in this collection.
public int Count { get; }
Returns false.
public bool IsReadOnly { get; }
public PdfOutline Item { 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.
Removes the first occurrence of a specific item from the collection.
public bool Remove(PdfOutline item)
item
PdfOutline
Adds the specified outline.
public void Add(PdfOutline outline)
outline
PdfOutline
Removes all elements form the collection.
public void Clear()
Determines whether the specified element is in the collection.
public bool Contains(PdfOutline item)
item
PdfOutline
Copies the collection to an array, starting at the specified index of the target array.
public void CopyTo(PdfOutline[] array, int arrayIndex)
array
PdfOutline[]
arrayIndex
Int32
Adds the specified outline entry.
public PdfOutline Add(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.
Adds the specified outline entry.
public PdfOutline Add(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.
Adds the specified outline entry.
public PdfOutline Add(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.
Creates a PdfOutline and adds it into the outline collection.
public PdfOutline Add(string title, PdfPage destinationPage)
title
String
destinationPage
PdfPage
Gets the index of the specified item.
public int IndexOf(PdfOutline item)
item
PdfOutline
Inserts the item at the specified index.
public void Insert(int index, PdfOutline outline)
index
Int32
outline
PdfOutline
Removes the outline item at the specified index.
public void RemoveAt(int index)
index
Int32
Returns an enumerator that iterates through the outline collection.
public IEnumerator<PdfOutline> GetEnumerator()
internal int CountOpen()