Table of Contents

Class PdfOutline

Namespace
iText.Kernel.Pdf
Assembly
itext.kernel.dll

Document outline object See ISO-320001, 12.3.3 Document Outline.

public class PdfOutline
Inheritance
PdfOutline
Inherited Members

Fields

FLAG_BOLD

A flag for displaying the outline item’s text with bold font.

public static int FLAG_BOLD

Field Value

int

FLAG_ITALIC

A flag for displaying the outline item’s text with italic font.

public static int FLAG_ITALIC

Field Value

int

Methods

AddAction(PdfAction)

Adds PdfAction for the outline, A key.

public virtual void AddAction(PdfAction action)

Parameters

action PdfAction

instance of PdfAction.

AddDestination(PdfDestination)

Adds PdfDestination for the outline, Dest key.

public virtual void AddDestination(PdfDestination destination)

Parameters

destination PdfDestination

instance of PdfDestination.

AddOutline(string)

Adds an PdfOutline as a child to existing PdfOutline and put it in the end of the existing PdfOutline children list.

public virtual PdfOutline AddOutline(string title)

Parameters

title string

an outline title

Returns

PdfOutline

just created outline

AddOutline(string, int)

Adds a new PdfOutline with specified parameters as a child to existing PdfOutline and put it to specified position in the existing PdfOutline children list.

public virtual PdfOutline AddOutline(string title, int position)

Parameters

title string

an outline title

position int

a position in the current outline child List where a new outline should be added. If the position equals -1, then the outline will be put in the end of children list.

Returns

PdfOutline

just created outline

AddOutline(PdfOutline)

Adds an PdfOutline as a child to existing PdfOutline and put it to the end of the existing PdfOutline children list.

public virtual PdfOutline AddOutline(PdfOutline outline)

Parameters

outline PdfOutline

an outline to add.

Returns

PdfOutline

just created outline

GetAllChildren()

Gets list of children outlines.

public virtual IList<PdfOutline> GetAllChildren()

Returns

IList<PdfOutline>

List of PdfOutline.

GetColor()

Gets color for the outline entry's text, C key.

public virtual Color GetColor()

Returns

Color

color Color.

GetContent()

Gets content dictionary.

public virtual PdfDictionary GetContent()

Returns

PdfDictionary

PdfDictionary.

GetDestination()

public virtual PdfDestination GetDestination()

Returns

PdfDestination

PdfDestination.

GetParent()

Gets parent outline.

public virtual PdfOutline GetParent()

Returns

PdfOutline

PdfOutline.

GetStyle()

Gets text style for the outline entry's text, F key.

public virtual int? GetStyle()

Returns

int?

style value.

GetTitle()

Gets title of the outline.

public virtual string GetTitle()

Returns

string

String value.

IsOpen()

Defines if the outline is open or closed.

public virtual bool IsOpen()

Returns

bool

true if open,false otherwise.

RemoveOutline()

Remove this outline from the document.

public virtual void RemoveOutline()

Remarks

Remove this outline from the document. Outlines that are children of this outline are removed recursively

SetColor(Color)

Sets color for the outline entry’s text, C key.

public virtual void SetColor(Color color)

Parameters

color Color

Color

SetOpen(bool)

Defines if the outline needs to be closed or not.

public virtual void SetOpen(bool open)

Parameters

open bool

if false, the outline will be closed by default

Remarks

Defines if the outline needs to be closed or not. By default, outlines are open.

SetStyle(int)

Sets text style for the outline entry’s text, F key.

public virtual void SetStyle(int style)

Parameters

style int

Could be either FLAG_BOLD or FLAG_ITALIC . Default value is 0.

SetTitle(string)

Sets title of the outline with UNICODE_BIG encoding, Title key.

public virtual void SetTitle(string title)

Parameters

title string

String value.