PDFOUTLINES_Delete
IPDFDocument3 :: Outlines

See Also Example
Collapse All

This method deletes a node from an outline tree.

Syntax

HRESULT PDFOUTLINES_Delete (
LONG nodeIndex
)
Parameters
nodeIndex
Index of the node to delete

Return value
If successful, this method returns S_OK. If it fails, this method should return one of the error values.

Remarks

This method removes a node from the tree of the outline items.

The node index can be retrieved from methods PDFOUTLINES_Add, PDFOUTLINES_AddChild, PDFOUTLINES_AddFirst, PDFOUTLINES_Insert.

Equivalent in new interface: IPDFDocument4::DeleteOutline.

Example

Deleting an Outline Node

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.BeginDoc;
lAction := PDF.CreateGoToPageAction(0, 0);
o1 := PDF.PDFOUTLINES_Add(0, 'Outline1', lAction, charsetANSI_CHARSET);
o2 := PDF.PDFOUTLINES_AddChild(o1, 'Outline2', lAction, charsetANSI_CHARSET);
o3 := PDF.PDFOUTLINES_Add(0, 'Outline3', lAction, charsetANSI_CHARSET);
o4 := PDF.PDFOUTLINES_AddChild(o3, 'Outline4', lAction, charsetANSI_CHARSET);
o5 := PDF.PDFOUTLINES_AddChild(o3, 'Outline5', lAction, charsetANSI_CHARSET);
PDF.PDFOUTLINES_Delete(o1);
PDF.EndDoc;
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->BeginDoc();
LONG lAction = PDF->CreateGoToPageAction(0, 0);
LONG o1 = PDF->PDFOUTLINES_Add(0, "Outline1", lAction, charsetANSI_CHARSET);
LONG o2 = PDF->PDFOUTLINES_AddChild(o1, "Outline2", lAction, charsetANSI_CHARSET);
LONG o3 = PDF->PDFOUTLINES_Add(0, "Outline3", lAction, charsetANSI_CHARSET);
LONG o4 = PDF->PDFOUTLINES_AddChild(o3, "Outline4", lAction, charsetANSI_CHARSET);
LONG o5 = PDF->PDFOUTLINES_AddChild(o3, "Outline5", lAction, charsetANSI_CHARSET);
PDF->PDFOUTLINES_Delete(o1);
PDF.EndDoc();
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.BeginDoc();
long lAction = PDF.CreateGoToPageAction(0, 0);
long o1 = PDF.PDFOUTLINES_Add(0, "Outline1", lAction, TxFontCharset.charsetANSI_CHARSET);
long o2 = PDF.PDFOUTLINES_AddChild(o1, "Outline2", lAction, TxFontCharset.charsetANSI_CHARSET);
long o3 = PDF.PDFOUTLINES_Add(0, "Outline3", lAction, TxFontCharset.charsetANSI_CHARSET);
long o4 = PDF.PDFOUTLINES_AddChild(o3, "Outline4", lAction, TxFontCharset.charsetANSI_CHARSET);
long o5 = PDF.PDFOUTLINES_AddChild(o3, "Outline5", lAction, TxFontCharset.charsetANSI_CHARSET);
PDF.PDFOUTLINES_Delete(o1);
PDF.EndDoc();
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.BeginDoc
lAction = PDF.CreateGoToPageAction(0, 0)
o1 = PDF.PDFOUTLINES_Add(0, "Outline1", lAction, 0)
o2 = PDF.PDFOUTLINES_AddChild(o1, "Outline2", lAction, 0)
o3 = PDF.PDFOUTLINES_Add(0, "Outline3", lAction, 0)
o4 = PDF.PDFOUTLINES_AddChild(o3, "Outline4", lAction, 0)
o5 = PDF.PDFOUTLINES_AddChild(o3, "Outline5", lAction, 0)
PDF.PDFOUTLINES_Delete o1
PDF.EndDoc

See Also

Reference