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
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 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 fill="#000000" height="15px" width="15px" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 430 430" xml:space="preserve"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <g> <g> <g> <polygon points="281,0 126.263,60 281,60 "></polygon> <path d="M85,76v354h260V76H85z M310.5,152c0,4.418-3.582,8-8,8h-71c-4.418,0-8-3.582-8-8c0-4.418,3.582-8,8-8h71 C306.918,144,310.5,147.582,310.5,152z M260.151,281H223v-82.495C242.647,205.947,258.321,240.126,260.151,281z M153.5,113h123 c4.418,0,8,3.582,8,8c0,4.418-3.582,8-8,8h-123c-4.419,0-8-3.582-8-8C145.5,116.582,149.081,113,153.5,113z M115.319,297h38.509 c1.536,38.644,14.136,71.068,32.413,87.796C147.483,373.178,118.618,338.693,115.319,297z M115.318,281 c1.949-24.628,12.813-46.743,29.382-63.111c11.47-11.35,25.678-19.932,41.542-24.687c-18.278,16.728-30.878,49.152-32.415,87.798 H115.318z M207,379.495c-19.647-7.442-35.32-41.621-37.151-82.495H207V379.495z M207,281h-37.151 c1.831-40.874,17.504-75.053,37.151-82.495V281z M199.5,160h-72c-4.419,0-8-3.582-8-8c0-4.418,3.581-8,8-8h72 c4.418,0,8,3.582,8,8C207.5,156.418,203.918,160,199.5,160z M223,379.495V297h37.152 C258.321,337.874,242.647,372.053,223,379.495z M243.76,384.796c18.277-16.728,30.877-49.152,32.413-87.796h38.508 C311.382,338.693,282.517,373.178,243.76,384.796z M276.173,281c-1.536-38.646-14.137-71.07-32.415-87.798 c15.864,4.755,30.072,13.337,41.542,24.687c16.569,16.368,27.433,38.484,29.382,63.111H276.173z"></path> </g> </g> </g> </g></svg>'
}]
return pOptions;
}
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
A Boolean
flag that determines whether the WebViewer theme is dark or light.
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
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
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
The CSS height value is applied to the PDF Region Pro region.
function( pOptions ) {
pOptions.height = "70vh";
return pOptions
}
annotationUser
A String
that is used to determine which user is used to create annotations. The default is: Guest.
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
PDF Region Pro supports the Item(s) to submit region attribute. Whenever an PDF Region Pro region is refreshed the given item values are stored in APEX Session State.
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.