ReamParseOptions
Defined in: src/core/converter/ream.ts:56
Options for Ream.parse.
Properties
Section titled “Properties”filters?
Section titled “filters?”
readonlyoptionalfilters?:Readonly<Record<string,StreamFilter|undefined>>
Defined in: src/core/converter/ream.ts:88
PDF only: decoders for /Filter names the reader does not implement
(§7.4). A filter it cannot undo leaves that stream unread — and when the
unread one is the cross-reference, the whole document is missing — so a
caller who needs such a file supplies the decoder rather than the library
carrying one for every filter anyone might write:
// browser: any wasm/JS decoder you ship — brotli-dec-wasm is ~200 KBimport brotliPromise from 'brotli-dec-wasm';const brotli = await brotliPromise;Ream.parse(pdf, { filters: { BrotliDecode: (b) => brotli.decompress(b) } });// node, where the runtime already carries oneimport { brotliDecompressSync } from 'node:zlib';Ream.parse(pdf, { filters: { BrotliDecode: (b) => brotliDecompressSync(b) } });Absent, or throwing, the filter is reported unreadable by name.
password?
Section titled “password?”
readonlyoptionalpassword?:string
Defined in: src/core/converter/ream.ts:65
The password an encrypted source is opened with: a PDF’s user password (ISO 32000 §7.6) or an OOXML package’s (ECMA-376 §2.3, MS-OFFCRYPTO). Defaults to the empty string, which opens a PDF’s common permissions-only encryption (EP14); an encrypted OOXML package always names a password.
readers?
Section titled “readers?”
readonlyoptionalreaders?: readonlyDocumentReader<SourceDoc>[]
Defined in: src/core/converter/ream.ts:58
Reader registry override; defaults to the built-in docx + xlsx readers.