PrizmDoc v12.2 - March 9, 2017
Namespace: PCCViewer

Namespace: PCCViewer

PCCViewer

PCCViewer is the global namespace used for members of this API.

Source:
  • PCCViewer.ViewerControl.js, line 12

Classes

AjaxResponse
BurnRequest
Comment
Conversation
ConversionRequest
DocumentHyperlink
Error
Event
ImageStamps
LoadMarkupLayersRequest
Mark
MarkupLayer
MarkupLayerCollection
MouseTool
ObservableCollection
PrintRequest
Promise
SearchRequest
SearchResult
SearchTask
SearchTaskResult
SignatureControl
SignatureDisplay
ThumbnailControl
Viewer
ViewerControl

Namespaces

Ajax
Language
MouseTools
Signatures
Util

Members

<static, readonly> EventType :string

The EventType enumeration defines event types known to PCCViewer.ViewerControl.

Note: This enumeration is for convenience for API developers. Instead of using this enumeration, you can pass string values of the eventType (enumeration values)

Type:
  • string
Properties:
Name Type Default Description
ViewerReady string ViewerReady

Triggered when the Viewer is ready.

Augmented properties of the PCCViewer.Event object for this event:

  • None
PageCountReady string PageCountReady

Event is triggered when the viewer has an actual page count from the server and the consumer can begin to interact with the viewer interfaces.

Augmented properties of the PCCViewer.Event object for this event:

  • pageCount {number} The actual page count of the document.
EstimatedPageCountReady string EstimatedPageCountReady

Event is triggered when the viewer has an estimated page count from the server.

Augmented properties of the PCCViewer.Event object for this event:

  • pageCount {number} The estimated page count of the document.
PageChanged string PageChanged

Event is triggered when the viewer changed the current page.

Augmented properties of the PCCViewer.Event object for this event:

  • none
PageLoadFailed string PageLoadFailed

Event is triggered when the viewer changed the current page.

Augmented properties of the PCCViewer.Event object for this event:

  • pageNumber {number} Indicates the page number of the page that failed to load.
  • statusCode {number} Indicates the HTTP page load failure error code returned by the image service
  • accusoftErrorNumber {number} The error codes in this category currently are:
    • 4001 Document requires a password (HTTP statusCode will be 480)
    • 5001 Unable to generate Page (HTTP statusCode will be 580)
    • 5002 Download of the file to the Image service failed (HTTP statusCode will be 580)
  • accusoftErrorMessage {string} Description of the error provided by the Image service.
PageDisplayed string PageDisplayed

Event is triggered when the viewer has displayed a page. If the content of a page is large, for example an engineering drawing with several hundred nodes, then the browser may be busy still rendering/preparing the content when this event gets fired. Note that if the maxOutOfViewDisplay viewer parameter is greater than 0, then out-of-view pages will be displayed (the page content will be loaded in the DOM, though the page will not be visible since it is out of view). In this scenario, the PageDisplayed event will fire for out-of-view pages.

Augmented Properties of the PCCViewer.Event object for this event:

  • pageNumber {number} The page number of the displayed page.
PageRotated string PageRotated

Event is triggered when the viewer has displayed a page, not necessarily the content of a page.

Augmented properties of the PCCViewer.ViewerControl.Event object for this event:

  • pageNumber {number} The page number of the page that was rotated.
DocumentRotated string DocumentRotated

Event is triggered when the rotation of all pages in the document changes.

Augmented properties of the PCCViewer.Event object for this event:

  • degreesClockwise {number} The amount in degrees clockwise the pages were rotated.
ScaleChanged string ScaleChanged

Event is triggered when the scaling of page(s) in the viewer changed. After the user actions, zoom buttons pressed, zoom api called, fit type changed, viewer mode changed and that resulted in a scale change.

Augmented properties of the PCCViewer.Event object for this event:

DocumentPrinted string DocumentPrinted

Event is triggered when the print button was clicked in the viewer's print dialog. We have no way to know if the page printed in the system print dialog.

Augmented properties of the PCCViewer.Event object for this event:

  • pageNumbers {Array.<number>} An array containing the page number of each page that was printed. NOTE: In the PageView viewer, the array contains the current page only.
  • orientation {string} "portrait" or "landscape"
  • includeMarks {boolean} Indicates whether the marks were included in the printed pages.
TextSelected string TextSelected

Event is triggered when text is selected.

Augmented properties of the PCCViewer.Event object for this event:

  • selectedText {string} Deprecated since v9.2 (use the textSelection.text argument instead).
  • pageNumbers {Array.<number>} Deprecated since v9.2 (use the textSelection.pageNumber argument instead).
  • textSelection {PCCViewer.ViewerControl.TextSelection} An object that provides information regarding the text selection.
  • clientX {number} An optional value indicating the absolute window position in the x-axis of the cursor at the end of the selection. A value for this property is available only when using the SelectText mouse tool.
  • clientY {number} An optional value indicating the absolute window position in the y-axis of the cursor at the end of the selection. A value for this property is available only when using the SelectText mouse tool.
  • handleClientX {number} An optional value indicating the absolute window position in the x-axis of the handle at the sliding end of the selection. A value for this property is available when the text is initially selected or when the selection is edited. (In either case, one end of the selection is stationary throughout the drag, and the other end is sliding.)
  • handleClientY {number} An optional value indicating the absolute window position in the y-axis of the handle at the sliding end of the selection. A value for this property is available when the text is initially selected or when the selection is edited. (In either case, one end of the selection is stationary throughout the drag, and the other end is sliding.)
MouseToolChanged string MouseToolChanged

Event is triggered when the mouse tool changed. This change could be initiated through the viewer's toolbar, viewer's context menu, or viewer's API.

Augmented properties of the PCCViewer.Event object for this event:

  • mouseToolName {string} Indicates the name of the new mouse tool.
SearchPerformed string SearchPerformed

Triggered when a search is performed with a call to PCCViewer.ViewerControl#search.

Augmented properties of the PCCViewer.Event object for this event:

PartialSearchResultsAvailable string PartialSearchResultsAvailable

Event is triggered when partial search results are available

Augmented properties of the PCCViewer.Event object for this event:

  • partialSearchResults {Array.<PCCViewer.SearchResult>} The new search results found since the last "PartialSearchResultsAvailable" event.
  • pagesWithoutText {Array.<number>} The set of pages that could not be searched because searchable text was not available for the page. This includes only the pages on which searching was attempted since the last "PartialSearchResultsAvailable" event.
SearchCompleted string SearchCompleted

Event is triggered when search is completed successfully, user cancelled, or an exception. This event will also return the searchResult object to the consumer

Augmented properties of the PCCViewer.Event object for this event:

SearchFailed string SearchFailed

Event is triggered when search failed to due to an exception.

Augmented properties of the PCCViewer.Event object for this event:

  • none
SearchCancelled string SearchCancelled

Event is triggered when search is cancelled by the user.

Augmented properties of the PCCViewer.Event object for this event:

  • errorMessage {string} A human readable error message indicating why the search failed.
SearchResultsAvailable string SearchResultsAvailable

Event is triggered when search is completed and the results are available. This event will return the full results object to the consumer if available.

Augmented properties of the PCCViewer.Event object for this event:

SearchCleared string SearchCleared

Event is triggered when the current search is cleared. After this event, calls to PCCViewer#setSelectedSearchResult, {@link PCCViewer#getSelectedSearchResult}, and PCCViewer#getSearchRequest will no longer be valid.

Augmented properties of the PCCViewer.Event object for this event:

  • none
SearchResultSelectionChanged string SearchResultSelectionChanged

Event is triggered when the selected search result changes, including when the first result is selected, the selection is cleared, or the selection changes from one result to another.

Augmented properties of the PCCViewer.Event object for this event:

  • none
PrintRequested string PrintRequested

Event is triggered when a document print is requested through PCCViewer.ViewerControl#print.

Augmented properties of the PCCViewer.Event object for this event:

MarkupLoaded string MarkupLoaded

Event is triggered when annotations are loaded from a file. Triggered when annotations are loaded from a file.

Augmented properties of the PCCViewer.Event object for this event:

  • name {string} The name of the markup data that was loaded.
  • loadedMarks {Array.<PCCViewer.Mark>} The marks that were loaded.
MarkupSaved string MarkupSaved

Event is triggered when annotations save to the server.

Augmented properties of the PCCViewer.Event object for this event:

  • name {string} The name of the markup data that was saved.
MarkChanged string MarkChanged

Event is triggered when one or more attributes changes on an annotation.

Augmented properties of the PCCViewer.Event object for this event:

  • mark {PCCViewer.Mark} The changed annotation object
  • pageNumber {number} The page number of the annotation.
  • propertyNames {Array.<string>} The names of properties that have changed.
MarkCreated string MarkCreated

Event is triggered when a new annotation is created.

Augmented properties of the PCCViewer.Event object for this event:

  • mark {PCCViewer.Mark} The annotation object.
  • pageNumber {number} The page number of the annotation.
  • clientX {number} An optional value indicating the absolute window position in the x-axis of the cursor at the end of the selection. A value for this property is available only when using a mouse tool to create the mark. Values will be undefined for marks added using the API.
  • clientY {number} An optional value indicating the absolute window position in the y-axis of the cursor at the end of the selection. A value for this property is available only when using a mouse tool to create the mark. Values will be undefined for marks added using the API.
MarkRemoved string MarkRemoved

Event is triggered when a annotation is removed from a page.

Augmented properties of the PCCViewer.Event object for this event:

  • mark {PCCViewer.Mark} The annotation object.
  • pageNumber {number} The page number of the annotation.
MarkReordered string MarkReordered

Event is triggered when the annotation's stacking order has changed.

Augmented properties of the PCCViewer.Event object for this event:

  • mark {PCCViewer.Mark} The annotation object.
  • pageNumber {number} The page number of the annotation.
  • index {number} The new stacking order index of the annotation.
  • oldIndex {number} The old stacking order index of the annotation.
MarkSelectionChanged string MarkSelectionChanged

Triggered when the set of selected annotations has changed.

Augmented properties of the PCCViewer.Event object for this event:

  • pageNumber {number} The page number containing the mark that was selected or deselected.
MarkMouseEnter string MarkMouseEnter

Event is triggered when the mouse enters the annotation bounding box.

Augmented properties of the PCCViewer.Event object for this event:

  • mark {PCCViewer.Mark} The annotation object.
  • clientX {number} A value indicating the absolute window position in the x-axis of the cursor.
  • clientY {number} A value indicating the absolute window position in the y-axis of the cursor.
MarkMouseOver string MarkMouseOver

Event is triggered when the mouse moves over the annotation bounding box.

Augmented properties of the PCCViewer.Event object for this event:

  • mark {PCCViewer.Mark} The annotation object.
  • clientX {number} A value indicating the absolute window position in the x-axis of the cursor.
  • clientY {number} A value indicating the absolute window position in the y-axis of the cursor.
MarkMouseLeave string MarkMouseLeave

Event is triggered when the mouse leaves the annotation bounding box.

Augmented properties of the PCCViewer.Event object for this event:

  • mark {PCCViewer.Mark} The annotation object.
  • clientX {number} A value indicating the absolute window position in the x-axis of the cursor.
  • clientY {number} A value indicating the absolute window position in the y-axis of the cursor.
CommentsPanelToggled string CommentsPanelToggled

Triggered when the comments panel opens or closes.

Augmented properties of the PCCViewer.Event object for this event:

  • isOpen {boolean} Whether the comments panel is open or closed.
CommentCreated string CommentCreated

Triggered when a comment is added to a Conversation in the viewer.

Augmented properties of the PCCViewer.Event object for this event:

  • conversation {PCCViewer.Conversation} The Conversation containing the changed comment.
  • comment {PCCViewer.Comment} The comment that was added.
CommentRemoved string CommentRemoved

Triggered when a comment is removed from a Conversation in the viewer.

Augmented properties of the PCCViewer.Event object for this event:

  • conversation {PCCViewer.Conversation} The Conversation containing the changed comment.
  • comment {PCCViewer.Comment} The comment that was removed.
CommentChanged string CommentChanged

Triggered when the text of a comment in the viewer has changed.

Augmented properties of the PCCViewer.Event object for this event:

  • conversation {PCCViewer.Conversation} The Conversation containing the changed comment.
  • comment {PCCViewer.Comment} The comment that was modified.
PageTextReady string PageTextReady

