Class: PDFDocumentLoadingTask

pdfjsLib~PDFDocumentLoadingTask()

The loading task controls the operations required to load a PDF document (such as network requests) and provides a way to listen for completion, after which individual pages can be rendered.

Constructor

new PDFDocumentLoadingTask()

Source:

Members

destroyed :boolean

Whether the loading task is destroyed or not.
Type:
  • boolean
Source:

docId :string

Unique identifier for the document loading task.
Type:
  • string
Source:

onPassword :function

Callback to request a password if a wrong or no password was provided. The callback receives two parameters: a function that should be called with the new password, and a reason (see PasswordResponses).
Type:
  • function
Source:

onProgress :function

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 OnProgressParameters argument.
Type:
  • function
Source:

promise :Promise:.<PDFDocumentProxy:>

Promise for document loading task completion.
Type:
  • Promise:.<PDFDocumentProxy:>
Source:

Methods

(async) destroy() → {Promise:.<void:>}

Abort all network requests and destroy the worker.
Source:
Returns:
A promise that is resolved when destruction is completed.
Type
Promise:.<void:>