open


Purpose

Opens the document.

Signature

open( url, options, callbacks )

Returns

This method does not return anything.

Parameters

Name Description Type Use
url

A URL address of the file. The API supports both http(s) and filesystem URL schemes.

string required
options This parameter is ignored. object optional
callbacks Passed to verify whether there is an external application that can open that particular file type. undefined required

The open method's callbacks object can be structured as follows:

{
  onProgress: function(progress) {...},
  onSuccess: function() {...},
  onFailure: function(error) {...}
}

The table below lists all callbacks supported by the method.

Name Description Return type
onProgress Called when the download progress is updated. Used for http(s)-based downloads only. The progress parameter passed in this callback consists of a double value between 0.0 (start) and 1.0 (finish), indicating the current progress of opening a document. undefined
onSuccess It is called when the document successfully launches. undefined
onFailure

Called when an error occurs.

The error object contains two fields: code (a numeric value associated with an error) and description (the type of failure). Possible failure types are listed in the Constants table, found in the DocumentViewer article.

undefined

Related topics

DocumentViewer
Legal notice | Copyright © 2018 and Confidential to Pegasystems Inc. All rights reserved
Pega Community | Feedback
Advanced...