PDFTableOfContentsItem object

PDFTableOfContentsItem is one of the PDF Builder objects, and is derived from PDFModel. PDFTableOfContents and PDFTableOfContentsItem work together to manage the table of contents of a PDF document:

  • PDFTableOfContents is the container for the PDFTableOfContentsItem objects.

  • The first-level items (chapters, which are PDFTableOfContentsItem objects) in the table of contents are added using the PDFTableOfContents.AddItem, and the functions in PDFTableOfContent only work on the first-level items in the table of contents.

  • The sub-level items (chapters) in the table of contents are added using the PDFTableOfContentsItem.AddItem.

  • The indexes of the items are auto generated, and are structured by levels. For example, the level-1 chapters start their index at 1; and the sub-items in each chapter start their index at 1 too.

To view the full hierarchy of the PDF Builder objects, find "pdfobject" in the Browser, right-click the object, and then select "Show Hierarchy” in the pop-up menu.

Properties

PDFTableOfContentsItem provides the following property.

PDFTableOfContentsItem property

Datatype

Description

ClassDefinition

PowerObject

An object of type PowerObject containing information about the class definition of the object or control.


Events

PDFTableOfContentsItem event

Occurs

Constructor

Immediately before the Open event occurs in the window.

Destructor

Immediately after the Close event occurs in the window.


Functions

PDFTableOfContentsItem provides the following functions.

PDFTableOfContentsItem function

Datatype returned

Description

AddItem

PDFTableOfContentsItem

Add a table of contents item.

ClassName

String

Returns the name assigned to the object.

GetChapterObject

PDFModel

Gets the chapter object in the table of contents.

GetChapterTitle

String

Gets the chapter title in the table of contents.

GetContextService

Integer

Creates a reference to a context-specific instance of the specified service.

GetItem

PDFTableOfContentsItem

Gets a table of contents item.

GetItemCount

Long

Gets the count of table of contents items.

GetFont

PDFFont

Gets the fond of a table of contents item.

GetParent

PowerObject

Returns a reference to the name of the parent object.

PostEvent

Boolean

Adds an event to the end of the message queue for the control.

RemoveAll

Long

Removes all table of contents items.

RemoveItem

Long

Removes a table of contents item.

SetFont

None

Sets the fond of a table of contents item.

TriggerEvent

Integer

Triggers a specified event in the control and executes the script for the event.

TypeOf

Object

Returns the type of the control.