PDFOUTLINENODE_GetSubItem
IPDFDocument3 :: Outlines

See Also Example
Collapse All

This method returns the child node by position.

Syntax

LONG PDFOUTLINENODE_GetSubItem (
LONG parentNodeIndex
)
Parameters
parentNodeIndex
Index of a node's position

Remarks

This method provides access to a child node by its position in the list of child nodes. The first child node has an index of 0, the second an index of 1, and so on.

Equivalent in new interface: IPDFDocument4::GetOutlineChild.

Example

How to Get a Child Node Using Position Index

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.BeginDoc;
lAction := PDF.CreateGoToPageAction(0, 0);
ind1 := PDF.PDFOUTLINES_Add(0, 'Outline 1', lAction, charsetANSI_CHARSET);
ind2 := PDF.PDFOUTLINES_AddChild(ind1, 'Outline 2', lAction, charsetANSI_CHARSET);
ind3 := PDF.PDFOUTLINES_AddChild(ind1, 'Outline 3', lAction, charsetANSI_CHARSET);
ind4 := PDF.PDFOUTLINES_AddChild(ind1, 'Outline 4', lAction, charsetANSI_CHARSET);
PDF.SetCurrentPDFOutlineNode(ind1);
i := PDF.PDFOUTLINENODE_GetSubItem(1);
{ i = ind3 }
PDF.EndDoc;
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->BeginDoc();
LONG lAction = PDF->CreateGoToPageAction(0, 0);
LONG ind1 = PDF->PDFOUTLINES_Add(0, "Outline 1", lAction, charsetANSI_CHARSET);
LONG ind2 = PDF->PDFOUTLINES_AddChild(ind1, "Outline 2", lAction, charsetANSI_CHARSET);
LONG ind3 = PDF->PDFOUTLINES_AddChild(ind1, "Outline 3", lAction, charsetANSI_CHARSET);
LONG ind4 = PDF->PDFOUTLINES_AddChild(ind1, "Outline 4", lAction, charsetANSI_CHARSET);
PDF->SetCurrentPDFOutlineNode(ind1);
LONG i = PDF->PDFOUTLINENODE_GetSubItem(1);
// i == ind3
PDF->EndDoc();
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.BeginDoc();
long lAction = PDF.CreateGoToPageAction(0, 0);
long ind1 = PDF.PDFOUTLINES_Add(0, "Outline 1", lAction, TxFontCharset.charsetANSI_CHARSET);
long ind2 = PDF.PDFOUTLINES_AddChild(ind1, "Outline 2", lAction, TxFontCharset.charsetANSI_CHARSET);
long ind3 = PDF.PDFOUTLINES_AddChild(ind1, "Outline 3", lAction, TxFontCharset.charsetANSI_CHARSET);
long ind4 = PDF.PDFOUTLINES_AddChild(ind1, "Outline 4", lAction, TxFontCharset.charsetANSI_CHARSET);
PDF.SetCurrentPDFOutlineNode(ind1);
long i = PDF.PDFOUTLINENODE_GetSubItem(1);
// i == ind3
PDF.EndDoc();
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.BeginDoc
lAction = PDF.CreateGoToPageAction(0, 0)
ind1 = PDF.PDFOUTLINES_Add(0, "Outline 1", lAction, 0)
ind2 = PDF.PDFOUTLINES_AddChild(ind1, "Outline 2", lAction, 0)
ind3 = PDF.PDFOUTLINES_AddChild(ind1, "Outline 3", lAction, 0)
ind4 = PDF.PDFOUTLINES_AddChild(ind1, "Outline 4", lAction, 0)
PDF.SetCurrentPDFOutlineNode ind1
i = PDF.PDFOUTLINENODE_GetSubItem(1)
' i = ind3
PDF.EndDoc

See Also

Reference