Foxit PDF SDK
FSPortfolio Class Reference
Inheritance diagram for FSPortfolio:
FSBase

Instance Methods

(FSPDFDoc *) - getPortfolioPDFDoc
 Get related portfolio PDF document object.
More...
 
(FSPortfolioNode *) - getRootNode
 Get root node which is always a folder node.
More...
 
(id) - initWithOther:
 Constructor, with another PDF portfolio object.
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) - setSortingOrder:
 Set the boolean to decide whether nodes should be sorted in ascending order or not.
More...
 

Class Methods

(FSPortfolio *) + createPortfolio
 Create a PDF portfolio with a new and blank PDF document created automatically.
More...
 
(FSPortfolio *) + createPortfolioWithPDFDoc:
 Create a PDF portfolio with an existed portfolio PDF document.
More...
 

Properties

NSString * initialFileSpecKeyName
 Get or Set the key name of an attachment (as file specification) which should be the initial document.
More...
 
FSPortfolioInitialViewMode initialViewMode
 Get or Set initial view mode.

 
FSSchemaFieldArrayschemaFields
 Get or Set schema fields.
More...
 
NSString * sortingFieldKeyName
 Get or Set the key name of a schema field which is used for sorting.

 

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

Method Documentation

◆ createPortfolio()

+ (FSPortfolio *) createPortfolio

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::schemaFields can be used to retrieve default schema fields.

Returns
A PDF portfolio object.

◆ createPortfolioWithPDFDoc:()

+ (FSPortfolio *) createPortfolioWithPDFDoc: (FSPDFDoc*)  portfolio_pdf_doc

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.

◆ getPortfolioPDFDoc()

- (FSPDFDoc *) getPortfolioPDFDoc

Get related portfolio PDF document object.

Returns
Related portfolio PDF document object.

◆ getRootNode()

- (FSPortfolioNode *) getRootNode

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.

◆ initWithOther:()

- (id) initWithOther: (FSPortfolio*)  other

Constructor, with another PDF portfolio object.

Parameters
[in]otherAnother bookmark object.

◆ isEmpty()

- (BOOL) isEmpty

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
YES means current object is empty, while NO means not.

◆ isSortedInAscending()

- (BOOL) isSortedInAscending

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

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

◆ setSortingOrder:()

- (void) setSortingOrder: (BOOL)  use_ascending_order

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: YES means nodes should be sorted in ascending order with specified field, while NO means nodes should sorted in descending order with specified field.
Returns
None.

Property Documentation

◆ initialFileSpecKeyName

- (NSString *) initialFileSpecKeyName
readwritenonatomicweak

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

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

◆ schemaFields

- (FSSchemaFieldArray *) schemaFields
readwritenonatomicweak

Get or Set schema fields.

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