Class: PDFWorker

pdfjsLib~PDFWorker(params)

PDF.js web worker abstraction that controls the instantiation of PDF documents. Message handlers are used to pass information from the main thread to the worker thread and vice versa. If the creation of a web worker is not possible, a "fake" worker will be used instead.

Constructor

new PDFWorker(params)

Parameters:
Name Type Description
params PDFWorkerParameters The worker initialization parameters.
Source:

Members

messageHandler :MessageHandler

The current MessageHandler-instance.
Type:
  • MessageHandler
Source:

port :Worker

The current `workerPort`, when it exists.
Type:
  • Worker
Source:

promise :Promise:.<void:>

Promise for worker initialization completion.
Type:
  • Promise:.<void:>
Source:

(static) workerSrc :string

The current `workerSrc`, when it exists.
Type:
  • string
Source:

Methods

destroy()

Destroys the worker instance.
Source:

(static) fromPort(params)

Parameters:
Name Type Description
params PDFWorkerParameters The worker initialization parameters.
Source: