PdfBookmark class

Each instance of this class represents an bookmark node in the bookmark tree.

//Create a new document.
PdfDocument document = PdfDocument();
//Create document bookmarks.
PdfBookmark bookmark = document.bookmarks.add('Page 1')
  ..destination = PdfDestination(document.pages.add(), Offset(20, 20))
  ..textStyle = [PdfTextStyle.bold]
  ..color = PdfColor(255, 0, 0);
//Save the document.
List<int> bytes = await document.save();
//Dispose the document.
document.dispose();
Inheritance

Properties

action PdfAction?
Gets or sets the action for the outline.
getter/setter pair
color PdfColor
Gets or sets the color of bookmark title.
getter/setter pair
count int
Gets number of the elements in the collection. Read-Only.
no setterinherited
destination PdfDestination?
Gets or sets the outline destination page.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isExpanded bool
Gets or sets whether to expand the node or not.
getter/setter pair
namedDestination PdfNamedDestination?
Gets or sets the named destination in outline.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
textStyle List<PdfTextStyle>
Gets or sets the style of the outline title.
getter/setter pair
title String
Gets or sets the outline title.
getter/setter pair

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.
inherited
clear() → void
Removes all the bookmark from the collection.
inherited
contains(PdfBookmark outline) bool
Determines whether the specified outline presents in the collection.
inherited
insert(int index, String title) PdfBookmark
Inserts a new outline at the specified index.
inherited
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.
inherited
removeAt(int index) → void
Remove the bookmark from the document at the specified index.
inherited
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.
inherited