Class PdfOutline
A editable collection of PDF navigational bookmark objects.
Inheritance
Namespace: IronPdf.Bookmarks
Assembly: IronPdf.dll
Syntax
public class PdfOutline : Object
Properties
BookMarkList
Gets the full list of current outline book marks.
Declaration
public List<PdfBookMark> BookMarkList { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<PdfBookMark> | The PDF documents full collection of bookmarks. |
Methods
AddBookMarkAtEnd(String, Int32, String)
Adds a bookmark at the end of the document outline.
Declaration
public void AddBookMarkAtEnd(string Text, int PageIndex, string ParentText = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | Text | The display text for the link. |
System.Int32 | PageIndex | The zero based page number to link to. E.g. Page 1 has a PageIndex of 0 |
System.String | ParentText | The indent level in the outline. An IndentLevel of zero is in the root. An IndentLevel of N will be nested inside the most recent previous bookmark of IndentLevel N-1. |
AddBookMarkAtStart(String, Int32, String)
Adds a bookmark at the start of the document outline.
Declaration
public void AddBookMarkAtStart(string Text, int PageIndex, string ParentText = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | Text | The display text for the link. |
System.Int32 | PageIndex | The zero based page number to link to. E.g. Page 1 has a PageIndex of 0 |
System.String | ParentText | The indent level in the outline. An IndentLevel of zero is in the root. An IndentLevel of N will be nested inside the most recent previous bookmark of IndentLevel N-1. |
Clean()
Removes all existing bookmarks from the PDF
Declaration
public void Clean()
InsertBookMark(String, Int32, String, String)
Insert a bookmark at the start of the document outline.
Declaration
public void InsertBookMark(string Text, int PageIndex, string ParentText = null, string PreviousText = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | Text | The display text for the link. |
System.Int32 | PageIndex | The zero based page number to link to. E.g. Page 1 has a PageIndex of 0 |
System.String | ParentText | The indent level in the outline. An IndentLevel of zero is in the root. An IndentLevel of N will be nested inside the most recent previous bookmark of IndentLevel N-1. |
System.String | PreviousText | Name of the bookmark which precedes this bookmark |
RemoveBookMark(PdfBookMark)
Removes a single book mark from the BookMarkList
Declaration
public void RemoveBookMark(PdfBookMark bookmark)
Parameters
Type | Name | Description |
---|---|---|
PdfBookMark | bookmark | The bookmark object to remove. |
RemoveBookMarkAt(Int32)
Removes a single book mark from the BookMarkList
Declaration
public void RemoveBookMarkAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index of the bookmark to remove. |