Foxit PDF SDK
FoxitPDFSDKPython2.DocViewerPrefs Class Reference
Inheritance diagram for FoxitPDFSDKPython2.DocViewerPrefs:
FoxitPDFSDKPython2.Base

Public Member Functions

def DocViewerPrefs (other)
 Constructor, with another document viewer preferences object.
More...
 
def GetDict ()
 Get PDF dictionary from current object.
More...
 
def GetNonFullScreenPageMode ()
 Get display mode which specifies how to display the document on exiting full-screen mode when document's display mode is full-screen.
More...
 
def GetPrintArea ()
 Get the page boundary representing the area of a page to be rendered when printing the document.
More...
 
def GetPrintClip ()
 Get the page boundary to which the contents of a page are to be clipped when printing the document.
More...
 
def GetPrintCopies ()
 Get the number of copies to be printed when the print dialog is opened for PDF document.
More...
 
def GetPrintRange ()
 Get page range information which is used to initialize the print dialog when the print dialog is opened for the PDF document.
More...
 
def GetPrintScale ()
 Get page scaling option to be selected when a print dialog is displayed for PDF document.
More...
 
def GetReadingDirection ()
 Get the predominant reading direction for text.
More...
 
def GetUIDisplayStatus (pref)
 Get UI display status of a specified viewer preference item type.
More...
 
def GetViewArea ()
 Get the page boundary representing the area of a page to be displayed when viewing the document on the screen.
More...
 
def GetViewClip ()
 Get the page boundary to which the contents of a page are to be clipped when viewing the document on the screen.
More...
 
def IsEmpty ()
 Check whether current object is empty or not.
More...
 
def SetNonFullScreenPageMode (display_mode)
 Set display mode which specifies how to display the document on exiting full-screen mode when document's display mode is full-screen.
More...
 
def SetPrintArea (box_type)
 Set the page boundary representing the area of a page to be rendered when printing the document.
More...
 
def SetPrintClip (box_type)
 Set the page boundary to which the contents of a page are to be clipped when printing the document.
More...
 
def SetPrintCopies (print_copies)
 Set the number of copies to be printed when the print dialog is opened for PDF document.
More...
 
def SetPrintRange (page_range)
 Set the page range which is used to initialize the print dialog when the print dialog is opened for the PDF document.
More...
 
def SetPrintScale (print_scale)
 Set page scaling option to be selected when a print dialog is displayed for PDF document.
More...
 
def SetReadingDirection (is_left_to_right)
 Set the predominant reading direction for text.
More...
 
def SetUIDisplayStatus (pref, value)
 Set UI display status of a specified viewer preference item type.
More...
 
def SetViewArea (box_type)
 Set the page boundary representing the area of a page to be displayed when viewing the document on the screen.
More...
 
def SetViewClip (box_type)
 Set the page boundary to which the contents of a page are to be clipped when viewing the document on the screen.
More...
 

Static Public Attributes

 e_CenterWindow = _fsdk.DocViewerPrefs_e_CenterWindow
 A flag specifying whether to position the document's window in the center of the screen.

 
 e_DisplayDocTitle = _fsdk.DocViewerPrefs_e_DisplayDocTitle
 A flag specifying whether the window's title bar should display the document title taken from the "Title" entry of the document information dictionary. If false, the title bar should instead display the name of the PDF file containing the document.

 
 e_FitWindow = _fsdk.DocViewerPrefs_e_FitWindow
 A flag specifying whether to resize the document's window to fit the size of the first displayed page.

 
 e_HideMenubar = _fsdk.DocViewerPrefs_e_HideMenubar
 A flag specifying whether to hide the viewer application's menu bar when the document is active.

 
 e_HideToolbar = _fsdk.DocViewerPrefs_e_HideToolbar
 A flag specifying whether to hide the viewer application's tool bars when the document is active.

 
 e_HideWindowUI = _fsdk.DocViewerPrefs_e_HideWindowUI
 A flag specifying whether to hide user interface elements in the document's window (such as scroll bars and navigation controls), leaving only the document's contents displayed.

 
 e_PrintScaleAppDefault = _fsdk.DocViewerPrefs_e_PrintScaleAppDefault
 This means applications should use the current print scaling.

 
 e_PrintScaleNone = _fsdk.DocViewerPrefs_e_PrintScaleNone
 This means the print dialog should reflect no page scaling.

 

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
PDFDoc

Constructor & Destructor Documentation

◆ DocViewerPrefs()

def FoxitPDFSDKPython2.DocViewerPrefs.DocViewerPrefs (   other)

Constructor, with another document viewer preferences object.

Parameters
[in]otherAnother document viewer preferences object.

Member Function Documentation

◆ GetDict()

def FoxitPDFSDKPython2.DocViewerPrefs.GetDict ( )

Get PDF dictionary from current object.

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

◆ GetNonFullScreenPageMode()

def FoxitPDFSDKPython2.DocViewerPrefs.GetNonFullScreenPageMode ( )

Get 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 FoxitPDFSDKPython2.PDFDoc.GetDisplayMode can be used to check document's displaying mode.

Returns
Value of non full-screen mode. It would be one of following values:

◆ GetPrintArea()

def FoxitPDFSDKPython2.DocViewerPrefs.GetPrintArea ( )

Get the page boundary representing the area of a page to be rendered when printing the document.

Returns
The page box type. Please refer to values starting from FoxitPDFSDKPython2.PDFPage.e_MediaBox and this would be one of these values.

◆ GetPrintClip()

def FoxitPDFSDKPython2.DocViewerPrefs.GetPrintClip ( )

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

Returns
The page box type. Please refer to values starting from FoxitPDFSDKPython2.PDFPage.e_MediaBox and this would be one of these values.

◆ GetPrintCopies()

def FoxitPDFSDKPython2.DocViewerPrefs.GetPrintCopies ( )

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

Returns
The number of copies.

◆ GetPrintRange()

def FoxitPDFSDKPython2.DocViewerPrefs.GetPrintRange ( )

Get 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 FoxitPDFSDKPython2.e_ErrFormat .

Returns
Page range.

◆ GetPrintScale()

def FoxitPDFSDKPython2.DocViewerPrefs.GetPrintScale ( )

Get page scaling option to be selected when a print dialog is displayed for PDF document.

Returns
Page scaling option string value. Please refer to values starting from FoxitPDFSDKPython2.DocViewerPrefs.e_PrintScaleNone and this would be one of these values.

◆ GetReadingDirection()

def FoxitPDFSDKPython2.DocViewerPrefs.GetReadingDirection ( )

Get 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).

Returns
true means left-to-right reading order, while false means right-to-left reading order.

◆ GetUIDisplayStatus()

def FoxitPDFSDKPython2.DocViewerPrefs.GetUIDisplayStatus (   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 FoxitPDFSDKPython2.DocViewerPrefs.e_HideToolbar and this should be one of these values.
Returns
The value of the specified viewer preference item type.

◆ GetViewArea()

def FoxitPDFSDKPython2.DocViewerPrefs.GetViewArea ( )

Get the page boundary representing the area of a page to be displayed when viewing the document on the screen.

Returns
The page box type. Please refer to values starting from FoxitPDFSDKPython2.PDFPage.e_MediaBox and this would be one of these values.

◆ GetViewClip()

def FoxitPDFSDKPython2.DocViewerPrefs.GetViewClip ( )

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

Returns
The page box type. Please refer to values starting from FoxitPDFSDKPython2.PDFPage.e_MediaBox and this would be one of these values.

◆ IsEmpty()

def FoxitPDFSDKPython2.DocViewerPrefs.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.

◆ SetNonFullScreenPageMode()

def FoxitPDFSDKPython2.DocViewerPrefs.SetNonFullScreenPageMode (   display_mode)

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 FoxitPDFSDKPython2.PDFDoc.GetDisplayMode can be used to document's displaying mode.

Parameters
[in]display_modeNew display mode when exiting full-screen mode. It should be one of following values:
Returns
None.

◆ SetPrintArea()

def FoxitPDFSDKPython2.DocViewerPrefs.SetPrintArea (   box_type)

Set the page boundary representing the area of a page to be rendered when printing the document.

Parameters
[in]box_typeThe page box type. Please refer to values starting from FoxitPDFSDKPython2.PDFPage.e_MediaBox and this should be one of these values.
Returns
None.

◆ SetPrintClip()

def FoxitPDFSDKPython2.DocViewerPrefs.SetPrintClip (   box_type)

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

Parameters
[in]box_typeThe page box type. Please refer to values starting from FoxitPDFSDKPython2.PDFPage.e_MediaBox and this should be one of these values.
Returns
None.

◆ SetPrintCopies()

def FoxitPDFSDKPython2.DocViewerPrefs.SetPrintCopies (   print_copies)

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

Parameters
[in]print_copiesNew integer value for number of copies. Valid range: from 1 to 5. If input value is outside the valid range, Foxit PDF SDK will use 1 by default.
Returns
None.

◆ SetPrintRange()

def FoxitPDFSDKPython2.DocViewerPrefs.SetPrintRange (   page_range)

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

Parameters
[in]page_rangeA range object that represents the new page range information. It should contain at least one valid range segment. All the indexes specified by this range should be from 0 to (pagecount - 1). pagecount is returned by function FoxitPDFSDKPython2.PDFDoc.GetPageCount .
Returns
None.

◆ SetPrintScale()

def FoxitPDFSDKPython2.DocViewerPrefs.SetPrintScale (   print_scale)

Set page scaling option to be selected when a print dialog is displayed for PDF document.

Parameters
[in]print_scaleNew page scaling option string. Please refer to values starting from FoxitPDFSDKPython2.DocViewerPrefs.e_PrintScaleNone and this should be one of these values.
Returns
None.

◆ SetReadingDirection()

def FoxitPDFSDKPython2.DocViewerPrefs.SetReadingDirection (   is_left_to_right)

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

Parameters
[in]is_left_to_rightThe new reading direction: true means left-to-right reading order, while false means right-to-left reading order.
Returns
None.

◆ SetUIDisplayStatus()

def FoxitPDFSDKPython2.DocViewerPrefs.SetUIDisplayStatus (   pref,
  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 false by default.

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

◆ SetViewArea()

def FoxitPDFSDKPython2.DocViewerPrefs.SetViewArea (   box_type)

Set the page boundary representing the area of a page to be displayed when viewing the document on the screen.

Parameters
[in]box_typeThe page box type. Please refer to values starting from FoxitPDFSDKPython2.PDFPage.e_MediaBox and this should be one of these values.
Returns
None.

◆ SetViewClip()

def FoxitPDFSDKPython2.DocViewerPrefs.SetViewClip (   box_type)

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

Parameters
[in]box_typeThe page box type. Please refer to values starting from FoxitPDFSDKPython2.PDFPage.e_MediaBox and this should be one of these values.
Returns
None.