Interface IsolatedLoadOptions

Options of loadIsolated.

interface IsolatedLoadOptions {
    maxHeapMb?: number;
    timeoutMs?: number;
    maxInflatedBytes?: number;
    maxExternalMb?: number;
    maxXmlElements?: number;
    maxTableCells?: number;
    ocrPages?: number;
    pdfProcessMemoryMb?: number;
    signal?: AbortSignal;
}

Properties

maxHeapMb?: number

The worker's old generation, in MiB (resourceLimits.maxOldGenerationSizeMb). Default 256. A --max-old-space-size the process was started with, on its command line or in NODE_OPTIONS, overrides it.

timeoutMs?: number

How long the read may take from the worker's start, in milliseconds, at most 2,147,483,647. Default 30,000.

maxInflatedBytes?: number

The Word or office loader's bound on what the archive's entries inflate to (DocxLoaderOptions.maxInflatedBytes, OfficeLoaderOptions.maxInflatedBytes); that loader's default when left out.

maxExternalMb?: number

The worker's array buffers and external strings, in MiB, past which it is ended: read every 20 ms with worker.getHeapStatistics(), which Node 22.16 and 24.0 add; on an earlier Node, a read given it is refused with a TypeError. No check when left out.

maxXmlElements?: number

The office loader's bound on XML elements (OfficeLoaderOptions.maxXmlElements): the office kinds and 'scan' alone.

maxTableCells?: number

The office loader's bound on table cells (OfficeLoaderOptions.maxTableCells): the office kinds and 'scan' alone.

ocrPages?: number

The pages of a scan read by OCR, from the first: a whole number of 1 or more, which 'scan' needs and no other kind takes.

pdfProcessMemoryMb?: number

The heap, in MB, of the process pdf.js reads a scan in (OfficeLoaderOptions.pdfProcessMemoryMb): 'scan' alone.

signal?: AbortSignal

Cancels the read: the worker is ended, and the call rejects with the signal's reason.