Skip to main content

Bookmark Class

A PDF bookmark.

Declaration

public class Bookmark extends JavaObject

Remarks

Refer to the following help topic for additional information: Create and Manage PDF Bookmarks.

The following code snippet creates nested bookmarks. The document outline displays a collapsible bookmark tree.

Bookmark chapters = new Bookmark("Chapters");

// Create child bookmarks.
Bookmark chapter1 = new Bookmark("Chapter 1");
chapter1.setPage(document.getPages().get(1));
chapter1.setDestination(new FitDestination());

Bookmark chapter2 = new Bookmark("Chapter 2");
chapter2.setPage(document.getPages().get(2));
chapter2.setDestination(new FitDestination());

// Add child bookmarks.
chapters.getChildren().add(chapter1);
chapters.getChildren().add(chapter2);

document.getBookmarks().add(chapters);

Inherited Members

com.devexpress.system.JavaObject.clone()
com.devexpress.system.JavaObject.equals(java.lang.Object)
com.devexpress.system.JavaObject.hashCode()
com.devexpress.system.JavaObject.initFields()
com.devexpress.system.JavaObject.memberwiseClone()
com.devexpress.system.JavaObject.toString()
java.lang.Object.finalize()
java.lang.Object.getClass()
java.lang.Object.notify()
java.lang.Object.notifyAll()
java.lang.Object.wait()
java.lang.Object.wait(long)
java.lang.Object.wait(long,int)

Inheritance

Object
com.devexpress.system.JavaObject
Bookmark

Constructors

Bookmark() Constructor

Initializes a new instance of the Bookmark class.

Declaration

public Bookmark()

Bookmark(String title) Constructor

Initializes a new bookmark with the specified title.

Declaration

public Bookmark(String title)

Parameters

Name Type Description
title String

The bookmark title.

Methods

getAction() Method

Returns the bookmark action.

Declaration

public InteractiveAction getAction()

Returns

Type Description
InteractiveAction

The bookmark action.

getBold() Method

Returns whether the bookmark title uses bold text.

Declaration

public boolean getBold()

Returns

Type Description
boolean

true if the bookmark title uses bold text; otherwise, false.

getChildren() Method

Returns child bookmarks.

Declaration

public IBookmarkCollection getChildren()

Returns

Type Description
IBookmarkCollection

Child bookmarks.

getDestination() Method

Returns the bookmark destination.

Declaration

public Destination getDestination()

Returns

Type Description
Destination

The bookmark destination.

getInitiallyClosed() Method

Returns whether the bookmark is initially closed.

Declaration

public boolean getInitiallyClosed()

Returns

Type Description
boolean

true if the bookmark is initially closed; otherwise, false.

getItalic() Method

Returns whether the bookmark title uses italic text.

Declaration

public boolean getItalic()

Returns

Type Description
boolean

true if the bookmark title uses italic text; otherwise, false.

getPage() Method

Returns the bookmark page.

Declaration

public Page getPage()

Returns

Type Description
Page

The bookmark page.

getTextColor() Method

Returns the bookmark text color.

Declaration

public PdfColor getTextColor()

Returns

Type Description
PdfColor

The bookmark text color.

getTitle() Method

Returns the bookmark title.

Declaration

public String getTitle()

Returns

Type Description
String

The bookmark title.

setAction(InteractiveAction value) Method

Sets the bookmark action.

Declaration

public void setAction(InteractiveAction value)

Parameters

Name Type Description
value InteractiveAction

The bookmark action.

setBold(boolean value) Method

Sets whether the bookmark title uses bold text.

Declaration

public void setBold(boolean value)

Parameters

Name Type Description
value boolean

true to use bold text; otherwise, false.

setDestination(Destination value) Method

Sets the bookmark destination.

Declaration

public void setDestination(Destination value)

Parameters

Name Type Description
value Destination

The bookmark destination.

setInitiallyClosed(boolean value) Method

Sets whether the bookmark is initially closed.

Declaration

public void setInitiallyClosed(boolean value)

Parameters

Name Type Description
value boolean

true to close the bookmark initially; otherwise, false.

setItalic(boolean value) Method

Sets whether the bookmark title uses italic text.

Declaration

public void setItalic(boolean value)

Parameters

Name Type Description
value boolean

true to use italic text; otherwise, false.

setPage(Page value) Method

Sets the bookmark page.

Declaration

public void setPage(Page value)

Parameters

Name Type Description
value Page

The bookmark page.

setTextColor(PdfColor value) Method

Sets the bookmark text color.

Declaration

public void setTextColor(PdfColor value)

Parameters

Name Type Description
value PdfColor

The bookmark text color.

setTitle(String value) Method

Sets the bookmark title.

Declaration

public void setTitle(String value)

Parameters

Name Type Description
value String

The bookmark title.