Foxit PDF SDK
com.foxit.sdk.pdf.Portfolio Class Reference
Inheritance diagram for com.foxit.sdk.pdf.Portfolio:
com.foxit.sdk.common.Base

Public Member Functions

 Portfolio (Portfolio other)
 Constructor, with another PDF portfolio object.
More...
 
String getInitialFileSpecKeyName () throws com.foxit.sdk.PDFException
 Get the key name of an attachment (as file specification) which should be the initial document.
More...
 
int getInitialViewMode () throws com.foxit.sdk.PDFException
 Get initial view mode.
More...
 
PDFDoc getPortfolioPDFDoc () throws com.foxit.sdk.PDFException
 Get related portfolio PDF document object.
More...
 
PortfolioNode getRootNode () throws com.foxit.sdk.PDFException
 Get root node which is always a folder node.
More...
 
SchemaFieldArray getSchemaFields () throws com.foxit.sdk.PDFException
 Get schema fields.
More...
 
String getSortingFieldKeyName () throws com.foxit.sdk.PDFException
 Get the key name of a schema field which is used for sorting.
More...
 
boolean isEmpty ()
 Check whether current object is empty or not.
More...
 
boolean isSortedInAscending () throws com.foxit.sdk.PDFException
 Check whether nodes should be sorted in ascending order or not.
More...
 
void setInitialFileSpecKeyName (String name) throws com.foxit.sdk.PDFException
 Set the key name of an attachment (as file specification) which should be the initial document.
More...
 
void setInitialViewMode (int mode) throws com.foxit.sdk.PDFException
 Set initial view mode.
More...
 
void setSchemaFields (SchemaFieldArray field_array) throws com.foxit.sdk.PDFException
 Set schema fields.
More...
 
void setSortingFieldKeyName (String name) throws com.foxit.sdk.PDFException
 Set the key name of a schema field for sorting.
More...
 
void setSortingOrder (boolean use_ascending_order) throws com.foxit.sdk.PDFException
 Set the boolean to decide whether nodes should be sorted in ascending order or not.
More...
 

Static Public Member Functions

static Portfolio createPortfolio () throws com.foxit.sdk.PDFException
 Create a PDF portfolio with a new and blank PDF document created automatically.
More...
 
static Portfolio createPortfolio (PDFDoc portfolio_pdf_doc) throws com.foxit.sdk.PDFException
 Create a PDF portfolio with an existed portfolio PDF document.
More...
 

Static Public Attributes

static final int e_InitialViewDetailMode = 1
 Initial view mode: details mode, with all information (specified by schema fields) presented in a multicolumn format.
More...
 
static final int e_InitialViewHidden = 3
 Initial view mode: hidden mode.

 
static final int e_InitialViewTileMode = 2
 Initial view mode: tile mode, with each file and folder node denoted by a small icon and a subset of information (specified by schema fields).
More...
 
static final int e_InitialViewUnknownMode = 0
 Unknown initial view mode.

 

Detailed Description

PDF portfolio is a combination of files with different formats. PDF portfolio itself is a PDF document, and then files with different formats can be embedded into this kind of PDF document.
Class Portfolio can be used to create a new blank PDF portfolio or access an existed portfolio PDF document, and then to get/set portfolio properties and to access root node in order to enumerate all nodes or add/remove node.

Constructor & Destructor Documentation

◆ Portfolio()

com.foxit.sdk.pdf.Portfolio.Portfolio ( Portfolio  other)

Constructor, with another PDF portfolio object.

Parameters
[in]otherAnother bookmark object.

Member Function Documentation

◆ createPortfolio() [1/2]

static Portfolio com.foxit.sdk.pdf.Portfolio.createPortfolio ( ) throws com.foxit.sdk.PDFException
static

Create a PDF portfolio with a new and blank PDF document created automatically.

This function will create a new and blank PDF document as a portfolio PDF document automatically. Function Portfolio.getPortfolioPDFDoc can be used to retrieve the related PDF document object. Function Portfolio.getSchemaFields can be used to retrieve default schema fields.

Returns
A PDF portfolio object.

◆ createPortfolio() [2/2]

static Portfolio com.foxit.sdk.pdf.Portfolio.createPortfolio ( PDFDoc  portfolio_pdf_doc) throws com.foxit.sdk.PDFException
static

Create a PDF portfolio with an existed portfolio PDF document.

This function is just to create a PDF portfolio object to be associated with an existed portfolio PDF document in order to access portfolio information.

Parameters
[in]portfolio_pdf_docA portfolio PDF document.
Returns
A PDF portfolio object.

◆ getInitialFileSpecKeyName()

String com.foxit.sdk.pdf.Portfolio.getInitialFileSpecKeyName ( ) throws com.foxit.sdk.PDFException

Get the key name of an attachment (as file specification) which should be the initial document.

Class Attachments can be used to retrieve the file specification object by key name.

