Foxit PDF SDK

Public Member Functions | List of all members
foxit::addon::ofd::OFDDoc Class Reference
Inheritance diagram for foxit::addon::ofd::OFDDoc:

## Public Member Functions
| OFDDoc ()
| Constructor.
| OFDDoc (const wchar_t *path, const wchar_t *password)
| Constructor, from an existing OFD file path. More...
| OFDDoc (const OFDDoc &other)
| Constructor, with another OFD document object. More...
OFDPage | GetPage (int index) const
| Get OFD page object by index. More...
int | GetPageCount () const
| Get page count of current OFD document. More...
bool | IsEmpty () const
| Check whether current object is empty or not. More...
bool | operator!= (const OFDDoc &other) const
| Not equal operator. More...
OFDDoc & | operator= (const OFDDoc &other)
| Assign operator. More...
bool | operator== (const OFDDoc &other) const
| Equal operator. More...
void | Release ()
| Release current OFD document object. More...
Public Member Functions inherited from foxit::Base
FS_HANDLE | Handle () const
| Get the handle of current object. More...

## Detailed Description

This class is used to get information of an OFD document. Please ensure common::Library::InitializeOFDEngine has been called successfully before using this class.

See also
  common::Library

## Constructor & Destructor Documentation

## ◆ OFDDoc() [1/2]

foxit::addon::ofd::OFDDoc::OFDDoc | ( | const wchar_t * | path,
|  | const wchar_t * | password
| ) |  |

Constructor, from an existing OFD file path.

Parameters

  [in] | path | A full path of an existing PDF file. It should not be an empty string.
  [in] | password | Password for the OFD file. It should be an empty string if the OFD file is not encrypted.

## ◆ OFDDoc() [2/2]

foxit::addon::ofd::OFDDoc::OFDDoc | ( | const OFDDoc & | other | ) |

Constructor, with another OFD document object.

Parameters

  [in] | other | Another OFD document object.

## Member Function Documentation

## ◆ GetPage()

OFDPage foxit::addon::ofd::OFDDoc::GetPage | ( | int | index | ) | const

Get OFD page object by index.

Parameters

  [in] | index | Index of the page. Valid range: from 0 to (page_count-1). page_count returned by function OFDDoc::GetPageCount.

Returns
  OFD page object.

## ◆ GetPageCount()

int foxit::addon::ofd::OFDDoc::GetPageCount | ( |  | ) | const

Get page count of current OFD document.

Returns
  Page count of current OFD document.

## ◆ IsEmpty()

bool foxit::addon::ofd::OFDDoc::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::addon::ofd::OFDDoc::operator!= | ( | const OFDDoc & | other | ) | const

Not equal operator.

Parameters

  [in] | other | Another OFD document object. This function will check if current object is not equal to this one.

Returns
  true means not equal, while false means equal.

## ◆ operator=()

OFDDoc& foxit::addon::ofd::OFDDoc::operator= | ( | const OFDDoc & | other | ) |

Assign operator.

Parameters

  [in] | other | Another OFD document object, whose value would be assigned to current object.

Returns
  Reference to current object itself.

## ◆ operator==()

bool foxit::addon::ofd::OFDDoc::operator== | ( | const OFDDoc & | other | ) | const

Equal operator.

Parameters

  [in] | other | Another OFD document object. This function will check if current object is equal to this one.

Returns
  true means equal, while false means not equal.

## ◆ Release()

void foxit::addon::ofd::OFDDoc::Release | ( |  | ) |

Release current OFD document object.

Please call this function before common::Library::ReleaseOFDEngine to release current OFD document object.

Returns
  None.