Represents a base class for all bookmark objects.
// Load an existing PDF document
let document: PdfDocument = new PdfDocument(data, password);
// Get bookmarks
let bookmarks: PdfBookmarkBase = document.bookmarks;
// Destroy the document
document.destroy();
number
Gets the bookmark count (Read only).
boolean
Gets the boolean flag indicating whether the bookmark is expanded or not.
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