Members
destroyed :boolean
Shows if loading task is destroyed.
Type:
- boolean
- Source:
docId :string
Unique document loading task id -- used in MessageHandlers.
Type:
- string
- Source:
onPassword
Callback to request a password if wrong or no password was provided.
The callback receives two parameters: function that needs to be called
with new password and reason (see {PasswordResponses}).
- Source:
onProgress
Callback to be able to monitor the loading progress of the PDF file
(necessary to implement e.g. a loading bar). The callback receives
an {Object} with the properties: {number} loaded and {number} total.
- Source:
onUnsupportedFeature
Callback to when unsupported feature is used. The callback receives
an {UNSUPPORTED_FEATURES} argument.
- Source:
promise
- Source:
Methods
destroy() → {Promise}
Aborts all network requests and destroys worker.
- Source:
Returns:
A promise that is resolved after destruction activity
is completed.
- Type
- Promise
then(onFulfilled, onRejected) → {Promise}
Registers callbacks to indicate the document loading completion.
Parameters:
Name | Type | Description |
---|---|---|
onFulfilled |
function | The callback for the loading completion. |
onRejected |
function | The callback for the loading failure. |
- Source:
Returns:
A promise that is resolved after the onFulfilled or
onRejected callback.
- Type
- Promise