PDF Creator Pilot documentation |
Download CHM version of this manual. |
|
![]() ![]() Collapse AllAdds a new tree node to a tree of the outline items.
|
| LONG PDFOUTLINES_Add ( LONG nodeIndex, BSTR nodeTitle, LONG actionIndex, TxFontCharset charset ) |
Parameters
Return value
Remarks
This function adds a new node to a tree as the last sibling of the node specified by the nodeIndex parameter. Use PDFOUTLINES_AddFirst to add node as the first sibling of the node specified by the nodeIndex parameter. Use PDFOUTLINES_Insert to insert a node in the specified position.
The function returns the node that has been added. An action with actionIndex index executes when a user clicks a created node. The created node contains a nodeTitle as the node's own text in a charset code page.
The return value is an outline identifier in document's outlines collection and can be used in SetCurrentPDFOutlineNode, PDFOUTLINES_Add, PDFOUTLINES_AddChild, PDFOUTLINES_AddFirst, PDFOUTLINES_Insert.
Analogue in new interface: IPDFDocument4::AddOutlineAfter, IPDFDocument4::AddOutlineBefore, IPDFDocument4::AddUnicodeOutlineAfter, IPDFDocument4::AddUnicodeOutlineBefore.
Example
{ PDF object is supposed to be created }
PDF.BeginDoc;
lAction := PDF.CreateGoToPageAction(0, 0);
i0 := PDF.PDFOUTLINES_Add(0, '0', lAction, charsetANSI_CHARSET);
i1 := PDF.PDFOUTLINES_Add(i0, '1', lAction, charsetANSI_CHARSET);
{ you may set 1st parameter to any sibling }
i2 := PDF.PDFOUTLINES_Add(i1, '2', lAction, charsetANSI_CHARSET);
' it is identical to
' i2 := PDF.PDFOUTLINES_Add(i0, '2', lAction, charsetANSI_CHARSET);
i3 := PDF.PDFOUTLINES_AddChild(i0, '3', lAction, charsetANSI_CHARSET);
PDF.EndDoc;
{ This code will produce nodes tree like this:
0
3
1
2
}
// PDF object is supposed to be created PDF->BeginDoc(); LONG lAction = PDF.CreateGoToPageAction (0, 0); LONG i0 = PDF->PDFOUTLINES_Add(0, "0", lAction, charsetANSI_CHARSET); LONG i1 = PDF->PDFOUTLINES_Add(i0, "1", lAction, charsetANSI_CHARSET); // you may set 1st parameter to any sibling LONG i2 = PDF->PDFOUTLINES_Add(i1, "2", lAction, charsetANSI_CHARSET); // it is identical to // LONG i2 = PDF->PDFOUTLINES_Add(i0, "2", lAction, charsetANSI_CHARSET); LONG i3 = PDF->PDFOUTLINES_AddChild(i0, "3", lAction, charsetANSI_CHARSET); PDF->EndDoc(); /* This code will produce nodes tree like this: 0 3 1 2 */
// PDF object is supposed to be created PDF.BeginDoc(); long lAction = PDF.CreateGoToPageAction (0, 0); long i0 = PDF.PDFOUTLINES_Add(0, "0", lAction, TxFontCharset.charsetANSI_CHARSET); long i1 = PDF.PDFOUTLINES_Add(i0, "1", lAction, TxFontCharset.charsetANSI_CHARSET); // you may set 1st parameter to any sibling long i2 = PDF.PDFOUTLINES_Add(i1, "2", lAction, TxFontCharset.charsetANSI_CHARSET); // it is identical to // long i2 = PDF.PDFOUTLINES_Add(i0, "2", lAction, TxFontCharset.charsetANSI_CHARSET); long i3 = PDF.PDFOUTLINES_AddChild(i0, "3", lAction, TxFontCharset.charsetANSI_CHARSET); PDF.EndDoc(); /* This code will produce nodes tree like this: 0 3 1 2 */
' PDF object is supposed to be created PDF.BeginDoc lAction = PDF.CreateGoToPageAction (0, 0) i0 = PDF.PDFOUTLINES_Add(0, "0", lAction, 0) i1 = PDF.PDFOUTLINES_Add(i0, "1", lAction, 0) ' you may set 1st parameter to any sibling i2 = PDF.PDFOUTLINES_Add(i1, "2", lAction, 0) ' it is identical to ' i2 = PDF.PDFOUTLINES_Add(i0, "2", lAction, 0) i3 = PDF.PDFOUTLINES_AddChild(i0, "3", lAction, 0) PDF.EndDoc ' This code will produce nodes tree like this: ' 0 ' 3 ' 1 ' 2
See Also


