Foxit PDF SDK

Public Member Functions | List of all members
com.foxit.sdk.pdf.ReadingBookmark Class Reference
Inheritance diagram for com.foxit.sdk.pdf.ReadingBookmark:

## Public Member Functions
| ReadingBookmark (ReadingBookmark other)
| Constructor, with another reading bookmark object. More...
synchronized void | delete ()
| Clean up related C++ resources immediately. More...
DateTime | getDateTime (boolean is_creation_date) throws com.foxit.sdk.PDFException
| Get date time information. More...
int | getPageIndex () throws com.foxit.sdk.PDFException
| Get the index of the destination page. More...
String | getTitle () throws com.foxit.sdk.PDFException
| Get the title. More...
boolean | isEmpty ()
| Check whether current object is empty or not. More...
void | setDateTime (DateTime date_time, boolean is_creation_date) throws com.foxit.sdk.PDFException
| Set date time information. More...
void | setPageIndex (int index) throws com.foxit.sdk.PDFException
| Set the index of the destination page. More...
void | setTitle (String title) throws com.foxit.sdk.PDFException
| Set the title. More...

## Detailed Description

Reading bookmark is not a PDF bookmark, in other words, it is not PDF outlines. It is the bookmark in applicable level. It is stored in the metadata (XML format) of catalog. It allows user to add or remove a reading bookmark according to their reading preferences and navigate one PDF page easily by selecting one reading bookmark.
In order to retrieve the reading bookmark, function PDFDoc.getReadingBookmarkCount could be called to count the reading bookmarks, and function PDFDoc.getReadingBookmark could be called to get a reading bookmark by index.
This class offers several functions to get/set properties of reading bookmarks, such as title, destination page index and creation/modified date time.

See also
  PDFDoc

## Constructor & Destructor Documentation

## ◆ ReadingBookmark()

com.foxit.sdk.pdf.ReadingBookmark.ReadingBookmark | ( | ReadingBookmark | other | ) |

Constructor, with another reading bookmark object.

Parameters

  [in] | other | Another reading bookmark object.

## Member Function Documentation

## ◆ delete()

synchronized void com.foxit.sdk.pdf.ReadingBookmark.delete | ( |  | ) |

Clean up related C++ resources immediately.

Returns
  None.

Note
  Once this function is called, current object cannot be used anymore.

Reimplemented from com.foxit.sdk.common.Base.

## ◆ getDateTime()

DateTime com.foxit.sdk.pdf.ReadingBookmark.getDateTime | ( | boolean | is_creation_date | ) | throws com.foxit.sdk.PDFException

Get date time information.

Parameters

  [in] | is_creation_date | true means to get creation date time information, and false means to get last modified date time information.

Returns
  The specified date and time. If no specified date and time property can be found, this function will return a date and time object with all values 0.

## ◆ getPageIndex()

int com.foxit.sdk.pdf.ReadingBookmark.getPageIndex | ( |  | ) | throws com.foxit.sdk.PDFException

Get the index of the destination page.

Returns
  The page index, starting from 0. If no page index property can be found, this function will return -1.

## ◆ getTitle()

String com.foxit.sdk.pdf.ReadingBookmark.getTitle | ( |  | ) | throws com.foxit.sdk.PDFException

Get the title.

Returns
  Title string. If no title property can be found, this function will return an empty string.

## ◆ isEmpty()

boolean com.foxit.sdk.pdf.ReadingBookmark.isEmpty | ( |  | ) |

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
  true means current object is empty, while false means not.

## ◆ setDateTime()

void com.foxit.sdk.pdf.ReadingBookmark.setDateTime | ( | DateTime | date_time,
|  | boolean | is_creation_date
| ) |  | throws com.foxit.sdk.PDFException

Set date time information.

Parameters

  [in] | date_time | New date time information. All the values of this date obejct should be valid. Please refer to comment of class com.foxit.sdk.common.DateTime for more details.
  [in] | is_creation_date | true means to get creation date time information, and false means to get last modified date time information.

return None.

## ◆ setPageIndex()

void com.foxit.sdk.pdf.ReadingBookmark.setPageIndex | ( | int | index | ) | throws com.foxit.sdk.PDFException

Set the index of the destination page.

Parameters

  [in] | index | The new destination page index. Valid range: from 0 to (count-1). count is the page count of the PDF document to which current reading bookmark belongs. The page count can be retrieved by function PDFDoc.getPageCount .

Returns
  None.

## ◆ setTitle()

void com.foxit.sdk.pdf.ReadingBookmark.setTitle | ( | String | title | ) | throws com.foxit.sdk.PDFException

Set the title.

Parameters

  [in] | title | New title string.

Returns
  None.