RemoveAll

Removes all the items in an object.

To

Use

Remove all the attachments in a PDF document.

Syntax 1

Remove all the items in the table of contents of a PDF document.

Syntax 2


Syntax 1: For PDFAttachment object

Description

Removes all the attachments in a PDF document.

Applies to

PDFAttachment object

Syntax

long RemoveAll()

Return value

Long. Returns 1 if succeeds and returns -1 if an error occurs. For the full list of error codes, see Error Codes.

Usage

Call the function if you want to remove all the attachments in a PDF document.

Examples

This example removes all the attachments in the PDF document.

lpdf_doc = create PDFdocument
lpdf_attach = create PDFattachment

lpdf_attach.addfolder ("D:\image",true)
lpdf_doc.attachment = lpdf_attach
ll_return = lpdf_attach.removeall( )

See also

AddFolder

AddFile

GetCount

Syntax 2: For PDFTableOfContents object

Description

Removes all items from the table of contents.

Applies to

PDFTableOfContents objects

PDFTableOfContentsItem objects

Syntax

long RemoveAll()

Return value

Long. Returns 1 if the function succeeds and -1 if an error occurs. For the full list of error codes, see Error Codes.

Usage

If calling the function for PDFTableOfContents, all the items (including their sub items) will be removed from the table of contents. If calling the function for PDFTableOfContentsItem, all the sub level items (will be removed from the table of contents item.

Syntax

The following example removes all the items (including their sub items) from the table of contents.

lpdf_toc.removeall( )

See also

AddItem

GetBottomMargin

GetFont

GetItem

GetItemCount

GetLeftMargin

GetPosByPageIndex

GetRightMargin

GetStyle

GetTitle

GetTopMargin

RemoveItem

SetBottomMargin

SetFont

SetLeftMargin

SetPosByPageIndex

SetRightMargin

SetStyle

SetTitle

SetTopMargin