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
destroy()voidDestroys the worker.
fromPort(params)PDFWorkerCreates a PDFWorker from an existing port.
getWorkerSrc()stringGets the URL of the worker source.

Links to this page: