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

Instance Methods

(FSPDFDictionary *) - getDict
 Get PDF dictionary from current object.
More...
 
(BOOL) - getUIDisplayStatus:
 Get UI display status of a specified viewer preference item type.
More...
 
(id) - initWithDocument:pdf_dict:
 Constructor, with parameters.
More...
 
(id) - initWithOther:
 Constructor, with another document viewer preferences object.
More...
 
(BOOL) - isEmpty
 Check whether current object is empty or not.
More...
 
(void) - setUIDisplayStatus:value:
 Set UI display status of a specified viewer preference item type.
More...
 

Properties

FSPDFDocDisplayMode nonFullScreenPageMode
 Get or Set display mode which specifies how to display the document on exiting full-screen mode when document's display mode is full-screen.
More...
 
FSPDFPageBoxType printArea
 Get or Set the page boundary representing the area of a page to be rendered when printing the document.

 
FSPDFPageBoxType printClip
 Get or Set the page boundary to which the contents of a page are to be clipped when printing the document.

 
int printCopies
 Get or Set the number of copies to be printed when the print dialog is opened for PDF document.

 
FSRangeprintRange
 Get or Set page range information which is used to initialize the print dialog when the print dialog is opened for the PDF document.
More...
 
FSDocViewerPrefsPrintScale printScale
 Get or Set page scaling option to be selected when a print dialog is displayed for PDF document.

 
BOOL readingDirection
 Get or Set the predominant reading direction for text.
More...
 
FSPDFPageBoxType viewArea
 Get or Set the page boundary representing the area of a page to be displayed when viewing the document on the screen.

 
FSPDFPageBoxType viewClip
 Get or Set the page boundary to which the contents of a page are to be clipped when viewing the document on the screen.

 

Detailed Description

Viewer preferences defines the way that a document is to be presented on the screen or in print. This class should be constructed by a valid PDF document object. This class offers functions to get/set different part of a PDF document's viewer preferences, such as UI visibility, display mode for non full-screen mode, reading direction, the type of box item for specified purpose, some preference options used for print and so on.

See also
FSPDFDoc

Method Documentation

◆ getDict()

- (FSPDFDictionary *) getDict

Get PDF dictionary from current object.

Returns
The PDF dictionary. If there is any error, this function will return nil.

◆ getUIDisplayStatus:()

- (BOOL) getUIDisplayStatus: (FSDocViewerPrefsViewerPref pref

Get UI display status of a specified viewer preference item type.

Parameters
[in]prefA viewer preference item type. Please refer to values starting from FSDocViewerPrefsHideToolbar and this should be one of these values.
Returns
The value of the specified viewer preference item type.

◆ initWithDocument:pdf_dict:()

- (id) initWithDocument: (FSPDFDoc*)  document
pdf_dict: (FSPDFDictionary*)  pdf_dict 

Constructor, with parameters.

When input parameter pdf_dict is nil, Foxit PDF SDK will try to access viewer preferences information in the specified PDF document: if there exists viewer preferences information in the PDF document, this function is just to construct a document viewer preferences object to be associated with these information; if there is no such information in the specified PDF document, the constructed document viewer preferences object can be used to set these information to PDF document.

Parameters
[in]documentA valid PDF document object.
[in]pdf_dictA PDF dictionary which represents PDF document viewer preferences information. If this parameter is not nil, this PDF dictionary should have existed in the specified PDF document. If this parameter is nil, that means to access access viewer preferences information in the specified PDF document. Please refer to "Details" part for more details.

◆ initWithOther:()

- (id) initWithOther: (FSDocViewerPrefs*)  other

Constructor, with another document viewer preferences object.

Parameters
[in]otherAnother document viewer preferences 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.

◆ setUIDisplayStatus:value:()

- (void) setUIDisplayStatus: (FSDocViewerPrefsViewerPref pref
value: (BOOL)  value 

Set UI display status of a specified viewer preference item type.

If the viewer preference item type does not existed before and has never been set, the value would be NO by default.

Parameters
[in]prefA viewer preference item type. Please refer to values starting from FSDocViewerPrefsHideToolbar and this should be one of these values.
[in]valueThe new value for the specified viewer preference item type.
Returns
None.

Property Documentation

◆ nonFullScreenPageMode

- (FSPDFDocDisplayMode) nonFullScreenPageMode
readwritenonatomicassign

Get or Set display mode which specifies how to display the document on exiting full-screen mode when document's display mode is full-screen.

This display mode is only useful when document's display mode is full-screen. Function FSPDFDoc::displayMode can be used to check document's displaying mode.

◆ printRange

- (FSRange *) printRange
readwritenonatomicweak

Get or Set page range information which is used to initialize the print dialog when the print dialog is opened for the PDF document.

All the indexes specified in the page range is from 0 to (pagecount - 1). If page range information is invalid, this function will throw exception FSErrFormat.

◆ readingDirection

- (BOOL) readingDirection
readwritenonatomicassign

Get or Set the predominant reading direction for text.

The reading direction information has no direct effect on the document's contents or page numbering but can be used to determine the relative positioning of pages when displayed side by side or printed n-up (that is, multiple PDF pages are printed on a single page).