Returns
Key name of an attachment(as file specification). If an empty string is returned, that means the related portfolio PDF document should be the initial document.

◆ getInitialViewMode()

int com.foxit.sdk.pdf.Portfolio.getInitialViewMode ( ) throws com.foxit.sdk.PDFException

Get initial view mode.

Returns
Initial view mode. Please refer to values starting from com.foxit.sdk.pdf.Portfolio.e_InitialViewUnknownMode and it would be one of these values.

◆ getPortfolioPDFDoc()

PDFDoc com.foxit.sdk.pdf.Portfolio.getPortfolioPDFDoc ( ) throws com.foxit.sdk.PDFException

Get related portfolio PDF document object.

Returns
Related portfolio PDF document object.

◆ getRootNode()

PortfolioNode com.foxit.sdk.pdf.Portfolio.getRootNode ( ) throws com.foxit.sdk.PDFException

Get root node which is always a folder node.

PDF portfolio organizes files into a hierarchical structure – a tree with a single root folder (also known as root node) as the common ancestor for all other folders and files.

Returns
A portfolio node object that represents the root node.

◆ getSchemaFields()

SchemaFieldArray com.foxit.sdk.pdf.Portfolio.getSchemaFields ( ) throws com.foxit.sdk.PDFException

Get schema fields.

Schema fields are used to decide which properties of file node or folder node are to be shown in application.

Returns
Schema fields. Order of these fields are decided by their index order in returned array.

◆ getSortingFieldKeyName()

String com.foxit.sdk.pdf.Portfolio.getSortingFieldKeyName ( ) throws com.foxit.sdk.PDFException

Get the key name of a schema field which is used for sorting.

Returns
Key name of a schema field which is used for sorting.

◆ isEmpty()

boolean com.foxit.sdk.pdf.Portfolio.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.

◆ isSortedInAscending()

boolean com.foxit.sdk.pdf.Portfolio.isSortedInAscending ( ) throws com.foxit.sdk.PDFException

Check whether nodes should be sorted in ascending order or not.

Returns
true means nodes should be sorted in ascending order with specified field, while false means nodes should sorted in descending order with specified field.

◆ setInitialFileSpecKeyName()

void com.foxit.sdk.pdf.Portfolio.setInitialFileSpecKeyName ( String  name) throws com.foxit.sdk.PDFException

Set the key name of an attachment (as file specification) which should be the initial document.

Function PortfolioFileNode.getKeyName can be used to get the key name of a file specification associated with a file node. Or use class Attachments to retrieve a key name of a file specification.

Parameters
[in]nameKey name of an attachment(as file specification). If an empty string is returned, that means the related portfolio PDF document should be the initial document.
Returns
None.

◆ setInitialViewMode()

void com.foxit.sdk.pdf.Portfolio.setInitialViewMode ( int  mode) throws com.foxit.sdk.PDFException

Set initial view mode.

Parameters
[in]modeInitial view mode. Please refer to values starting from com.foxit.sdk.pdf.Portfolio.e_InitialViewDetailMode and it should be one of these values except com.foxit.sdk.pdf.Portfolio.e_InitialViewUnknownMode .
Returns
None.

◆ setSchemaFields()

void com.foxit.sdk.pdf.Portfolio.setSchemaFields ( SchemaFieldArray  field_array) throws com.foxit.sdk.PDFException

Set schema fields.

Schema fields are used to decide which properties of file node or folder node are to be shown in application.
When this function succeeds, all the old schema fields will be removed and input ones will be used instead.

Parameters
[in]field_arrayNew schema fields array. Order of these fields are decided by their index order in this array.
Returns
None.

◆ setSortingFieldKeyName()

void com.foxit.sdk.pdf.Portfolio.setSortingFieldKeyName ( String  name) throws com.foxit.sdk.PDFException

Set the key name of a schema field for sorting.

Parameters
[in]nameKey name of a schema field for sorting.
Returns
None.

◆ setSortingOrder()

void com.foxit.sdk.pdf.Portfolio.setSortingOrder ( boolean  use_ascending_order) throws com.foxit.sdk.PDFException

Set the boolean to decide whether nodes should be sorted in ascending order or not.

Parameters
[in]use_ascending_orderA boolean to decide the sorted order: true means nodes should be sorted in ascending order with specified field, while false means nodes should sorted in descending order with specified field.
Returns
None.

Member Data Documentation

◆ e_InitialViewDetailMode

final int com.foxit.sdk.pdf.Portfolio.e_InitialViewDetailMode = 1
static

Initial view mode: details mode, with all information (specified by schema fields) presented in a multicolumn format.

Note
This mode provides the most information to the user.

◆ e_InitialViewTileMode

final int com.foxit.sdk.pdf.Portfolio.e_InitialViewTileMode = 2
static

Initial view mode: tile mode, with each file and folder node denoted by a small icon and a subset of information (specified by schema fields).

Note
This mode provides top-level information about embedded files to the user.