Class Index

Classes


Class PDFNet.PDFDocViewPrefs

PDFNet.PDFDocViewPrefs

Class Summary
Constructor Attributes Constructor Name and Description
 
PDFDocViewPrefs is a high-level utility class that can be used to control the way the document is to be presented on the screen or in print.
Method Summary
Method Attributes Method Name and Description
 
copy()
Copy Constructor
<static>  
PDFNet.PDFDocViewPrefs.create(tr)
PdFDocViewPrefs constructor.
 
 
 
 
 
getPref(pref)
 
 
 
 
 
 
setDirection(left_to_right)
sets the predominant reading order for text.
 
A utility method used to set the fist page displayed after the document is opened.
 
Sets PageLayout property and change the value of the PageLayout key in the Catalog dictionary.
 
set the document's page mode, specifying how to display the document on exiting full-screen mode.
 
Sets PageMode property and change the value of the PageMode key in the Catalog dictionary.
 
setPref(pref, value)
sets the value of given ViewerPref property.
 
sets the page boundary representing the area of a page to be rendered when printing the document.
 
sets the page boundary to which the contents of a page are to be clipped when printing the document.
 
Sets the page boundary representing the area of a page to be displayed when viewing the document on the screen.
 
sets the page boundary to which the contents of a page are to be clipped when viewing the document on the screen.
Class Detail
PDFNet.PDFDocViewPrefs(id)
PDFDocViewPrefs is a high-level utility class that can be used to control the way the document is to be presented on the screen or in print. PDFDocViewPrefs class corresponds to PageMode, PageLayout, and ViewerPreferences entries in the document's catalog. For more details please refer to section 8.1 'Viewer Preferences' in PDF Reference Manual.
Parameters:
id
Method Detail
{PDFDocViewPrefs} copy()
Copy Constructor
Returns:
{PDFDocViewPrefs} A promise that resolves to an object of type: "PDFDocViewPrefs" (generated documentation)

<static> {PDFDocViewPrefs} PDFNet.PDFDocViewPrefs.create(tr)
PdFDocViewPrefs constructor. Typically this constructor is never used since it is easier to obtain PDFDocViewPrefs using PDFDoc.GetViewPrefs()
Parameters:
{Obj} tr
(generated documentation)
Returns:
{PDFDocViewPrefs} A promise that resolves to an object of type: "PDFDocViewPrefs" (generated documentation)

{boolean} getDirection()
Returns:
{boolean} A promise that resolves to true is the predominant reading order for text is left to right, false otherwise. See SetDirection() for more information.

{number} getLayoutMode()
Return value enum:
PDFNet.PDFDocViewPrefs.PageLayout = {
	e_Default : 0
	e_SinglePage : 1
	e_OneColumn : 2
	e_TwoColumnLeft : 3
	e_TwoColumnRight : 4
	e_TwoPageLeft : 5
	e_TwoPageRight : 6
}
Returns:
{number} A promise that resolves to the value of currently selected PageLayout property.

{number} getNonFullScreenPageMode()
Return value enum:
PDFNet.PDFDocViewPrefs.PageMode = {
	e_UseNone : 0
	e_UseThumbs : 1
	e_UseBookmarks : 2
	e_FullScreen : 3
	e_UseOC : 4
	e_UseAttachments : 5
}
Returns:
{number} A promise that resolves to the PageMode used after exiting full-screen mode.

{number} getPageMode()
Return value enum:
PDFNet.PDFDocViewPrefs.PageMode = {
	e_UseNone : 0
	e_UseThumbs : 1
	e_UseBookmarks : 2
	e_FullScreen : 3
	e_UseOC : 4
	e_UseAttachments : 5
}
Returns:
{number} A promise that resolves to the value of currently selected PageMode property.

{boolean} getPref(pref)
Parameters:
{number} pref
the ViewerPref property type to query.
Returns:
{boolean} A promise that resolves to the value of given ViewerPref property.

{number} getPrintArea()
Return value enum:
PDFNet.Page.Box = {
	e_media : 0
	e_crop : 1
	e_bleed : 2
	e_trim : 3
	e_art : 4
}
Returns:
{number} A promise that resolves to the page boundary representing the area of a page to be rendered when printing the document.

{number} getPrintClip()
Return value enum:
PDFNet.Page.Box = {
	e_media : 0
	e_crop : 1
	e_bleed : 2
	e_trim : 3
	e_art : 4
}
Returns:
{number} A promise that resolves to the page boundary to which the contents of a page are to be clipped when printing the document.

{Obj} getSDFObj()
Returns:
{Obj} A promise that resolves to document's SDF/Cos 'ViewerPreferences' dictionary or NULL if the object is not present.

{number} getViewArea()
Return value enum:
PDFNet.Page.Box = {
	e_media : 0
	e_crop : 1
	e_bleed : 2
	e_trim : 3
	e_art : 4
}
Returns:
{number} A promise that resolves to the page boundary representing the area of a page to be displayed when viewing the document on the screen.

{number} getViewClip()
Return value enum:
PDFNet.Page.Box = {
	e_media : 0
	e_crop : 1
	e_bleed : 2
	e_trim : 3
	e_art : 4
}
Returns:
{number} A promise that resolves to the page boundary to which the contents of a page are to be clipped when viewing the document on the screen.

setDirection(left_to_right)
sets the predominant reading order for text. This flag 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.
Parameters:
{boolean} left_to_right
true if the predominant reading order for text is from left to right and false if it is right to left (including vertical writing systems, such as Chinese, Japanese, and Korean). Default value: left_to_right is true.

setInitialPage(dest)
A utility method used to set the fist page displayed after the document is opened. This method is equivalent to PDFDoc::SetOpenAction(goto_action). If OpenAction is not specified the document should be opened to the top of the first page at the default magnification factor.
Parameters:
{Destination} dest
A value specifying the page destination to be displayed when the document is opened. Example:

setLayoutMode(mode)
Sets PageLayout property and change the value of the PageLayout key in the Catalog dictionary.
Parameters:
{number} mode
New PageLayout setting. Default value is e_SinglePage.

setNonFullScreenPageMode(mode)
set the document's page mode, specifying how to display the document on exiting full-screen mode.
Parameters:
{number} mode
PageMode used after exiting full-screen mode. Default value: e_UseNone.

setPageMode(mode)
Sets PageMode property and change the value of the PageMode key in the Catalog dictionary.
Parameters:
{number} mode
New PageMode setting. Default value is e_UseNone.

setPref(pref, value)
sets the value of given ViewerPref property.
Parameters:
{number} pref
the ViewerPref property type to modify.
{boolean} value
The new value for the property.

setPrintArea(box)
sets the page boundary representing the area of a page to be rendered when printing the document.
Parameters:
{number} box
printing region. The default value is page crop-box.

setPrintClip(box)
sets the page boundary to which the contents of a page are to be clipped when printing the document.
Parameters:
{number} box
printing clip region. The default value is page crop-box.

setViewArea(box)
Sets the page boundary representing the area of a page to be displayed when viewing the document on the screen.
Parameters:
{number} box
page boundary displayed when viewing the document on the screen. By default, PDF viewers will display the crop-box.

setViewClip(box)
sets the page boundary to which the contents of a page are to be clipped when viewing the document on the screen.
Parameters:
{number} box
screen clip region. The default value is page crop-box.

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Sep 09 2016 14:32:41 GMT-0700 (PDT)