Triggered when the text of a page has been loaded in the viewer.

Augmented properties of the PCCViewer.Event object for this event:

  • pageNumber {number} The page number of the page that text is ready for.
Click string Click

Triggered when a user clicks a page or comment pane in the viewer.

Augmented properties of the PCCViewer.Event object for this event:

  • pageNumber {number} The page number of the page that was clicked, or null if none.
  • targetType {string} A description of the clicked object: "mark", "searchResult", "textSelection", "page", "comments", "documentHyperlink" or null (if the user clicked in an area outside of a page and outside of the comments panel).
  • textSelection {object} The text selection that was clicked, or null if none.
  • mark {object} - The mark object that was clicked, or null if none.
  • searchResult {object} - The search result that was clicked, or null if none.
  • documentHyperlink {PCCViewer.DocumentHyperlink} - The document hyperlinks that was clicked, or null if none.
  • originalEvent {object} - A copy of the browser event.
  • clientX {number} - The x window coordinate of the position where the user clicked.
  • clientY {number} - The y window coordinate of the position where the user clicked.
PageOpening string PageOpening

Triggered when the width and height page attributes are retrieved. Note that this event will fire whenever a page opens, so if a page opens, it will fire, and if the page is scrolled out of view, disposed, and then scrolled back into view, the event will fire again.

Augmented properties of the PCCViewer.Event object for this event:

  • width {number} The width in pixels of the page that is opening
  • height {number} The height in pixels of the page that is opening
  • pageNumber {number} The 1-based number of the page that is opening
Source:
  • PCCViewer.ViewerControl.js, line 9760
See:

<static, readonly> FitType :string

The FitType enumeration defines fit types known by PCCViewer.ViewerControl. The ViewerControl uses a specified fit type to set or update the scaling of the pages displayed in the viewer.

Note: This enumeration is a convenience for API developers. Instead of using it, you can pass in the string values of the fit type (enumeration values) directly to the API.

Type:
  • string
Properties:
Name Type Default Description
FullWidth string FullWidth

The viewer scales the content to fill the width of the viewer.

ShrinkToWidth string ShrinkToWidth

The viewer will scale down the content until it fits fully width-wise into view. The page will not be scaled up if it already fits.

ActualSize string ActualSize

The viewer shows the content actual size. The content is not scaled.

FullHeight string FullHeight

The viewer scales the content to fill the height of the viewer, based on the largest known page height.

FullPage string FullPage

The viewer scales the content to best fit the largest known page in the viewer.

Source:
  • PCCViewer.ViewerControl.js, line 9647
See:
Example
// us the enumeration
myViewerControl.fitContent(PCCViewer.FitType.FullWidth);

// or just use the string value
myViewerControl.fitContent("FullWidth");

<static, readonly> MarkHandleMode :string

The MarkHandleMode enumeration defines mark handle modes known by PCCViewer.ViewerControl. The ViewerControl uses a specified mark handle mode to determine how the mark handles are shown.

Note: This enumeration is a convenience for API developers. Instead of using it, you can pass in the string values of the mode (enumeration values) directly to the API.

Type:
  • string
Properties:
Name Type Default Description
HideSideHandlesWhenClose string HideSideHandlesWhenClose
HideCornerHandlesWhenClose string HideCornerHandlesWhenClose
Source:
  • PCCViewer.ViewerControl.js, line 10247
See:
Example
// use the enumeration
myViewerControl.setMarkHandleMode(PCCViewer.MarkHandleMode.HideCornerHandlesWhenClose);

// or just use the string value
myViewerControl.setMarkHandleMode("HideCornerHandlesWhenClose");

<static, readonly> PageLayout :string

The PageLayout enumeration defines page layouts known by PCCViewer.ViewerControl. The ViewerControl uses a specified page layout to set or update the placement or arrangement of the pages in the viewer.

Note: This enumeration is a convenience for API developers. Instead of using it, you can pass in the string values of the page layout (enumeration values) directly to the API.

Type:
  • string
Properties:
Name Type Default Description
Horizontal string Horizontal

Pages are displayed as a single horizontal row and a horizontal scroll bar is displayed to bring into view the pages that are not in view.

Vertical string Vertical

Pages are displayed as a single vertical column and a vertical scroll bar is displayed to bring into view the pages that are not in view.

Source:
  • PCCViewer.ViewerControl.js, line 9736
See:
  • PCCViewer.ViewerControl#pageLayout
Example
// use the enumeration
myViewerControl.setPageLayout(PCCViewer.PageLayout.Horizontal);

// or just use the string value
myViewerControl.setPageLayout("Horizontal");

<static, readonly> RedactionViewMode :string

The RedactionViewMode enumeration defines redaction view modes known by PCCViewer.ViewerControl. The ViewerControl uses a specified redaction view mode to set visibility of the text underneath the redaction rectangle marks that are opaque.

Note: This enumeration is a convenience for API developers. Instead of using it, you can pass in the string values of the view mode (enumeration values) directly to the API.

Type:
  • string
Properties:
Name Type Default Description
Draft string Draft

The viewer displays the document content underneath the redaction rectangles in the document.

Normal string Normal

The viewer hides the document content underneath the redaction rectangles.

Source:
  • PCCViewer.ViewerControl.js, line 10189
See:
Example
// use the enumeration
myViewerControl.setRedactionViewMode(PCCViewer.ViewMode.Draft);

// or just use the string value
myViewerControl.setRedactionViewMode("Draft");

<static, readonly> ScaleTrigger :string

The ScaleTrigger enumeration defines actions known to PCCViewer.ViewerControl that alter page scaling.

Note: This enumeration is for convenience for API developers. Instead of using this enumeration, you can pass string values of the eventType (enumeration values)

Type:
  • string
Properties:
Name Type Default Description
Pinch string Pinch
Zoom string Zoom
Fit string Fit
ViewMode string ViewMode
Source:
  • PCCViewer.ViewerControl.js, line 10216
Example
// use the enumeration
ev.trigger === PCCViewer.ScaleTrigger.Pinch

// or just use the string value
ev.trigger === "Pinch"

<static, readonly> ViewMode :string

The ViewMode enumeration defines view modes known by PCCViewer.ViewerControl. The ViewerControl uses a specified view mode to set or update how documents that contain different sized pages are displayed in the viewer.

Note: This enumeration is a convenience for API developers. Instead of using it, you can pass in the string values of the view mode (enumeration values) directly to the API.

Type:
  • string
Properties:
Name Type Default Description
Document string Document

The viewer maintains the relative size of each page when displaying a document. For example, if page 2 is smaller than page 1, it will appear smaller.

EqualWidthPages string EqualWidthPages

Deprecated since v10.0 (use the "EqualFitPages" enumeration value instead).

SinglePage string SinglePage

The viewer displays a single page at a time. Each page is scaled to fit within a view box, which is the initial size of the viewer and increases in size when zooming in (and decreases in size when zooming out). After the viewer initializes, the view mode may not be changed to or from SinglePage view mode (an Error will be thrown in this case).

EqualFitPages string EqualFitPages

The viewer scales each page so that their width is the same, when using vertical page layout. For example, if page 2 is smaller than page 1, it will be scaled larger so that its width is equal to the width of page 1. If using horizontal page layout, the viewer scales each page so that their height is the same.

Source:
  • PCCViewer.ViewerControl.js, line 9688
See:
Example
// use the enumeration
myViewerControl.setViewMode(PCCViewer.ViewMode.EqualFitPages);

// or just use the string value
myViewerControl.setViewMode("EqualFitPages");

Methods

Searches any text string using the search criteria that were provided to the PCCViewer.SearchTask constructor.

Parameters:
Name Type Description
The string

text string to be searched.

Source:
  • PCCViewer.Search.js, line 564
Returns:

An array of PCCViewer.SearchTaskResult objects.

Type
Array.<PCCViewer.SearchTaskResult>
Example
var searchQuery = {
    searchTerms: [{
        searchTerm: "client",
        contextPadding: 10,
        highlightColor: '#B22222',
        matchingOptions: {
            beginsWith: true,
        }
    }]
};
var textString = "When Full-Text Search is being installed for an existing client without Full-Text Search";
var searchTask = new PCCViewer.SearchTask(searchQuery);
//search the textString
var results = searchTask.search(textString);

 

 


©2017. Accusoft Corporation. All Rights Reserved.

Send Feedback