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
PDFOUTLINES_Insert

See Also Example
Collapse All

This method inserts a new tree node into a tree of the outline items.

Syntax

LONG PDFOUTLINES_Insert (
LONG nodeIndex,
BSTR nodeTitle,
LONG actionIndex,
TxFontCharset charset
)
Parameters
nodeIndex
Index of the node that the new node is to be inserted before

nodeTitle
Title of the new node

actionIndex
Action index of the new node

charset
Character set (code page) of the new node

Return value
Index of the new node

Remarks

This method adds a new node to a tree before the node specified by the nodeIndex parameter. Use PDFOUTLINES_AddFirst and PDFOUTLINES_Add to add node as the first or last sibling of the node specified by the nodeIndex parameter.

This method returns the node that has been added. An action (with an index specified by actionIndex) executes when a user clicks the created node. The created node contains the nodeTitle parameter as the node's text in a charset code page.

Equivalent in new interface: IPDFDocument4::AddOutlineBefore, IPDFDocument4::AddUnicodeOutlineBefore.

Example

Insert node example

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.BeginDoc;
lAction := PDF.CreateGoToPageAction(0, 0);
PDF.PDFOUTLINES_Add(0, 'Outline 1', lAction, charsetANSI_CHARSET);
PDF.PDFOUTLINES_Add(0, 'Outline 2', lAction, charsetANSI_CHARSET);
PDF.PDFOUTLINES_Add(0, 'Outline 3', lAction, charsetANSI_CHARSET);
PDF.PDFOUTLINES_Add(0, 'Outline 4', lAction, charsetANSI_CHARSET;
i := PDF.PDFOUTLINES_Add(0, 'Outline 5', lAction, charsetANSI_CHARSET);
PDF.PDFOUTLINES_Insert(i, 'Outline 4.5', lAction, charsetANSI_CHARSET);
PDF.EndDoc;
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->BeginDoc();
LONG lAction = PDF->CreateGoToPageAction(0, 0);
PDF->PDFOUTLINES_Add(0, "Outline 1", lAction, charsetANSI_CHARSET);
PDF->PDFOUTLINES_Add(0, "Outline 2", lAction, charsetANSI_CHARSET);
PDF->PDFOUTLINES_Add(0, "Outline 3", lAction, charsetANSI_CHARSET);
PDF->PDFOUTLINES_Add(0, "Outline 4", lAction, charsetANSI_CHARSET);
LONG i = PDF->PDFOUTLINES_Add(0, "Outline 5", lAction, charsetANSI_CHARSET);
PDF->PDFOUTLINES_Insert(i, "Outline 4.5", lAction, charsetANSI_CHARSET);
PDF->EndDoc();
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.BeginDoc();
long lAction = PDF.CreateGoToPageAction(0, 0);
PDF.PDFOUTLINES_Add(0, "Outline 1", lAction, TxFontCharset.charsetANSI_CHARSET);
PDF.PDFOUTLINES_Add(0, "Outline 2", lAction, TxFontCharset.charsetANSI_CHARSET);
PDF.PDFOUTLINES_Add(0, "Outline 3", lAction, TxFontCharset.charsetANSI_CHARSET);
PDF.PDFOUTLINES_Add(0, "Outline 4", lAction, TxFontCharset.charsetANSI_CHARSET);
long i = PDF.PDFOUTLINES_Add(0, "Outline 5", lAction, TxFontCharset.charsetANSI_CHARSET);
PDF.PDFOUTLINES_Insert(i, "Outline 4.5", lAction, TxFontCharset.charsetANSI_CHARSET);
PDF.EndDoc();
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.BeginDoc
lAction = PDF.CreateGoToPageAction(0, 0)
PDF.PDFOUTLINES_Add 0, "Outline 1", lAction, 0
PDF.PDFOUTLINES_Add 0, "Outline 2", lAction, 0
PDF.PDFOUTLINES_Add 0, "Outline 3", lAction, 0
PDF.PDFOUTLINES_Add 0, "Outline 4", lAction, 0
i = PDF.PDFOUTLINES_Add(0, "Outline 5", lAction, 0)
PDF.PDFOUTLINES_Insert i, "Outline 4.5", lAction, 0
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