Class
PDFTOCEntry
Description
Used to create a TOC (Table Of Contents) index in the PDF Document.
Properties
Name |
Type |
Read-Only |
Shared |
---|---|---|---|
✓ |
|||
Methods
Name |
Parameters |
Returns |
Shared |
---|---|---|---|
ParamArray entry As PDFTOCEntry |
|||
entries() As PDFTOCEntry |
|||
page As Integer, title As String, x As Integer, y As Integer |
|||
index As Integer |
PDFTOCEntry |
||
index As Integer |
Property descriptions
PDFTOCEntry.Bold
Bold As Boolean
If True, applies the bold style to the entry's text content if any.
PDFTOCEntry.DrawingColor
DrawingColor As Color
The currently selected color for the PDFTOCEntry object. This color will be used when AddEntry is called.
PDFTOCEntry.Italic
Italic As Boolean
If True, applies the italic style to the entry's text content if any.
PDFTOCEntry.Page
Page As Integer
The number of the page associated with this entry.
PDFTOCEntry.Parent
Parent As PDFTOCEntry
The parent of this entry.
This property is read-only.
PDFTOCEntry.Title
Title As String
The text for this entry that appears in the table of contents.
PDFTOCEntry.X
X As Integer
The location on the X-axis of the page that should be displayed when the user selects the entry.
PDFTOCEntry.Y
Y As Integer
The location on the Y-axis of the page that should be displayed when the user selects the entry.
Method descriptions
PDFTOCEntry.AddEntry
AddEntry(ParamArray entry As PDFTOCEntry)
Creates subentries to the existing entry from the array passed.
PDFTOCEntry.AddEntry
AddEntry(entries() As PDFTOCEntry)
Creates subentries to the existing entry from the array passed.
PDFTOCEntry.Constructor
Constructor(page As Integer, title As String, x As Integer, y As Integer)
Note
Constructors are special methods called when you create an object with the New keyword and pass in the parameters above.
Creates a PDF table of contents entry (PDFTOCEntry) from the values passed.
PDFTOCEntry.EntryAt
EntryAt(index As Integer) As PDFTOCEntry
Returns the PDFTOCEntry at the index specified.
PDFTOCEntry.RemoveAt
RemoveAt(index As Integer)
Removes the PDFTOCEntry at the index specified.
Notes
Add a table of contents entry to PDF document using the PDFDocument.AddTOCEntry method.
Sample code
This examples creates a table of contents (mainTOC) and an introduction entry (introTOC), adds the introTOC as a subentry to the mainTOC then adds the mainTOC to the PDFDocument, pdfDOC:
Var mainTOC As New PDFTOCEntry(1, "Chapter 1", 0, 0)
Var introTOC As New PDFTOCEntry(2, "Introduction", 0, 0)
mainTOC.AddEntry(introTOC)
pdfDOC.AddTOCEntry(mainTOC)
Compatibility
All project types on all supported operating systems.
See also
Object parent class; PDFDocument class.