SetaPDF_Core_Document_Catalog_ViewerPreferences Class representing the access to the ViewerPreferences dictionary of a document

File: /SetaPDF/Core/Document/Catalog/ViewerPreferences.php

Class hierarchy

Summary

Constants

DIRECTION_L2R

DIRECTION_R2L

DUPLEX_FLIP_LONG_EDGE

Duplex and flip on the long edge of the sheet.

DUPLEX_FLIP_SHORT_EDGE

Duplex and flip on the short edge of the sheet.

DUPLEX_SIMPLEX

Print single-sided.

NON_FULL_SCREEN_PAGE_MODE_USE_NONE

Neither document outline nor thumbnail images visible.

NON_FULL_SCREEN_PAGE_MODE_USE_OC

Optional content group panel visible.

NON_FULL_SCREEN_PAGE_MODE_USE_OUTLINES

Document outline visible.

NON_FULL_SCREEN_PAGE_MODE_USE_THUMBS

Thumbnail images visible.

PRINT_SCALING_APP_DEFAULT

Reader’s default print scaling.

PRINT_SCALING_NONE


Properties


Methods

__construct()

_getValue()

protected mixed SetaPDF_Core_Document_Catalog_ViewerPreferences::_getValue ( string $key [, mixed $default = false [, boolean $pdfObject = false ]] )

Helper method to get a value of the ViewerPreferences dictionary.

Parameters
$key : string
 
$default : mixed
 
$pdfObject : boolean
 

_removeKey()

Helper method for removing a key from the ViewerPreferences dictionary.

Parameters
$key : string
 

_setBooleanValue()

protected void SetaPDF_Core_Document_Catalog_ViewerPreferences::_setBooleanValue ( string $key, boolean $value )

Helper method for setting boolean values.

Parameters
$key : string
 
$value : boolean
 

_setNameValue()

protected void SetaPDF_Core_Document_Catalog_ViewerPreferences::_setNameValue ( string $key, string $name )

Helper method for setting a name value.

Parameters
$key : string
 
$name : string
 

_setValue()

Helper method for setting a value.

Parameters
$key : string
 
$value : SetaPDF_Core_Type_AbstractType
 

cleanUp()

Release memory and cycled references.

getCenterWindow()

Get the flag specifying whether to position the document’s window in the center of the screen.

getDirection()

Get the predominant reading order for text.

getDisplayDocTitle()

Get the flag whether the title or the filename of the document should be displayed in the window’s title bar.

getDocument()

getDuplex()

Get the paper handling option that shall be used when printing the file from the print dialog.

getFitWindow()

Get the flag specifying whether to resize the document’s window to fit the size of the first displayed page.

getHideMenubar()

Get the flag specifying whether to hide the conforming reader’s menu bar when the document is active.

getHideToolbar()

Get the flag specifying whether to hide the conforming reader’s tool bars when the document is active.

getHideWindowUI()

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

getNonFullScreenPageMode()

Get the document's page mode, specifying how to display the document on exiting full-screen mode.

getNumCopies()

public bool|mixed SetaPDF_Core_Document_Catalog_ViewerPreferences::getNumCopies ( [ int $defaultValue = 1 ] )

Get the number of copies that shall be printed when the print dialog is opened.

Parameters
$defaultValue : int

A default value, to be used if no preference is defined.

getPickTrayByPdfSize()

public bool|mixed SetaPDF_Core_Document_Catalog_ViewerPreferences::getPickTrayByPdfSize ( [ null|boolean $defaultValue = null ] )

Get the flag specifying whether the PDF page size shall be used to select the input paper tray.

Parameters
$defaultValue : null|boolean
 

getPrintArea()

Get the name of the page boundary representing the area of a page that shall be rendered when printing the document.

getPrintClip()

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

getPrintPageRange()

public array SetaPDF_Core_Document_Catalog_ViewerPreferences::getPrintPageRange ( [ array $defaultValue = array ( ) ] )

Get the page numbers used to initialize the print dialog box when the file is printed.

Parameters
$defaultValue : array

A default value that will be returned if no preference is defined.

getPrintScaling()

Get the page scaling option that shall be selected when a print dialog is displayed for this document.

getViewArea()

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

getViewClip()

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

setCenterWindow()

public void SetaPDF_Core_Document_Catalog_ViewerPreferences::setCenterWindow ( [ boolean $value = true ] )

Set the flag specifying whether to position the document’s window in the center of the screen.

Parameters
$value : boolean

A boolean value defining whether to position the document’s window in the center.

