modern-pdf-lib / LoadPdfOptions
Interface: LoadPdfOptions
Defined in: src/parser/documentParser.ts:51
Options for loading a PDF document from bytes.
Properties
capNumbers?
optionalcapNumbers:boolean
Defined in: src/parser/documentParser.ts:80
When true, clamp extreme floating-point values (very large or very small numbers) to safe ranges during parsing. This prevents numeric overflows from producing garbage output.
Default: false.
ignoreEncryption?
optionalignoreEncryption:boolean
Defined in: src/parser/documentParser.ts:55
When true, skip decryption even if the PDF is encrypted.
objectsPerTick?
optionalobjectsPerTick:number
Defined in: src/parser/documentParser.ts:66
Number of objects to process per event-loop tick during parsing. Lower values keep the main thread more responsive in browsers. Defaults to Infinity (no throttling).
password?
optionalpassword:string
Defined in: src/parser/documentParser.ts:53
Password for encrypted PDFs (Phase 5).
throwOnInvalidObject?
optionalthrowOnInvalidObject:boolean
Defined in: src/parser/documentParser.ts:72
When true, throw an error if a malformed or invalid PDF object is encountered during parsing. When false (default), malformed objects are silently skipped.
updateMetadata?
optionalupdateMetadata:boolean
Defined in: src/parser/documentParser.ts:60
When true, update the /ModDate in the /Info dictionary to the current time when saving. Defaults to true.