The jQuery Plugin namespace.
Methods
pccViewer(optionsopt) → {PCCViewer.Viewer}
Creates and embeds a new viewer in the first element of the set of matched elements.
Each call to this method will create and return a unique ViewerControl object. This will call PCCViewer.Viewer#destroy on any existing viewer embedded in the selected element.
If plugin options are provided, then a new viewer is created in the selected element and a PCCViewer.Viewer object is returned. This will call PCCViewer.Viewer#destroy on any viewer that already existed in the selected element.
If plugin options are not provided, then a viewer is not created. Instead, the PCCViewer.Viewer object associated with an existing viewer is returned.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
external:jQuery.fn~Options | <optional> |
Plugin options. |
Returns:
- Type
- PCCViewer.Viewer
Example
//Note: these are already included in the PrizmDoc Samples
var pluginOptions = {
documentID: viewingSessionId, // documentID is a required property
language: languageItems // language is a required property
};
$(document).ready(function () {
// Creates a new viewer in the div with id="viewer1"
var viewer = $("#viewer1").pccViewer(pluginOptions);
// Can also access the returned object through the plugin.
var viewerA = $("#viewer1").pccViewer(); // Does not create a new viewer.
viewerA === viewer; // true
});
Type Definitions
DateFormat
The format to use when displaying a date. The table below outlines the supported date format tokens and provides example output.
Token | Output | |
---|---|---|
Month | M | 1 2 ... 11 12 |
MM | 01 02 ... 11 12 | |
Day | D | 1 2 ... 30 31 |
DD | 01 02 ... 30 31 | |
Year | YY | 70 71 ... 29 30 |
YYYY | 1970 1971 ... 2029 2030 | |
Hour | H | 0 1 ... 22 23 |
HH | 00 01 ... 22 23 | |
h | 1 2 ... 11 12 | |
hh | 01 02 ... 11 12 | |
Minute | m | 0 1 ... 58 59 |
mm | 00 01 ... 58 59 | |
AM/PM | A | AM PM |
a | am pm |
Type:
- String
LanguageOptions
This object is the contents of the language.json
file present in all of the HTML5 viewer samples. This file is generally read server-side and passed into the jQuery plugin. It is strongly encouraged to keep a copy of the original file before doing any edits or translations. This object is required by the viewer UI.
For more information on this language file or localization, please consult the help section titled "Localizing the Viewer".
Type:
- Object
Options
The options object used for the HTML5 viewer jQuery Plugin, external:jQuery.fn#pccViewer. This object is a superset of the main ViewerControl options, PCCViewer.ViewerControl~ViewerControlOptions. All available options for the ViewerControl are also valid here, and will be passed as-is to the ViewerControl during initialization. The following will only include options specific to the jQuery plugin and the Viewer UI functionality inside the viewer.js
file.
Type:
- Object
Properties:
Name | Type | Attributes | Default | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
documentID |
string |
The ID of the document to load. This option is a part of the PCCViewer.ViewerControl~ViewerControlOptions options object. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
documentDisplayName |
string | <optional> |
"file" |
A meaningful name for the document. This name will be used when downloading a signed or redacted document. See PCCViewer.ViewerControl#burnMarkup for more information. Example: "sample.doc" | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
imageHandlerUrl |
string | <optional> |
"../pcc.ashx" |
The end point of the web tier services that support the viewer. Unless specified, viewer.js will assume it is running in the default .NET sample. This option is a part of the PCCViewer.ViewerControl~ViewerControlOptions options object. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
language |
external:jQuery.fn~LanguageOptions |
Specifies the language to use for the text in the ViewerControl. Use this option to localize the viewer. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
icons |
string |
Specifies the SVG for the icons in the viewer. If an SVG symbol element in this SVG has an id that matches a class name in the viewer HTML templates, then the SVG for that symbol will be added to the viewer element with the matching class name. Note that the id must begin with "pcc-icon-". | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
redactionReasons |
external:jQuery.fn~redactionReasons | <optional> |
A list of reasons to be used for the redaction reasons controls. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
annotationsMode |
string | <optional> |
"LegacyAnnotations" |
The annotationsMode specifies the mode in which the annotations will be handled in the viewer. When the annotationsMode is set to "LegacyAnnotations" (default), all annotations will be handled as in the releases prior to 10.3. The second option is "LayeredAnnotations". This option supports the new layered annotations feature available in the releases 10.3 and higher. A convenience enumeration for these two annotation mode types Deprecation Notice: In the future, the "LegacyAnnotations" option will be deprecated. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
annotationID |
string | <optional> |
Specifies the annotation file to be used within the viewer. This property is only observed when | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
autoLoadAnnotation |
boolean | <optional> |
false |
If set to true, the specified annotation file will be loaded when the viewer launches. This property is only observed when | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
autoLoadAllLayers |
boolean | <optional> |
false |
When set to This property is only observed when | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
editableMarkupLayerSource |
string | <optional> |
When set to This property is only observed when | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
editableMarkupLayerValue |
string | <optional> |
When the editableMarkupLayerSource viewer parameter is set to This property is only observed when | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
lockEditableMarkupLayer |
boolean | <optional> |
false |
When set to | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
template |
Object |
This objects holds the various templates that the viewer UI needs. The templates correspond to HTML files available in all samples -- the filenames use the same name as the template names here, appending "Template.html" to the end -- for example, the template Properties
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
uiElements |
Object | <optional> |
This object contains directives to easily hide or disable default UI elements in the viewer. This option is an alternative to removing the elements entirely from the When the viewer removes various elements, it looks for a This feature is enabled for Properties
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
immediateActionMenuMode |
string | <optional> |
"off" |
Sets the mode of the immediate action menu. The following options are available:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
immediateActionMenuActionsFilter |
object | <optional> |
When Properties
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
commentsPanelMode |
string | <optional> |
"auto" |
Sets the mode of the comments panel. The following options are available:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stickyTools |
Object | <optional> |
"default" |
Set the mode for the sticky tools behavior. The following options are available:
See the | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stickyToolsFilter |
Object | <optional> |
When This object can have any of the values listed in PCCViewer.MouseTool.Type, using the same keys as that enumerable. The values for these keys are See the Note that for some tools, like Example: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signatureCategories |
string | <optional> |
Specifies the categories of eSignature to add to the UI. This is a comma separated string containing the types of signatures that the application expects. When no value is passed in, the UI to select categories will be disabled. Example: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
commentDateFormat |
external:jQuery.fn~DateFormat | <optional> |
"MM/DD/YYYY h:mma" |
Specifies the date format to use to display comment dates. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
signatureDateFormat |
external:jQuery.fn~DateFormat | <optional> |
"MM/DD/YYYY" |
Specifies the date format to use to display date signatures. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
predefinedSearch |
Object | <optional> |
Specifies options so that the viewer can prepopulate the document with search terms. An example of this is defined in the Properties
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
searchResultsPageLength |
number | <optional> |
250 |
The number of search results to show at a time in the search results panel. The user can use the search results navigation buttons to page through the search results. If a positive number is not specified, the default of 250 is used. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
revisionsPageLength |
number | <optional> |
250 |
The number of revisions to show at a time in the revisions panel. The user can use the revisions navigation buttons to page through the revisions. If a positive number is not specified, the default of 250 is used. |
predefinedSearchTerm
The following are options available for the Objects used in the predefinedSearch.terms
Array. Any options not specified on the individual search term Object will use the defined property on the predefinedSearch
Object, or a viewer default if one does not exist.
Type:
- Object
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
searchTerm |
string |
The term to use for search. If used along with | ||
highlightColor |
string | <optional> |
The color to use when highlighting results from this particular search. | |
fixed |
boolean | <optional> |
false |
Whether or not the search term is always included when performing a search. If set to true, the value of |
options |
Object | <optional> |
This is the same | |
userDefinedRegex |
string | <optional> |
A regular expression that will be searched in place of searchTerm. The first and last forward slashes, as well as the flags, are stripped from the string. For example, "/Pa(\w+)/ig" will become "Pa(\w+)". When special characters (ex: backslash) are used in the "userDefinedRegex" field, they need to be properly escaped. For example, for searching words that begins with "Pa", the regular expression will be "Pa(\w+)", this regular expression should be properly escaped like this "Pa(\w+)". All patterns use the Global (g) flag. | |
selected |
boolean | <optional> |
false |
Whether or not this term is selected in the Patterns menu by default. This property must be set to true if you expect to use this search terms along with |
redactionReasons
An object defining the redaction reasons to use in the viewer. See the "Using Redaction Reasons" section of this help file for more information.
Type:
- Object
Properties:
Name | Type | Attributes | Default | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
enableRedactionReasonSelection |
boolean | <optional> |
true |
When set to | |||||||||||||||
reasons |
Array.<Object> |
An array of redaction reason objects. Each object will have the following properties: Properties
| |||||||||||||||||
autoApplyDefaultReason |
boolean | <optional> |
false |
When set to | |||||||||||||||
enableFreeformRedactionReasons |
boolean | <optional> |
false |
When set to | |||||||||||||||
maxLengthFreeformRedactionReasons |
number | <optional> |
false |
Sets the maximum length of a typed redaction reason. |