Components for Developers
© 2000-2012, Two Pilots

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF-X Pilot History In the Lab

PDF Creator Pilot documentation

Download CHM version of this manual.
Outlines
SetCurrentPDFOutlineNode

See Also Example
Collapse All

This method activates a node for PDFOUTLINENODE operations.

Syntax

HRESULT SetCurrentPDFOutlineNode (
LONG nodeIndex
)
Parameters
nodeIndex
Index of a node

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

Remarks

This method sets the outline node index which can be subsequently operated on by any of the PDFOUTLINENODE_* commands.

Example

How to Set the Current Outline Node

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_Add(0, 'Outline 2', lAction, charsetANSI_CHARSET);
ind3 := PDF.PDFOUTLINES_Add(0, 'Outline 3', lAction, charsetANSI_CHARSET);
PDF.SetCurrentPDFOutlineNode(ind2);
PDF.PDFOUTLINENODE_Title := '[Outline 2]';
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_Add(0, "Outline 2", lAction, charsetANSI_CHARSET);
LONG ind3 = PDF->PDFOUTLINES_Add(0, "Outline 3", lAction, charsetANSI_CHARSET);
PDF->SetCurrentPDFOutlineNode(ind2);
PDF->PDFOUTLINENODE_Title = "[Outline 2]";
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_Add(0, "Outline 2", lAction, TxFontCharset.charsetANSI_CHARSET);
long ind3 = PDF.PDFOUTLINES_Add(0, "Outline 3", lAction, TxFontCharset.charsetANSI_CHARSET);
PDF.SetCurrentPDFOutlineNode(ind2);
PDF.PDFOUTLINENODE_Title = "[Outline 2]";
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_Add(0, "Outline 2", lAction, 0)
ind3 = PDF.PDFOUTLINES_Add(0, "Outline 3", lAction, 0)
PDF.SetCurrentPDFOutlineNode ind2
PDF.PDFOUTLINENODE_Title = "[Outline 2]"
PDF.EndDoc

See Also

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF-X Pilot History In the Lab

 

 

PDF Library | Virtual Printer | Converters to PDF

Support | Blog | Forum | Contacts

© 2000-2012, Two Pilots