DocumentViewer


Purpose

Consists of the document viewer object.

You can access the object by using the launchbox.DocumentViewer reference.

The API is capable of recognizing the type of the document based on the content type or file extension of the document. File extensions can be detected by analyzing the file's URL address, or the Content-Disposition or Content-Location fields found in the response's HTTP header. While checking the mimetype of the file to be downloaded, the Document Viewer mechanism sends all necessary cookies for the domain.

Module

This object belongs to the Document Viewer product module.

Constants

Name Description
AUTHENTICATION_ERROR Denotes that a connection to the remote document requires HTTP basic authentication.
DOCUMENT_VIEWER_IN_USE_ERROR Denotes that the open method was called before the previous call finisheds or was cancelled.
DOWNLOAD_FAILED_ERROR Denotes that download operation failed for a reason given in the description.
INTERNAL_ERROR Thrown whenever a fatal error or improperly recognized error occurs.
INVALID_URL_ERROR Denotes that either the URL is missing, it contains unsupported sceme or the URL value does not comply with the requirements of RFCs 1808, 1738 and 2732.
UNSUPPORTED_FILE_ERROR Denotes that the file cannot be opened by any external application.
Name Description
AUTHENTICATION_ANONYMOUS Denotes that no credentials will be provided, even when HTTP basic authentication is requested.
AUTHENTICATION_CONTAINER_CREDENTIALS Denotes that credentials retrieved from the currently open account will be provided once the HTTP basic authentication is requested.
AUTHENTICATION_CUSTOM_CREDENTIALS Denotes that custom credentials will be provided once the HTTP basic authentication is requested.

Methods

Name Return type Description
canOpen undefined

Checks if a document (specified either by a URL address or a MIME type) is supported by the device, i.e. if the specified document can be displayed.

open undefined

Opens the document.

cancel undefined

Cancels the document download operation initiated by the open method. Neither onSuccess nor onFailure will be called on the callback object passed to the open method.

Related topic

Public API reference
Legal notice | Copyright © 2017 and Confidential to Pegasystems Inc. All rights reserved
PDN | Feedback
Advanced...