Appearance
zeropdf / DocumentOptions
Interface: DocumentOptions
Defined in: src/types.ts:450
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
compress? | boolean | Whether eligible streams are compressed with FlateDecode. | src/types.ts:480 |
conformance? | DocumentConformanceProfile | PDF/A or PDF/UA conformance profile to validate and emit. | src/types.ts:478 |
defaultPageSize? | PageSize | Page size used when a page does not specify its own size. | src/types.ts:454 |
defaults? | TextDefaults | Document-wide text defaults filled in when a text call omits them. | src/types.ts:456 |
encryption? | DocumentEncryptionOptions | Password encryption settings for serialized output. | src/types.ts:468 |
info? | DocumentInfo | Document information dictionary values. | src/types.ts:464 |
language? | string | BCP 47 language tag for document or structure content. | src/types.ts:470 |
linearize? | boolean | Experimental Whether to emit a linearization dictionary for Fast Web View style delivery. — limited to single-page unencrypted documents. Not compatible with object streams, encryption, or detached signatures. | src/types.ts:489 |
objectStreams? | boolean | Whether to emit compressed object streams and xref streams. | src/types.ts:482 |
outputIntent? | DocumentOutputIntentOptions | ICC output intent required by color-managed profiles such as PDF/A. | src/types.ts:491 |
roleMap? | PdfRoleMap | Mapping from custom structure roles to standard PDF roles. | src/types.ts:474 |
shapeDefaults? | ShapeStyle | Document-wide default styling for the PdfPage shape helpers (rect, line, circle, ellipse). Per-call ShapeStyle fields override these. | src/types.ts:462 |
signature? | DocumentSignatureOptions | Detached digital-signature options for serialized output. | src/types.ts:493 |
structureRoot? | false | PdfContainerTag | Root structure tag to emit, or false to suppress a custom root. | src/types.ts:476 |
tagged? | boolean | Whether to emit tagged PDF structure metadata. | src/types.ts:472 |
textShaper? | TextShaper | Custom text shaper for complex script shaping (Devanagari, Arabic, Thai, etc.). When provided, the shaper is called for each text run that requires shaping. If not provided, the default shaper handles basic ligature and joining-form substitution but will throw an UNSUPPORTED_SCRIPT error for Devanagari and other complex scripts. External shapers such as harfbuzzjs or fontkit can be plugged in to enable full shaping support. | src/types.ts:502 |
title? | string | Document title applied to the information dictionary, structured XMP metadata, and display-title viewer preference. | src/types.ts:452 |
xmpMetadata? | XmpMetadataInput | XMP metadata packet or structured XMP metadata input. | src/types.ts:466 |