Table of Contents

Class PdfOutlineCollection

Namespace
PdfSharp.Pdf
Assembly
PdfSharp.dll

Represents a collection of outlines.

public class PdfOutlineCollection : PdfObject, ICloneable, IList<PdfOutline>, ICollection<PdfOutline>, IEnumerable<PdfOutline>, IEnumerable
Inheritance
PdfOutlineCollection
Implements
Inherited Members

Properties

Count

Gets the number of entries in this collection.

public int Count { get; }

Property Value

int

IsReadOnly

Returns false.

public bool IsReadOnly { get; }

Property Value

bool

this[int]

Gets the PdfOutline at the specified index.

public PdfOutline this[int index] { get; set; }

Parameters

index int

Property Value

PdfOutline

Methods

Add(PdfOutline)

Adds the specified outline.

public void Add(PdfOutline outline)

Parameters

outline PdfOutline

Add(string, PdfPage)

Creates a PdfOutline and adds it into the outline collection.

public PdfOutline Add(string title, PdfPage destinationPage)

Parameters

title string
destinationPage PdfPage

Returns

PdfOutline

Add(string, PdfPage, bool)

Adds the specified outline entry.

public PdfOutline Add(string title, PdfPage destinationPage, bool opened)

Parameters

title string

The outline text.

destinationPage PdfPage

The destination page.

opened bool

Specifies whether the node is displayed expanded (opened) or collapsed.

Returns

PdfOutline

Add(string, PdfPage, bool, PdfOutlineStyle)

Adds the specified outline entry.

public PdfOutline Add(string title, PdfPage destinationPage, bool opened, PdfOutlineStyle style)

Parameters

title string

The outline text.

destinationPage PdfPage

The destination page.

opened bool

Specifies whether the node is displayed expanded (opened) or collapsed.

style PdfOutlineStyle

The font style used to draw the outline text.

Returns

PdfOutline

Add(string, PdfPage, bool, PdfOutlineStyle, XColor)

Adds the specified outline entry.

public PdfOutline Add(string title, PdfPage destinationPage, bool opened, PdfOutlineStyle style, XColor textColor)

Parameters

title string

The outline text.

destinationPage PdfPage

The destination page.

opened bool

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.

Returns

PdfOutline

Clear()

Removes all elements form the collection.

public void Clear()

Contains(PdfOutline)

Determines whether the specified element is in the collection.

public bool Contains(PdfOutline item)

Parameters

item PdfOutline

Returns

bool

CopyTo(PdfOutline[], int)

Copies the collection to an array, starting at the specified index of the target array.

public void CopyTo(PdfOutline[] array, int arrayIndex)

Parameters

array PdfOutline[]
arrayIndex int

GetEnumerator()

Returns an enumerator that iterates through the outline collection.

public IEnumerator<PdfOutline> GetEnumerator()

Returns

IEnumerator<PdfOutline>

IndexOf(PdfOutline)

Gets the index of the specified item.

public int IndexOf(PdfOutline item)

Parameters

item PdfOutline

Returns

int

Insert(int, PdfOutline)

Inserts the item at the specified index.

public void Insert(int index, PdfOutline outline)

Parameters

index int
outline PdfOutline

Remove(PdfOutline)

Removes the first occurrence of a specific item from the collection.

public bool Remove(PdfOutline item)

Parameters

item PdfOutline

Returns

bool

RemoveAt(int)

Removes the outline item at the specified index.

public void RemoveAt(int index)

Parameters

index int