sempdf
sempdf v1.9.1Interfaces

Interface: DocumentOptions

sempdf v1.9.1


sempdf / DocumentOptions

Defined in: src/types.ts:511

Properties

PropertyTypeDescriptionDefined in
compress?booleanWhether eligible streams are compressed with FlateDecode.src/types.ts:548
conformance?DocumentConformanceProfilePDF/A or PDF/UA conformance profile to validate and emit.src/types.ts:546
defaultPageSize?PageSizePage size used when a page does not specify its own size.src/types.ts:515
defaults?TextDefaultsDocument-wide text defaults filled in when a text call omits them.src/types.ts:517
encryption?DocumentEncryptionOptionsPassword encryption settings for serialized output.src/types.ts:536
info?DocumentInfoDocument information dictionary values.src/types.ts:532
language?stringBCP 47 language tag for document or structure content.src/types.ts:538
linearize?booleanExperimental 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:557
objectStreams?booleanWhether to emit compressed object streams and xref streams.src/types.ts:550
outputIntent?DocumentOutputIntentOptionsICC output intent required by color-managed profiles such as PDF/A.src/types.ts:559
pageBackground?ColorInputSolid background color filled behind every page's content (drawn as the first thing on each page, tagged as an artifact). Applies to pages created via PdfDocument.addPage and PdfDocument.renderTemplate. A template's own pageBackground option overrides this.src/types.ts:530
roleMap?PdfRoleMapMapping from custom structure roles to standard PDF roles.src/types.ts:542
shapeDefaults?ShapeStyleDocument-wide default styling for the PdfPage shape helpers (rect, line, circle, ellipse). Per-call ShapeStyle fields override these.src/types.ts:523
signature?DocumentSignatureOptionsDetached digital-signature options for serialized output.src/types.ts:561
structureRoot?false | PdfContainerTagRoot structure tag to emit, or false to suppress a custom root.src/types.ts:544
tagged?booleanWhether to emit tagged PDF structure metadata.src/types.ts:540
textShaper?TextShaperCustom 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:570
title?stringDocument title applied to the information dictionary, structured XMP metadata, and display-title viewer preference.src/types.ts:513
xmpMetadata?XmpMetadataInputXMP metadata packet or structured XMP metadata input.src/types.ts:534

On this page