Foxit PDF SDK
com.foxit.sdk.addon.ofd.OFDDoc Class Reference
Inheritance diagram for com.foxit.sdk.addon.ofd.OFDDoc:
com.foxit.sdk.common.Base

Public Member Functions

 OFDDoc () throws com.foxit.sdk.PDFException
 Constructor.
 
 OFDDoc (String path, String password) throws com.foxit.sdk.PDFException
 Constructor, from an existing OFD file path. More...
 
 OFDDoc (OFDDoc other)
 Constructor, with another OFD document object. More...
 
synchronized void delete ()
 Clean up related resources immediately. More...
 
OFDPage getPage (int index) throws com.foxit.sdk.PDFException
 Get OFD page object by index. More...
 
int getPageCount () throws com.foxit.sdk.PDFException
 Get page count of current OFD document. More...
 
boolean isEmpty ()
 Check whether current object is empty or not. More...
 
void release ()
 Release current OFD document object. More...
 
- Public Member Functions inherited from com.foxit.sdk.common.Base
synchronized void delete ()
 Clean up related resources immediately. 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
com.foxit.sdk.common.Library

Constructor & Destructor Documentation

◆ OFDDoc() [1/2]

com.foxit.sdk.addon.ofd.OFDDoc.OFDDoc ( String  path,
String  password 
) throws com.foxit.sdk.PDFException

Constructor, from an existing OFD file path.

Parameters
[in]pathA full path of an existing PDF file. It should not be an empty string.
[in]passwordPassword for the OFD file. It should be an empty string if the OFD file is not encrypted.

◆ OFDDoc() [2/2]

com.foxit.sdk.addon.ofd.OFDDoc.OFDDoc ( OFDDoc  other)

Constructor, with another OFD document object.

Parameters
[in]otherAnother OFD document object.

Member Function Documentation

◆ delete()

synchronized void com.foxit.sdk.addon.ofd.OFDDoc.delete ( )

Clean up related resources immediately.

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

◆ getPage()

OFDPage com.foxit.sdk.addon.ofd.OFDDoc.getPage ( int  index) throws com.foxit.sdk.PDFException

Get OFD page object by index.

Parameters
[in]indexIndex of the page. Valid range: from 0 to (page_count-1). page_count returned by function OFDDoc.getPageCount .
Returns
OFD page object.

◆ getPageCount()

int com.foxit.sdk.addon.ofd.OFDDoc.getPageCount ( ) throws com.foxit.sdk.PDFException

Get page count of current OFD document.

Returns
Page count of current OFD document.

◆ isEmpty()

boolean com.foxit.sdk.addon.ofd.OFDDoc.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.

◆ release()

void com.foxit.sdk.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.