Standard Attributes
The plug-in uses the following standard attributes exposed in the APEX page designer:
- Has “Page Items to Submit” Attribute
- Has “Initialization JavaScript Code” Attribute
- Has “CSS Class” Column Attribute
- Has “Custom Attributes” Column Attribute
Advanced
Section titled “Advanced”Initialization JavaScript Code
Section titled “Initialization JavaScript Code”The attribute value must be an anonymous function that accepts only one parameter, a JSON object containing all the options rendered from the PDF Region Pro WebViewer package on a page load. The function must return a JSON object to initialize and customize the WebViewer.
The default value is presented below but does not include all available options.
function( pOptions ) { pOptions.zoomLevel = 90; //Will get translated to a string "90%" pOptions.darkMode = false; pOptions.showSidebar = false; pOptions.language = "EN"; pOptions.activeTool = "MEASUREMENT" pOptions.height = "70vh" pOptions.annotationUser = "Guest" pOptions.redactionSearchPatterns = [{ label: 'Hide word PDF', type: 'confidentialInformation', regex: /pdf/i, icon: '<svg>...</svg>' }]
return pOptions;}zoomLevel
Section titled “zoomLevel”A Number or a String from 1 to 9999.
The syntax is as followed:
function( pOptions ) { pOptions.zoomLevel = 90; // Will get translated to a string "90%" pOptions.zoomLevel = "90%"
return pOptions;}darkMode
Section titled “darkMode”A Boolean flag that determines whether the WebViewer theme is dark or light.
showSidebar
Section titled “showSidebar”A Boolean flag that determines whether the editor’s sidebar is visible. If set to true the editor’s sidebar is displayed, otherwise, the sidebar is hidden.
language
Section titled “language”A String defining the language of the editor. Fully translated languages are:
English: "EN"French (Français): "FR"Portuguese (Português): "PT_BR"Chinese-Simplified (中文): "ZH_CN"Japanese (日本語): "JA"Korean (한국어): "KO"Dutch/German (Deutsch): "DE"Spanish (Español): "ES"Italian (Italiano): "IT"Note that there are more languages available than described above but they are not 100% fully translated.
All available languages:
"English": "EN""Greek": "EL""German": "DE""Spanish": "ES""French": "FR""Hungarian": "HU""Italian": "IT""Japanese": "JA""Korean": "KO""Dutch": "NL""Portuguese": "PT_BR""Polish": "PL""Ukrainian": "UK""Russian": "RU""Romanian": "RO""Swedish": "SV""Turkish": "TR""Thai": "TH""Vietnamese": "VI""Malay": "MS""Hindi": "HI""Bengali": "BN""Chinese-Simplified": "ZH_CN""Chinese-Traditional": "ZH_TW""Czech": "CS""Indonesian": "ID"activeTool
Section titled “activeTool”A String that is used to determine which tool should be selected, the default is: VIEW. Note that the editor should have access to the correct permissions in order for this to work.
For example: User has only access to the Annotation and the Measurement tools, if you set activeTool to EDIT, this will get reverted to the default VIEW because the user has no access to the Edit Tools
height
Section titled “height”The CSS height value is applied to the PDF Region Pro region.
function( pOptions ) { pOptions.height = "70vh";
return pOptions}annotationUser
Section titled “annotationUser”A String that is used to determine which user is used to create annotations. The default is: Guest.
redactionSearchPatterns
Section titled “redactionSearchPatterns”A Array of Objects that define the redaction search patterns. The default is: an empty array.
More information on the Apryse documentation
Item(s) to submit
Section titled “Item(s) to submit”PDF Region Pro supports the Item(s) to submit region attribute. Whenever a PDF Region Pro region is refreshed the given item values are stored in APEX Session State.
Read Only
Section titled “Read Only”PDF Region Pro supports the Read Only region attribute. Whenever the attribute is true the editor is used to display documents without the possibility to modify a document.
The region attribute evaluation is superior to the evaluation of a custom function returning document permissions. For example, if the attribute Read-Only is set to Always and a custom function’s results allow the current end-user to modify the requested file, the editor is run in read-only mode.