Skip to content

PDFWorker

Unofficial

PDF.js Web Worker wrapper.

Import:

import type { PDFWorker } from '@obsidian-typings/obsidian-public-latest';

Signature:

export class PDFWorker

Properties

PropertyTypeDescription
messageHandlernull | unknownThe message handler for worker communication.
portnull | unknownThe worker port.
promisePromise<void>Promise that resolves when the worker is ready.

Methods

MethodReturnsDescription
create(params?)PDFWorkerReuses the worker registered for the supplied port, or creates a new worker.
destroy()voidDestroys the worker.
fromPort(params)PDFWorkerCreates a PDFWorker from an existing port.

Links to this page: