PDFTableOfContents object

PDFTableOfContents 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.

  • PDFTableOfContents currently does not support the language (such as Arabic, Hebrew etc.) displayed in the right-to-left order.

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

PDFTableOfContents provides the following property. In addition, it inherits the properties from its parent, PDFModel.

PDFTableOfContents property

Datatype

Description

ClassDefinition

PowerObject

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

BottomMargin

Double

Gets or sets the size of the bottom margin between the table of contents and the printed page.

LeftMargin

Double

Gets or sets the size of the left margin between the table of contents and the printed page.

RightMargin

Double

Gets or sets the size of the right margin between the table of contents and the printed page.

TopMargin

Double

Gets or sets the size of the top margin between the table of contents and the printed page.


Events

PDFTableOfContents event

Occurs

Constructor

Immediately before the Open event occurs in the window.

Destructor

Immediately after the Close event occurs in the window.


Functions

PDFTableOfContents provides the following functions.

PDFTableOfContents function

Datatype returned

Description

AddFallbackFont

None

Adds a fallback font.

AddItem

PDFTableOfContentsItem

Adds an item to the table of contents.

ClassName

String

Returns the name assigned to the control.

GetBottomMargin

Double

Gets the bottom margin between the table of contents and the bottom border of the page.

GetContextService

Integer

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

GetFallbackFont

String

Gets the name of the fallback font.

GetFallbackFontCount

Long

Gets the count of the fallback fonts.

GetFont

PDFFont

Gets the font of the title in the table of contents.

GetItem

PDFTableOfContentsItem

Gets the specified item in the table of contents.

GetItemCount

Long

Gets the count of items in the table of contents.

GetLeftMargin

Double

Gets the margin between the table of contents and the left border of the page.

GetParent

PowerObject

Returns a reference to the name of the parent object.

GetPosByPageIndex

Long

Gets the page index of the table of contents in the PDF document.

GetRightMargin

Double

Gets the margin between the table of contents and the right border of the page.

GetStyle

PDFTableOfContentsStyle

Gets the display style of the table of contents.

GetTitle

PDFText

Gets the title in the table of contents.

GetTopMargin

Double

Gets the top margin between the table of contents and the top border of the page.

PostEvent

Boolean

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

RemoveAll

Long

Removes all the items from the table of contents.

RemoveAllFallbackFont

Long

Removes all fallback fonts.

RemoveFallbackFont

Long

Removes a fallback font.

RemoveItem

Long

Removes an item from the table of contents.

SetBottomMargin

None

Sets the margin between the table of contents and the bottom border of the page.

SetFont

None

Sets the font to use for the title in the table of contents.

SetLeftMargin

None

Sets the margin between the table of contents and the left border of the page.

SetPosByPageIndex

None

Sets the page index of the table of contents in the PDF document.

SetRightMargin

None

Sets the margin between the table of contents and the right border of the page.

SetStyle

None

Sets the display style of the table of contents.

SetTitle

None

Sets the title of the table of contents.

SetTopMargin

None

Sets the margin between the table of contents and the top border of the page.

TriggerEvent

Integer

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

TypeOf

Object

Returns the type of the control.