PdfBookmarkBase class

This class plays two roles: it's a base class for all bookmarks and it's a root of a bookmarks tree.

//Load the PDF document.
PdfDocument document = PdfDocument(inputBytes: inputBytes);
//Get the bookmark from index.
PdfBookmark bookmarks = document.bookmarks[0]
  ..destination = PdfDestination(document.pages[1])
  ..color = PdfColor(0, 255, 0)
  ..textStyle = [PdfTextStyle.bold]
  ..title = 'Changed title';
//Save the document.
List<int> bytes = await document.save();
//Dispose the document.
document.dispose();
Implementers

Properties

count int
Gets number of the elements in the collection. Read-Only.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(String title, {bool isExpanded = false, PdfColor? color, PdfDestination? destination, PdfNamedDestination? namedDestination, PdfAction? action, List<PdfTextStyle>? textStyle}) PdfBookmark
Adds the bookmark from the document.
clear() → void
Removes all the bookmark from the collection.
contains(PdfBookmark outline) bool
Determines whether the specified outline presents in the collection.
insert(int index, String title) PdfBookmark
Inserts a new outline at the specified index.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(String title) → void
Remove the specified bookmark from the document.
removeAt(int index) → void
Remove the bookmark from the document at the specified index.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](int index) PdfBookmark
Gets the bookmark at specified index.