iText 7 7.1.9 API
iText.Kernel.Pdf.PdfOutline Class Reference

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

Public Member Functions

virtual String  GetTitle ()
  Gets title of the outline. More...
 
virtual void  SetTitle (String title)
  Sets title of the outline with iText.IO.Font.PdfEncodings.UNICODE_BIG encoding, Title key. More...
 
virtual void  SetColor (Color color)
  Sets color for the outline entry’s text, C key. More...
 
virtual void  SetStyle (int style)
  Sets text style for the outline entry’s text, F key. More...
 
virtual PdfDictionary  GetContent ()
  Gets content dictionary. More...
 
virtual IList< iText.Kernel.Pdf.PdfOutline GetAllChildren ()
  Gets list of children outlines. More...
 
virtual iText.Kernel.Pdf.PdfOutline  GetParent ()
  Gets parent outline. More...
 
virtual PdfDestination  GetDestination ()
  Gets iText.Kernel.Pdf.Navigation.PdfDestination. More...
 
virtual void  AddDestination (PdfDestination destination)
  Adds iText.Kernel.Pdf.Navigation.PdfDestination for the outline, Dest key. More...
 
virtual void  AddAction (PdfAction action)
  Adds iText.Kernel.Pdf.Action.PdfAction for the outline, A key. More...
 
virtual void  SetOpen (bool open)
  Defines if the outline needs to be closed or not. More...
 
virtual iText.Kernel.Pdf.PdfOutline  AddOutline (String title, int position)
  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. More...
 
virtual iText.Kernel.Pdf.PdfOutline  AddOutline (String title)
  Adds an PdfOutline as a child to existing PdfOutline and put it in the end of the existing PdfOutline children list. More...
 
virtual iText.Kernel.Pdf.PdfOutline  AddOutline (iText.Kernel.Pdf.PdfOutline outline)
  Adds an PdfOutline as a child to existing PdfOutline and put it to the end of the existing PdfOutline children list. More...
 

Static Public Attributes

static int  FLAG_ITALIC = 1
  A flag for displaying the outline item’s text with italic font. More...
 
static int  FLAG_BOLD = 2
  A flag for displaying the outline item’s text with bold font. More...
 

Detailed Description

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

Member Function Documentation

◆ AddAction()

virtual void iText.Kernel.Pdf.PdfOutline.AddAction ( PdfAction  action )
inlinevirtual

Adds iText.Kernel.Pdf.Action.PdfAction for the outline, A key.

Parameters
action instance of iText.Kernel.Pdf.Action.PdfAction.

◆ AddDestination()

virtual void iText.Kernel.Pdf.PdfOutline.AddDestination ( PdfDestination  destination )
inlinevirtual

Adds iText.Kernel.Pdf.Navigation.PdfDestination for the outline, Dest key.

Parameters
destination instance of iText.Kernel.Pdf.Navigation.PdfDestination.

◆ AddOutline() [1/3]

virtual iText.Kernel.Pdf.PdfOutline iText.Kernel.Pdf.PdfOutline.AddOutline ( iText.Kernel.Pdf.PdfOutline  outline )
inlinevirtual

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

Parameters
outline an outline to add.
Returns
just created outline

◆ AddOutline() [2/3]

virtual iText.Kernel.Pdf.PdfOutline iText.Kernel.Pdf.PdfOutline.AddOutline ( String  title )
inlinevirtual

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

Parameters
title an outline title
Returns
just created outline

◆ AddOutline() [3/3]

virtual iText.Kernel.Pdf.PdfOutline iText.Kernel.Pdf.PdfOutline.AddOutline ( String  title,
int  position 
)
inlinevirtual

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.

Parameters
title an outline title
position 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
just created outline

◆ GetAllChildren()

virtual IList<iText.Kernel.Pdf.PdfOutline> iText.Kernel.Pdf.PdfOutline.GetAllChildren ( )
inlinevirtual

Gets list of children outlines.

Returns
List of PdfOutline.

◆ GetContent()

virtual PdfDictionary iText.Kernel.Pdf.PdfOutline.GetContent ( )
inlinevirtual

Gets content dictionary.

Returns

PdfDictionary.

◆ GetDestination()

virtual PdfDestination iText.Kernel.Pdf.PdfOutline.GetDestination ( )
inlinevirtual

◆ GetParent()

virtual iText.Kernel.Pdf.PdfOutline iText.Kernel.Pdf.PdfOutline.GetParent ( )
inlinevirtual

Gets parent outline.

Returns

PdfOutline.

◆ GetTitle()

virtual String iText.Kernel.Pdf.PdfOutline.GetTitle ( )
inlinevirtual

Gets title of the outline.

Returns
String value.

◆ SetColor()

virtual void iText.Kernel.Pdf.PdfOutline.SetColor ( Color  color )
inlinevirtual

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

Parameters
color

iText.Kernel.Colors.Color

◆ SetOpen()

virtual void iText.Kernel.Pdf.PdfOutline.SetOpen ( bool  open )
inlinevirtual

Defines if the outline needs to be closed or not.

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

Parameters
open if false, the outline will be closed by default

◆ SetStyle()

virtual void iText.Kernel.Pdf.PdfOutline.SetStyle ( int  style )
inlinevirtual

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

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

◆ SetTitle()

virtual void iText.Kernel.Pdf.PdfOutline.SetTitle ( String  title )
inlinevirtual

Sets title of the outline with iText.IO.Font.PdfEncodings.UNICODE_BIG encoding, Title key.

Parameters
title String value.

Member Data Documentation

◆ FLAG_BOLD

int iText.Kernel.Pdf.PdfOutline.FLAG_BOLD = 2
static

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

◆ FLAG_ITALIC

int iText.Kernel.Pdf.PdfOutline.FLAG_ITALIC = 1
static

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