Skip to content

PDFWorker

Unofficial

PDF.js Web Worker wrapper.

Import:

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

Signature:

export class PDFWorker

Properties

Property Type Description
messageHandler null | unknown The message handler for worker communication.
port null | unknown The worker port.
promise Promise<void> Promise that resolves when the worker is ready.

Methods

Method Returns Description
destroy() void Destroys the worker.
fromPort(params) PDFWorker Creates a PDFWorker from an existing port.
getWorkerSrc() string Gets the URL of the worker source.

Links to this page: