Foxit PDF SDK
foxit::pdf::ReadingBookmark Class Reference
Inheritance diagram for foxit::pdf::ReadingBookmark:
foxit::Base

Public Member Functions

 ReadingBookmark (const ReadingBookmark &other)
 Constructor, with another reading bookmark object. More...
 
 ~ReadingBookmark ()
 Destructor.
 
DateTime GetDateTime (bool is_creation_date) const
 Get date time information. More...
 
int GetPageIndex () const
 Get the index of the destination page. More...
 
WString GetTitle () const
 Get the title. More...
 
bool IsEmpty () const
 Check whether current object is empty or not. More...
 
bool operator!= (const ReadingBookmark &other) const
 Not equal operator. More...
 
ReadingBookmarkoperator= (const ReadingBookmark &other)
 Assign operator. More...
 
bool operator== (const ReadingBookmark &other) const
 Equal operator. More...
 
void SetDateTime (const DateTime &date_time, bool is_creation_date)
 Set date time information. More...
 
void SetPageIndex (int index)
 Set the index of the destination page. More...
 
void SetTitle (const WString &title)
 Set the title. More...
 
- Public Member Functions inherited from foxit::Base
FS_HANDLE Handle () const
 Get the handle of current object. 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()

foxit::pdf::ReadingBookmark::ReadingBookmark ( const ReadingBookmark other)

Constructor, with another reading bookmark object.

Parameters
[in]otherAnother reading bookmark object.

Member Function Documentation

◆ GetDateTime()

DateTime foxit::pdf::ReadingBookmark::GetDateTime ( bool  is_creation_date) const

Get date time information.

Parameters
[in]is_creation_datetrue 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 foxit::pdf::ReadingBookmark::GetPageIndex ( ) const

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()

WString foxit::pdf::ReadingBookmark::GetTitle ( ) const

Get the title.

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

◆ IsEmpty()

bool foxit::pdf::ReadingBookmark::IsEmpty ( ) const

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.

◆ operator!=()

bool foxit::pdf::ReadingBookmark::operator!= ( const ReadingBookmark other) const

Not equal operator.

Parameters
[in]otherAnother reading bookmark object. This function will check if current object is not equal to this one.
Returns
true means not equal, while false means equal.

◆ operator=()

ReadingBookmark& foxit::pdf::ReadingBookmark::operator= ( const ReadingBookmark other)

Assign operator.

Parameters
[in]otherAnother reading bookmark object, whose value would be assigned to current object.
Returns
Reference to current object itself.

◆ operator==()

bool foxit::pdf::ReadingBookmark::operator== ( const ReadingBookmark other) const

Equal operator.

Parameters
[in]otherAnother reading bookmark object. This function will check if current object is equal to this one.
Returns
true means equal, while false means not equal.

◆ SetDateTime()

void foxit::pdf::ReadingBookmark::SetDateTime ( const DateTime date_time,
bool  is_creation_date 
)

Set date time information.

Parameters
[in]date_timeNew date time information. All the values of this date obejct should be valid. Please refer to comment of class foxit::DateTime for more details.
[in]is_creation_datetrue means to get creation date time information, and false means to get last modified date time information.

return None.

◆ SetPageIndex()

void foxit::pdf::ReadingBookmark::SetPageIndex ( int  index)

Set the index of the destination page.

Parameters
[in]indexThe 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 foxit::pdf::ReadingBookmark::SetTitle ( const WString title)

Set the title.

Parameters
[in]titleNew title string.
Returns
None.