PDFOUTLINENODE_GetPrevSibling
IPDFDocument3 :: Outlines

See Also Example
Collapse All

This method returns the previous node on the same level.

Syntax

LONG PDFOUTLINENODE_GetPrevSibling ()
Return value
Index of the previous sibling node

Remarks

This method returns the previous node at the same level of the current node.

Equivalent in new interface: IPDFDocument4::GetPrevSiblingOutline.

Example

Finding Sibling Nodes

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_Add(0, 'Outline 3', lAction, charsetANSI_CHARSET);
i := PDF.PDFOUTLINENODE_GetPrevSibling;
{ i = ind1, not ind2 }
PDF.SetCurrentPDFOutlineNode(ind1);
i := PDF.PDFOUTLINENODE_GetNextSibling;
{ i = ind3, not ind2 }
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_Add(0, "Outline 3", lAction, charsetANSI_CHARSET);
LONG i = PDF->PDFOUTLINENODE_GetPrevSibling();
// i == ind1, not ind2
PDF->SetCurrentPDFOutlineNode(ind1);
i = PDF->PDFOUTLINENODE_GetNextSibling();
// i == ind3, not ind2
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_Add(0, "Outline 3", lAction, TxFontCharset.charsetANSI_CHARSET);
long i = PDF.PDFOUTLINENODE_GetPrevSibling();
// i == ind1, not ind2
PDF.SetCurrentPDFOutlineNode(ind1);
i = PDF.PDFOUTLINENODE_GetNextSibling();
// i == ind3, not ind2
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_Add(0, "Outline 3", lAction, 0)
i = PDF.PDFOUTLINENODE_GetPrevSibling
' i = ind1, not ind2
PDF.SetCurrentPDFOutlineNode ind1
i = PDF.PDFOUTLINENODE_GetNextSibling
' i = ind3, not ind2
PDF.EndDoc

See Also

Reference