RemoveItem

Description

Removes an item from the table of contents.

Applies to

PDFTableOfContents objects

PDFTableOfContentsItem objects

Syntax

long RemoveItem(PDFTableOfContentsItem item)
long RemoveItem(long index)

Argument

Description

item

The item to be removed from the table of contents.

index The index of the item to be removed from the table of contents. The indexes of the items in a table of contents 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.

Return value

Long. Returns 1 if the function succeeds and -1 if an error occurs. For more errors, see the Error Codes.

Usage

Use this syntax to remove an item from the table of contents.

Examples

The following example removes the newly created item from the table of contents:

PDFtableofcontentsitem lpdf_tocitem
lpdf_tocitem = create PDFtableofcontentsitem

lpdf_toc.removeitem(  lpdf_tocitem)

See also

AddItem

GetBottomMargin

GetFont

GetItem

GetItemCount

GetLeftMargin

GetPosByPageIndex

GetRightMargin

GetStyle

GetTitle

GetTopMargin

RemoveItem

SetBottomMargin

SetFont

SetLeftMargin

SetPosByPageIndex

SetRightMargin

SetStyle

SetTitle

SetTopMargin