Foxit PDF SDK

Public Types | Public Member Functions | Static Public Member Functions | List of all members
foxit.pdf.Portfolio Class Reference
Inheritance diagram for foxit.pdf.Portfolio:

## Public Types
enum | InitialViewMode { InitialViewMode.e_InitialViewUnknownMode = 0, InitialViewMode.e_InitialViewDetailMode = 1, InitialViewMode.e_InitialViewTileMode = 2, InitialViewMode.e_InitialViewHidden = 3 }
| Enumeration for initial view mode for a portfolio PDF document. More...

## Public Member Functions
| Portfolio (Portfolio other)
| Constructor, with another PDF portfolio object. More...
string | GetInitialFileSpecKeyName ()
| Get the key name of an attachment (as file specification) which should be the initial document. More...
Portfolio.InitialViewMode | GetInitialViewMode ()
| Get initial view mode. More...
PDFDoc | GetPortfolioPDFDoc ()
| Get related portfolio PDF document object. More...
PortfolioNode | GetRootNode ()
| Get root node which is always a folder node. More...
SchemaFieldArray | GetSchemaFields ()
| Get schema fields. More...
string | GetSortingFieldKeyName ()
| Get the key name of a schema field which is used for sorting. More...
bool | IsEmpty ()
| Check whether current object is empty or not. More...
bool | IsSortedInAscending ()
| Check whether nodes should be sorted in ascending order or not. More...
void | SetInitialFileSpecKeyName (string name)
| Set the key name of an attachment (as file specification) which should be the initial document. More...
void | SetInitialViewMode (Portfolio.InitialViewMode mode)
| Set initial view mode. More...
void | SetSchemaFields (SchemaFieldArray field_array)
| Set schema fields. More...
void | SetSortingFieldKeyName (string name)
| Set the key name of a schema field for sorting. More...
void | SetSortingOrder (bool use_ascending_order)
| Set the boolean to decide whether nodes should be sorted in ascending order or not. More...

## Static Public Member Functions
static Portfolio | CreatePortfolio ()
| Create a PDF portfolio with a new and blank PDF document created automatically. More...
static Portfolio | CreatePortfolio (foxit.pdf.PDFDoc portfolio_pdf_doc)
| Create a PDF portfolio with an existed portfolio PDF document. More...

## 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.

## Member Enumeration Documentation

## ◆ InitialViewMode

enum foxit.pdf.Portfolio.InitialViewMode
| strong

Enumeration for initial view mode for a portfolio PDF document.

Values of this enumeration should be used alone.

Enumerator
e_InitialViewUnknownMode | Unknown initial view mode.
e_InitialViewDetailMode | 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 | 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.
e_InitialViewHidden | Initial view mode: hidden mode.

## Constructor & Destructor Documentation

## ◆ Portfolio()

foxit.pdf.Portfolio.Portfolio | ( | Portfolio | other | ) |
| inline

Constructor, with another PDF portfolio object.

Parameters

  [in] | other | Another bookmark object.

## Member Function Documentation

## ◆ CreatePortfolio() [1/2]

static Portfolio foxit.pdf.Portfolio.CreatePortfolio | ( |  | ) |
| inline 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 foxit.pdf.Portfolio.CreatePortfolio | ( | foxit.pdf.PDFDoc | portfolio_pdf_doc | ) |
| inline 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_doc | A portfolio PDF document.

Returns
  A PDF portfolio object.

## ◆ GetInitialFileSpecKeyName()

string foxit.pdf.Portfolio.GetInitialFileSpecKeyName | ( |  | ) |
| inline

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

Portfolio.InitialViewMode foxit.pdf.Portfolio.GetInitialViewMode | ( |  | ) |
| inline

Get initial view mode.

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

## ◆ GetPortfolioPDFDoc()

PDFDoc foxit.pdf.Portfolio.GetPortfolioPDFDoc | ( |  | ) |
| inline

Get related portfolio PDF document object.

Returns
  Related portfolio PDF document object.

## ◆ GetRootNode()

PortfolioNode foxit.pdf.Portfolio.GetRootNode | ( |  | ) |
| inline

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 foxit.pdf.Portfolio.GetSchemaFields | ( |  | ) |
| inline

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 foxit.pdf.Portfolio.GetSortingFieldKeyName | ( |  | ) |
| inline

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

bool foxit.pdf.Portfolio.IsEmpty | ( |  | ) |
| inline

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

bool foxit.pdf.Portfolio.IsSortedInAscending | ( |  | ) |
| inline

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 foxit.pdf.Portfolio.SetInitialFileSpecKeyName | ( | string | name | ) |
| inline

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] | name | 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.

Returns
  None.

## ◆ SetInitialViewMode()

void foxit.pdf.Portfolio.SetInitialViewMode | ( | Portfolio.InitialViewMode | mode | ) |
| inline

Set initial view mode.

Parameters

  [in] | mode | Initial view mode. Please refer to values starting from foxit.pdf.Portfolio.InitialViewMode.e_InitialViewDetailMode and it should be one of these values except foxit.pdf.Portfolio.InitialViewMode.e_InitialViewUnknownMode .

Returns
  None.

## ◆ SetSchemaFields()

void foxit.pdf.Portfolio.SetSchemaFields | ( | SchemaFieldArray | field_array | ) |
| inline

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_array | New schema fields array. Order of these fields are decided by their index order in this array.

Returns
  None.

## ◆ SetSortingFieldKeyName()

void foxit.pdf.Portfolio.SetSortingFieldKeyName | ( | string | name | ) |
| inline

Set the key name of a schema field for sorting.

Parameters

  [in] | name | Key name of a schema field for sorting.

Returns
  None.

## ◆ SetSortingOrder()

void foxit.pdf.Portfolio.SetSortingOrder | ( | bool | use_ascending_order | ) |
| inline

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

Parameters

  [in] | use_ascending_order | A 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.