PDF Creator Pilot documentation |
Download CHM version of this manual. |
|
![]() ![]() Collapse AllThis nethod adds a new tree node as the first sibling to a tree of the outline items.
|
| LONG PDFOUTLINES_AddFirst ( LONG nodeIndex, BSTR nodeTitle, LONG actionIndex, TxFontCharset charset ) |
Parameters
Return value
Remarks
This method adds a new node to a tree as the first sibling of the node specified by the nodeIndex parameter. Use PDFOUTLINES_Add to add node as the last sibling of the node specified by the nodeIndex parameter. Use PDFOUTLINES_Insert to insert a node in the specified position.
This method returns the node that has been added. An action (with an index specified by actionIndex) 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.
Equivalent 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);
o1 := PDF.PDFOUTLINES_AddFirst(0, 'Last', lAction, charsetANSI_CHARSET);
o2 := PDF.PDFOUTLINES_AddFirst(0, 'Third', lAction, charsetANSI_CHARSET);
o3 := PDF.PDFOUTLINES_AddFirst(0, 'Second', lAction, charsetANSI_CHARSET);
o4 := PDF.PDFOUTLINES_AddFirst(0, 'First', lAction, charsetANSI_CHARSET);
PDF.EndDoc;
{ Outlines will look like: }
{ First }
{ Second }
{ Third }
{ Last }
// PDF object is supposed to be created PDF->BeginDoc(); LONG lAction = PDF->CreateGoToPageAction(0, 0); LONG o1 = PDF->PDFOUTLINES_AddFirst(0, "Last", lAction, charsetANSI_CHARSET); LONG o2 = PDF->PDFOUTLINES_AddFirst(0, "Third", lAction, charsetANSI_CHARSET); LONG o3 = PDF->PDFOUTLINES_AddFirst(0, "Second", lAction, charsetANSI_CHARSET); LONG o4 = PDF->PDFOUTLINES_AddFirst(0, "First", lAction, charsetANSI_CHARSET); PDF->EndDoc(); // Outlines will look like: // First // Second // Third // Last
// PDF object is supposed to be created PDF.BeginDoc(); long lAction = PDF.CreateGoToPageAction(0, 0); long o1 = PDF.PDFOUTLINES_AddFirst(0, "Last", lAction, TxFontCharset.charsetANSI_CHARSET); long o2 = PDF.PDFOUTLINES_AddFirst(0, "Third", lAction, TxFontCharset.charsetANSI_CHARSET); long o3 = PDF.PDFOUTLINES_AddFirst(0, "Second", lAction, TxFontCharset.charsetANSI_CHARSET); long o4 = PDF.PDFOUTLINES_AddFirst(0, "First", lAction, TxFontCharset.charsetANSI_CHARSET); PDF.EndDoc(); // Outlines will look like: // First // Second // Third // Last
' PDF object is supposed to be created PDF.BeginDoc lAction = PDF.CreateGoToPageAction(0, 0) o1 = PDF.PDFOUTLINES_AddFirst(0, "Last", lAction, 0) o2 = PDF.PDFOUTLINES_AddFirst(0, "Third", lAction, 0) o3 = PDF.PDFOUTLINES_AddFirst(0, "Second", lAction, 0) o4 = PDF.PDFOUTLINES_AddFirst(0, "First", lAction, 0) PDF.EndDoc ' Outlines will look like: ' First ' Second ' Third ' Last
See Also


