PdfOutlineItem Class

An item of the document outline, a bookmark (ISO 32000-2, 12.3.3).

public sealed class PdfOutlineItem

Constructors

NameDescription
PdfOutlineItem(string, PdfDestination?)Initializes a new instance of the PdfOutlineItem class.

PdfOutlineItem(string, PdfDestination?)

PdfOutlineItem.cs

Initializes a new instance of the PdfOutlineItem class.

public PdfOutlineItem(string title, PdfDestination? destination = null)

Parameters

title string
The text of the item.
destination PdfDestination?
The destination, or null.

Properties

NameDescription
ActionGets or sets the action of the item (/A, ISO 32000-2, 12.6) when it is not a destination, such as opening a URI or running a named action; null when the item has a PdfOutlineItem.Destination or nothing. Setting an action removes the destination. The action is written when the document is saved.
ChildrenGets the children of the item.
ColorGets or sets the color of the text (PDF 1.4), or null for black. It must be an RGB color.
DestinationGets or sets the destination, or null when the item has none or has an action of another kind. Setting a destination removes the PdfOutlineItem.Action.
IsBoldGets or sets a value indicating whether the text is bold (PDF 1.4).
IsItalicGets or sets a value indicating whether the text is italic (PDF 1.4).
IsOpenGets or sets a value indicating whether the children of the item are shown when the document is opened.
TitleGets or sets the text of the item.

Gets or sets the action of the item (/A, ISO 32000-2, 12.6) when it is not a destination, such as opening a URI or running a named action; null when the item has a PdfOutlineItem.Destination or nothing. Setting an action removes the destination. The action is written when the document is saved.

public PdfAction? Action { get; set; }

Property value

PdfAction?

Gets the children of the item.

public PdfOutlineCollection Children { get; }

Property value

PdfOutlineCollection

Gets or sets the color of the text (PDF 1.4), or null for black. It must be an RGB color.

public PdfColor? Color { get; set; }

Property value

PdfColor?

Exceptions

ArgumentException
The color is not an RGB color.

Gets or sets the destination, or null when the item has none or has an action of another kind. Setting a destination removes the PdfOutlineItem.Action.

public PdfDestination? Destination { get; set; }

Property value

PdfDestination?

Gets or sets a value indicating whether the text is bold (PDF 1.4).

public bool IsBold { get; set; }

Property value

bool

Gets or sets a value indicating whether the text is italic (PDF 1.4).

public bool IsItalic { get; set; }

Property value

bool

Gets or sets a value indicating whether the children of the item are shown when the document is opened.

public bool IsOpen { get; set; }

Property value

bool

Gets or sets the text of the item.

public string Title { get; set; }

Property value

string