Skip to main content

Interface: PdfDocumentJson

A complete, JSON-serializable description of a PDF document. Pass it to renderDocumentJson to produce PDF bytes.

Properties

PropertyModifierTypeDescription
autoOutline?readonlyboolean | TemplateAutoOutlineOptionsAuto-generate a bookmarks tree from headings.
blocksreadonlyreadonly JsonBlock[]Body blocks. Required and non-empty. A block flows by default, or is placed at absolute coordinates when it carries an x/x1/cx anchor (see JsonPositionedBlock).
compress?readonlybooleanCompress content streams. Defaults to the engine default.
conformance?readonlyDocumentConformanceProfileValidate and emit a PDF/A or PDF/UA conformance profile.
defaultFont?readonlystringName of a declared font (or built-in font) used as the document default.
defaultPageSize?readonlyPageSizeDefault page size for pages that do not specify one.
defaults?readonlyTextDefaultsDocument-wide text defaults.
encryption?readonlyDocumentEncryptionOptionsPassword-encrypt the output.
fonts?readonlyreadonly JsonFontDeclaration[]Fonts to load and register before rendering.
footer?readonlyreadonly JsonBlock[]Blocks rendered at the bottom of every page (page tokens interpolated).
header?readonlyreadonly JsonBlock[]Blocks rendered at the top of every page (page tokens interpolated).
info?readonlyDocumentInfoInformation dictionary values.
language?readonlystringBCP 47 language tag for the document.
page?readonlyTemplatePageOptionsPage geometry and margins.
pageNumber?readonlyTemplatePageNumberOptionsAutomatic page numbering.
strictLayout?readonlyboolean | TemplateStrictLayoutOptionsStrict layout checks for fixed templates.
styles?readonlyTemplateStylesheetReusable named styles.
tagged?readonlybooleanEmit a tagged (accessible) structure tree.
title?readonlystringDocument title (information dictionary, XMP, and display-title preference).
xmpMetadata?readonlyXmpMetadataInputXMP metadata packet or structured input.