Represents a bookmark in a PDF document
// Load an existing PDF document
let document: PdfDocument = new PdfDocument(data, password);
// Get the bookmarks
let bookmarks: PdfBookmarkBase = document.bookmarks;
// Gets the bookmark at the specified index
let bookmark: PdfBookmark = bookmarks.at(0) as PdfBookmark;
// Destroy the document
document.destroy();
number[]
Gets the bookmark color.
number
Gets the bookmark count (Read only).
PdfDestination
Gets the destination.
boolean
Gets the boolean flag indicating whether the bookmark is expanded or not.
PdfNamedDestination
Gets the named destination.
PdfTextStyle
Gets the text style.
string
Gets the bookmark title.
Creates and adds a new outline to the PDF document.
Parameter | Type | Description |
---|---|---|
title | string |
The title of the outline. |
Returns PdfBookmark
Insert a new outline to the PDF document at specified index.
Parameter | Type | Description |
---|---|---|
title | string |
The title of the outline. |
index | number |
The index to insert. |
Returns PdfBookmark
Gets the PdfBookmark
at the specified index.
Parameter | Type | Description |
---|---|---|
index | number |
Bookmark index. |
Returns PdfBookmark
Removes all the bookmark from the collection.
Returns void
Gets the boolean flag indicating whether PdfBookmark
is present or not.
Parameter | Type | Description |
---|---|---|
outline | PdfBookmark |
Bookmark. |
Returns boolean
Remove specified bookmark from the document.
Parameter | Type | Description |
---|---|---|
title | string |
The title of the outline.typescript<br>// Load an existing PDF document<br>let document: PdfDocument = new PdfDocument(data, password);<br>// Access the first page of the PDF<br>let page: PdfPage = document.getPage(0);<br>// Get the bookmarks<br>let bookmarks: PdfBookmarkBase = document.bookmarks;<br>// Remove specified bookmark from the document.<br>bookmarks.remove('Introduction');<br>// Sets destination to the bookmark<br>bookmark.destination = new PdfDestination(page, [10, 10]);<br>// Destroy the document<br>document.destroy();<br> |
Returns void
Remove the bookmark from the document at the specified index.
Parameter | Type | Description |
---|---|---|
index | number |
The index.typescript<br>// Load an existing PDF document<br>let document: PdfDocument = new PdfDocument(data, password);<br>// Access the first page of the PDF<br>let page: PdfPage = document.getPage(0);<br>// Get the bookmarks<br>let bookmarks: PdfBookmarkBase = document.bookmarks;<br>// Remove the bookmark from the document at the index 1.<br>bookmarks.remove(1);<br>// Sets destination to the bookmark<br>bookmark.destination = new PdfDestination(page, [10, 10]);<br>// Destroy the document<br>document.destroy();<br> |
Returns void