setDirection()

Set the predominant reading order for text.

Parameters
$name : string

A constant value of SetaPDF_Core_Document_Catalog_ViewerPreferences::DIRECTION_XXX.

setDisplayDocTitle()

public void SetaPDF_Core_Document_Catalog_ViewerPreferences::setDisplayDocTitle ( [ boolean $value = true ] )

Set the flag whether the title or the filename of the document should be displayed in the window’s title bar.

Parameters
$value : boolean

The value defining whether if the title of the document should be displayed in the window’s title bar (true) or the filename (false).

setDuplex()

Set the paper handling option that shall be used when printing the file from the print dialog.

Parameters
$name : string|false

A constant value of SetaPDF_Core_Document_Catalog_ViewerPreferences::DUPLEX_XXX. To remove this preference pass false.

setFitWindow()

public void SetaPDF_Core_Document_Catalog_ViewerPreferences::setFitWindow ( [ boolean $value = true ] )

Set the flag specifying whether to resize the document’s window to fit the size of the first displayed page.

Parameters
$value : boolean

A boolean value defining whether to resize the document’s window.

setHideMenubar()

public void SetaPDF_Core_Document_Catalog_ViewerPreferences::setHideMenubar ( [ boolean $value = true ] )

Set the flag specifying whether to hide the conforming reader’s menu bar when the document is active.

Does not affect the display through a browser plugin.

Parameters
$value : boolean

A boolean value defining whether to hide the menu bar or not.

setHideToolbar()

public void SetaPDF_Core_Document_Catalog_ViewerPreferences::setHideToolbar ( [ boolean $value = true ] )

Set the flag specifying whether to hide the conforming reader’s tool bars when the document is active.

Parameters
$value : boolean

A boolean value defining whether to hide the tool bars or not.

setHideWindowUI()

public void SetaPDF_Core_Document_Catalog_ViewerPreferences::setHideWindowUI ( [ boolean $value = true ] )

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

Parameters
$value : boolean

A boolean value defining whether to hide user interface elements in the document's windows.

setNonFullScreenPageMode()

public void SetaPDF_Core_Document_Catalog_ViewerPreferences::setNonFullScreenPageMode ( [ string $name = self::NON_FULL_SCREEN_PAGE_MODE_USE_NONE ] )

Set the document's page mode, specifying how to display the document on exiting full-screen mode.

Parameters
$name : string

A constant value of SetaPDF_Core_Document_Catalog_ViewerPreferences::NON_FULL_SCREEN_PAGE_MODE_XXX.

setNumCopies()

Set the number of copies that shall be printed when the print dialog is opened for this file.

Parameters
$numCopies : integer

The number of copies.

setPickTrayByPdfSize()

Set the flag specifying whether the PDF page size shall be used to select the input paper tray.

Parameters
$value : boolean

A boolean value

setPrintArea()

Set the name of the page boundary representing the area of a page that shall be rendered when printing the document.

Parameters
$boundaryName : string

A boundary name as defined as a constant in SetaPDF_Core_PageBoundaries.

Exceptions

Throws InvalidArgumentException

setPrintClip()

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

Parameters
$boundaryName : string

A boundary name as defined as a constant in SetaPDF_Core_PageBoundaries.

Exceptions

Throws InvalidArgumentException

setPrintPageRange()

public void SetaPDF_Core_Document_Catalog_ViewerPreferences::setPrintPageRange ( [ array|null $pageRange = null ] )

Set the page numbers used to initialize the print dialog box when the file is printed.

Parameters
$pageRange : array|null

An array of even number of integer values to be interpreted in pairs. Each pair represents the first and last pages in a sub-range of pages.

setPrintScaling()

Set the page scaling option that shall be selected when a print dialog is displayed for this document.

Parameters
$name : string

A constant value of SetaPDF_Core_Document_Catalog_ViewerPreferences::PRINT_SCALING_XXX.

setViewArea()

public void SetaPDF_Core_Document_Catalog_ViewerPreferences::setViewArea ( string $boundaryName )

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

Parameters
$boundaryName : string

A boundary name as defined as a constant in SetaPDF_Core_PageBoundaries.

Exceptions

Throws InvalidArgumentException

setViewClip()

public void SetaPDF_Core_Document_Catalog_ViewerPreferences::setViewClip ( string $boundaryName )

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

Parameters
$boundaryName : string

A boundary name as defined as a constant in SetaPDF_Core_PageBoundaries.

Exceptions

Throws InvalidArgumentException