Removes a specified item.
Description
Removes an item from the table of contents.
Applies to
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
Description
Removes a specified item.
Applies to
Syntax
long RemoveItem(string itemText)
Return value
Long. Returns 1 if it succeeds. If an error occurs, returns the Error Codes. Otherwise, returns null.
Example
The following code example removes the item at the index 1 in the PDFFormFieldComboBox object lpdf_combobox.
string ls_text long ll_return ,ll_return1 ls_text = lpdf_combobox.getitem(1) //Remove the item ll_return1 = lpdf_combobox.removeitem(ls_text)
See also