Skip to content

JSON model fields and enums

Start with the JSON authoring guide for complete input and rendering examples. This page is generated from the public record components, their Javadocs, enum declarations and Jackson subtype annotations reachable from LetterDocument. It does not include implementation classes or unrelated fluent-only helper values.

A record type is a JSON object, List<T> is an array, and Map<String,T> is an object keyed by name. Map<StyleRole,Style> uses the exact role enum names as keys. String is text, Boolean/boolean is true/false, and numeric types require actual JSON numbers. byte[] is a Base64 string. Enum values are case-sensitive strings.

Use schemaVersion: 1. Schema and Maven versions are distinct. Unknown fields, duplicate keys, trailing tokens, numeric enum ordinals, null primitive values and incompatible scalar coercions are rejected. Null boxed/style values mean inheritance/defaults only where their owning contract permits them; required values are still validated during generation.

Some fields such as semanticStyle, defaultAppearance, defaultStyle and baseStyle preserve lower-priority authoring layers. Ordinary callers usually omit them and set style/appearance/theme values directly. No constructor/JSON parse result is a guarantee that the document is renderable.

Block discriminator

Select a variant with the type property.

ValueObject fields
canvasCanvasBlock
columnsColumnsBlock
boxBoxBlock
letterPartLetterPartBlock
componentComponentBlock
groupGroupBlock
headingHeading
paragraphParagraph
listListBlock
imageImageBlock
tableTableBlock
pageBreakPageBreakBlock

Watermark discriminator

Select a variant with the kind property.

ValueObject fields
textTextWatermark
imageImageWatermark

Border

Uniform border on all four cell edges. Values are checked at generation time.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
widthPtdoublenonnegative line width in points
styleBorderStylerequired finite line style
colorStringrequired six-digit RGB color, including for an invisible border

Borders

Independent optional physical borders for a flowing box.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
topBordernullable top border; null means no border
rightBordernullable right border; null means no border
bottomBordernullable bottom border; null means no border
leftBordernullable left border; null means no border

Bounds

Rectangle measured from a containing zone's upper-left corner, in millimeters. The x axis runs right and the y axis runs down. For a fixed element the containing zone is TOP or BOTTOM; a BOTTOM_LAST signature uses the last-page signature zone. Construction performs no validation. Generation requires finite, nonnegative x/y, positive width/height, and a rectangle fitting inside its containing zone.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
xdoublehorizontal offset from the zone's left edge, in millimeters
ydoublevertical offset from the zone's top edge, in millimeters
widthdoublerectangle width in millimeters
heightdoublerectangle height in millimeters

BoxAppearance

Optional flow-box decoration, independent of typography and pagination.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
paddingPaddingnullable nonnegative millimeter padding; null means zero
bordersBordersnullable independent physical edges; null means no borders
backgroundColorStringnullable six-digit RGB color; null means transparent

BoxBlock

Rich flowing content with optional independent borders, padding and background color.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
blocksList<Block>owned nonempty content list, validated during generation
appearanceBoxAppearancenullable physical decoration; null means undecorated
styleStylenullable inherited typography and outer spacing/pagination overrides

CanvasBlock

A fixed-size flow unit containing arbitrary bounded elements in stable paint order. It consumes its declared height and moves to a following page as one unit when necessary. Native content overflow fails generation instead of clipping or shrinking the canvas.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
widthMmdoublepositive finite canvas width, no larger than available width
heightMmdoublepositive finite canvas height
elementsList<PositionedContent>ordered owned element list with unique identifiers
styleStylenullable inherited typography and outer spacing/pagination overrides

CellAppearance

Nullable cell appearance overrides. Each property inherits independently, first from table defaults and then from the legacy defaults. Text properties remain in the cell's Style.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
borderBorderoptional uniform border, in points
paddingPaddingoptional per-edge inner spacing, in millimeters
verticalAlignmentVerticalAlignmentoptional content alignment
backgroundColorStringoptional six-digit RGB fill; null inherits the table fill

Column

Independent flowing content occupying a weighted share of its parent columns block.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
weightdoublepositive finite proportional width, validated during generation
blocksList<Block>ordered owned content, required and nonempty during generation
styleStylenullable inherited typography overrides

ColumnsBlock

Side-by-side independent rich-content columns, using proportional widths after physical gaps. The block flows to the height of its tallest column; content does not automatically continue from one column into another.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
columnsList<Column>owned nonempty column list, checked during generation
gapMmdoublefinite nonnegative gap between adjacent columns
styleStylenullable inherited typography and outer spacing/pagination overrides

ComponentBlock

Reference to a document-local reusable component. Preparation replaces the reference with an ordinary group, applying reference styles below the component's own local block styles. JSON selects this record with type:"component".

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
nameStringregistered component name, checked during generation
styleStylenullable overrides inherited by the included content

DocumentMetadata

Optional descriptive PDF metadata; null fields omit the corresponding document information.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
titleStringdocument title
authorStringdocument author
subjectStringdocument subject
keywordsStringapplication-supplied keyword text

DocumentSettings

Optional language, formatting, metadata and explicit font fallback settings. No system-font scanning or JVM default locale/time zone participates.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
localeLocaleSettingscountry-aware formatting, null selects stable defaults
metadataDocumentMetadataoptional PDF metadata
directionTextDirectionoptional explicit direction; null retains ordinary left-to-right behavior
fallbackFontsList<String>ordered registered family names, null becomes empty
hyphenateBooleanwhether registered language patterns should be used, null means false

FixedElement

Positioned content repeated on selected pages inside a reserved top or bottom zone. Unlike body sections, fixed content cannot flow onto another page. Its bounds are relative to the selected zone, not the physical page or body origin. Generation requires unique nonblank identifiers, nonempty blocks, and bounds fitting the zone. Elements in the same zone may touch but must not overlap on any selected page. Page-break blocks are invalid here. Construction only snapshots the list.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
idStringdocument-unique label used to identify the element
zoneZonereserved page region containing the element
pagesPageSelectorpages on which to repeat this content
boundsMmBoundsrectangle relative to the zone's upper-left corner, in millimeters
blocksList<Block>ordered region content; null is preserved for validation

GroupBlock

Ordered content grouped under common typography and a soft page-keep preference. An explicit keepTogether style overrides that preference. Group spacing applies around the container; pagination controls remain local. Explicit AUTO groups in body flow may contain page breaks.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
blocksList<Block>child blocks, snapshotted while preserving nulls for field-path validation
styleStylenullable appearance and pagination overrides
defaultStyleStylenullable typography fallback below theme and explicit overrides

Heading

Text heading kept with the following block on the same page when layout permits. Before inherited overrides, headings default to bold 14-point Helvetica; ordinary text uses 11-point regular Helvetica. Generation requires a nonempty list of valid text runs.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
runsList<TextRun>ordered styled text; null is preserved for generation-time validation
styleStyleoptional block overrides, layered after document and section styles
semanticStyleStyleoptional tag defaults, below theme and explicit local overrides

ImageBlock

PNG/JPEG/static SVG image scaled proportionally to fit an explicit box in millimeters. The rendered image participates in body flow or the containing positioned region. The block style controls alignment and surrounding spacing. Generation checks the MIME type, signature, decodability, positive finite dimensions, and available width. The constructor and #data() clone bytes, so callers cannot mutate stored image content. Equality and hashing use byte contents along with all other record components. The constructor itself does not validate the image.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
databyte[]encoded PNG/JPEG/static SVG bytes; null is retained for generation-time validation
mimeTypeStringexact supported MIME type, image/png, image/jpeg or image/svg+xml
widthMmDoublemaximum rendered width in millimeters; required and positive at generation
heightMmDoublemaximum rendered height in millimeters; required and positive at generation
styleStylenullable block overrides for alignment and spacing
altTextStringoptional human-readable image description for tagged output

ImageWatermark

PNG/JPEG/static SVG image centered behind selected physical pages, with its aspect ratio preserved inside the supplied millimeter box. Watermark position is independent of page margins. Opacity ranges from zero to one; positive rotation turns counterclockwise about page center in PDF coordinates. The constructor copies image bytes but does not decode them or default null properties. Generation checks the MIME type, signature, decodability, positive finite box dimensions, page selection, opacity, and finite rotation. Factories detect image format and provide complete defaults. Stored bytes are protected by defensive copies on construction and access; equality and hashing compare their contents.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
databyte[]encoded PNG/JPEG/static SVG bytes, required during generation
mimeTypeStringexact supported MIME type, image/png, image/jpeg or image/svg+xml
widthMmDoubleimage fitting-box width in millimeters; required and positive during generation
heightMmDoubleimage fitting-box height in millimeters; required and positive during generation
pagesPageSelectorpage selection, required during generation
opacityDoublefinite paint opacity between zero and one, required during generation
rotationDegreesDoublefinite counterclockwise angle in degrees, required during generation

LetterComponent

Reusable immutable content registered on an individual document. References expand into ordinary groups before validation, retaining the group's soft keep unless explicitly overridden. Components may contain references to other registrations; generation rejects unknown names and cycles. No filesystem, network access or executable inclusion occurs.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
blocksList<Block>ordered component content, snapshotted while preserving invalid entries

LetterDocument

Complete immutable input to PDF generation, shared by the Java builders and JSON input. A document contains body sections, optional positioned content, a visual signature, and a watermark. The schema version is checked during generation; constructing this record does not validate content, fonts, geometry, or image formats. Supplied lists and the component map are copied into unmodifiable collections, preserving null entries for later validation. A null sections list remains null; only a null fixed-elements list becomes empty. Themes and reusable components resolve before ordinary validation, without global registrations.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
schemaVersionintinput schema version; generation currently requires #SUPPORTED_SCHEMA_VERSION
pagePageSpecphysical layout, or null for PageSpec#defaults()
defaultStyleStylenullable overrides applied before section, block, cell, and run styles
sectionsList<Section>body sections in reading order; generation requires at least one body block
fixedElementsList<FixedElement>positioned top/bottom content; null means no fixed elements
signatureSignatureoptional visual signature; null means no signature
watermarkWatermarkoptional decoration behind page content; null means no watermark
themeLetterThemeoptional document-local role and named style defaults
componentsMap<String, LetterComponent>optional document-local reusable content; null becomes an empty map
settingsDocumentSettingsoptional formatting and output metadata; null selects stable defaults
attachmentsList<PdfAttachment>optional PDFs appended unchanged after the generated letter

LetterPartBlock

Semantic letter content that receives element-specific theme defaults before ordinary layout.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
elementLetterElementsemantic role
blocksList<Block>ordered content, snapshotted
styleStyleoptional local overrides

LetterTheme

Immutable per-document role defaults and named styles. Theme values never modify global state. Each nullable style property inherits independently; explicit document, section and content overrides take precedence over role defaults. Named styles may reference another named style through Style#styleName(); generation rejects unknown names and cycles.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
rolesMap<StyleRole, Style>role defaults; null means no role overrides
namedStylesMap<String, Style>reusable named overrides; null means no named styles
tableAppearanceTableAppearanceoptional table geometry/paint defaults
stationeryStationeryoptional repeating region defaults

ListBlock

Ordered or bulleted list with one sequence of text runs per item. Ordered labels start at 1; unordered labels are bullets. Items are kept together on a page when possible. Generation requires at least one item and at least one valid text run in every item.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
itemsList<List<TextRun>>item content in display order; null outer/inner lists are preserved for validation
orderedbooleantrue for numbered labels, false for bullets
styleStyleoptional list style inherited by each item and its runs
contentItemsList<ListItem>optional hierarchical items; supply this or legacy items, never both

ListItem

A list item's literal inline content followed by zero or more nested ordered/bulleted lists. Child lists inherit the containing list's typography and indent relative to this item's body.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
runsList<TextRun>owned inline content, required and nonempty during generation
childrenList<ListBlock>owned nested lists; null means no child lists

LocaleSettings

Deterministic per-document formatting, independent of JVM defaults.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
languageTagStringBCP 47 locale; null defaults to en-GB
datePatternStringoptional explicit date pattern
dateStyleFormatStylelocalized date style; null means LONG
currencyCodeStringoptional ISO currency code; otherwise derived from the locale country
zoneIdStringexplicit time zone; null means UTC

Margins

Physical-page insets in millimeters, outside both the body and reserved zones. Construction stores values unchanged; generation requires finite nonnegative margins and usable page width and height after margins and zones are removed.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
topdoubleinset from the physical page's top edge, in millimeters
rightdoubleinset from the physical page's right edge, in millimeters
bottomdoubleinset from the physical page's bottom edge, in millimeters
leftdoubleinset from the physical page's left edge, in millimeters

Padding

Cell inner spacing, in millimeters. Each value must be finite and nonnegative at generation.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
topMmdoublespace inside the top edge
rightMmdoublespace inside the right edge
bottomMmdoublespace inside the bottom edge
leftMmdoublespace inside the left edge

PageBreakBlock

Explicit page boundary in the body flow. Generation rejects this block in fixed elements and visual signatures. It has no style or text and does not create a new section.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints

This variant has no additional fields.

PageDimensions

Custom physical paper dimensions, validated during generation.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
widthMmdoublepositive finite edge in millimeters
heightMmdoublepositive finite edge in millimeters

PageSpec

Physical page layout with reserved regions inside the page margins. The top zone is above the body and the bottom zone is below it. On the last page, the signature zone sits above the bottom zone and reduces the available body height by its own height, even if no signature is supplied. All zones span the width remaining between left/right margins. The constructor replaces nulls with defaults but does not check dimensions. Generation requires finite nonnegative margins/zones and positive body space on ordinary and last pages.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
sizePageSizeportrait paper size; null becomes PageSize#A4
marginsMmMarginsouter page insets; null becomes 20 mm on every side
topZoneMmDoublereserved height above body content, in millimeters; null becomes zero
bottomZoneMmDoublereserved height below body content, in millimeters; null becomes zero
signatureZoneMmDoubleadditional reserved last-page height above the bottom zone, in millimeters; null becomes zero
dimensionsPageDimensionsoptional custom paper edges in millimeters
orientationOrientationoptional orientation; null means PORTRAIT

Paragraph

Flowing literal text that can wrap and continue across pages. Text runs retain their order, spaces, and line feeds; they are not parsed as HTML. Generation requires a nonempty run list with nonnull text and supported style/font values.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
runsList<TextRun>ordered styled text; null is preserved for generation-time validation
styleStyleoptional block overrides, layered after document and section styles

PdfAttachment

Owned, validated PDF pages to append after a generated letter. Encrypted and empty PDFs are rejected; equality and hashing compare encoded contents. Attachments are accepted only by the standard output profile because merging arbitrary PDFs cannot preserve profile guarantees.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
databyte[]complete unencrypted PDF bytes, copied on construction and access

PositionedContent

One stable, bounded canvas element. Coordinates are millimeters from its canvas's top-left; content order controls painting order, so later elements may overlap earlier ones.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
idStringnonblank identifier unique within its canvas, checked at generation
boundsMmBoundspositive rectangle wholly inside the canvas, checked at generation
blocksList<Block>owned ordered content; page breaks are forbidden at any nesting level
styleStylenullable inherited typography overrides

Section

Named group of body blocks rendered in list order. Sections do not force page breaks or select physical page regions; the name is a descriptive label. Style properties inherit from the document and are overridden by individual blocks and text runs.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
nameStringsection label; generation requires nonblank XML-compatible text
styleStyleoptional section overrides, or null to inherit the document style
blocksList<Block>body content; null is preserved for generation-time validation

Signature

Visual signature content, either appended to the body or positioned on the final page. This is rendered letter content, not a cryptographic PDF signature. FLOW requires null bounds; BOTTOM_LAST requires bounds inside a positive-height zone. Page-break blocks are invalid in both modes.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
placementSignaturePlacementflowing or final-page placement; required during generation
blocksList<Block>nonempty signature content; null is retained for generation-time validation
boundsMmBoundszone-relative rectangle in millimeters for BOTTOM_LAST, or null for FLOW

Stationery

Immutable header, footer and logo geometry shared by letters using a theme. Geometry is relative to the inner page rectangle; choose the same paper and margins when authoring the stationery. Letter-local regions with the same stable identifier replace inherited regions.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
elementsList<FixedElement>fixed top/bottom elements, defensively snapshotted
topZoneMmdoublereserved top height including the desired body gap
bottomZoneMmdoublereserved bottom height including the desired body gap

Style

Immutable set of nullable typography and spacing overrides. Null means inherit that property; an explicit false disables an inherited boolean flag. During rendering, built-in text defaults are overlaid by document, section, block, optional table-cell, and text-run styles in that order. Fixed regions and signatures have no section style. A named reference selects per-document theme overrides below this style's explicit properties. Built-in text defaults are Helvetica, 11 pt (14 pt and bold for headings), black, left alignment, a 1.2 line-height multiplier, and zero space before/after. The other flags are false. #plain() has no overrides and therefore preserves those or any inherited values; it does not reset text to the built-in defaults. Construction and builder methods do not validate values. Generation requires registered or built-in font families and available bold/italic variants, positive finite font sizes and line-height multipliers, finite nonnegative spacing, and colors in #RRGGBB form.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
fontFamilyStringbuilt-in or registered family name, or null to inherit
fontSizePtDoublefont size in points (1/72 inch), or null to inherit
colorStringsix-digit hexadecimal RGB text color, or null to inherit
boldBooleanbold flag, or null to inherit
italicBooleanitalic flag, or null to inherit
underlineBooleanunderline flag, or null to inherit
textAlignTextAlignhorizontal paragraph alignment, or null to inherit
lineHeightDoubledimensionless multiplier of font size, or null to inherit
spaceBeforeMmDoublespacing before the block in millimeters, or null to inherit
spaceAfterMmDoublespacing after the block in millimeters, or null to inherit
keepTogetherKeeppage keep for this block, or null for its ordinary policy
keepWithNextKeeppage keep with the next block, or null for its ordinary policy
widowsIntegerminimum trailing paragraph lines on a page, positive or null
orphansIntegerminimum opening paragraph lines on a page, positive or null
styleNameStringoptional reference to a named style in the document theme
baseStyleStyleoptional lower-priority layer, resolved before the named style and local fields; retains the order of nested styles until document-local names can be resolved

TableAppearance

Table appearance defaults shared by every authoring API. Explicit table and cell settings win.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
cellsCellAppearancedefaults for every cell
headerCellAppearanceadditional repeating-header defaults
rowKeepTogetherKeepdefault row pagination policy

TableBlock

Full-width native table with positive proportional column weights, an optional repeating header and ordered body rows. Cells can span columns/rows; each section must cover its complete grid without holes or overlap, and header spans cannot enter the body. Cell text inherits table, cell and run styles in that order. Rich cells also support ordinary paragraphs, lists and images.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
columnWeightsList<Double>positive relative weights, one per physical column
headerList<TableCell>optional single repeating header row, null becomes empty
rowsList<List<TableCell>>ordered body rows containing cells at their first unoccupied column
styleStylenullable table typography and spacing
optionsTableOptionsoptional appearance and row policies; null preserves legacy defaults

TableCell

Cell containing either inline runs or ordinary blocks. Runs retain the compact legacy form; blocks support paragraphs, headings, lists and images, with no nested tables or page breaks. Exactly one form must be supplied. An empty block list explicitly represents an empty visual cell. Span and appearance checks occur during generation.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
runsList<TextRun>optional nonempty ordered inline content; exclusive with blocks
styleStylenullable typography layered after the table style
backgroundColorStringlegacy optional six-digit RGB fill, overriding appearance fill
blocksList<Block>optional block content; an empty list creates an empty cell
columnSpanIntegeroptional positive column span, null means one
rowSpanIntegeroptional positive row span, null means one
appearanceCellAppearanceoptional cell appearance overrides
semanticStyleStyleoptional tag defaults below themes and explicit cell styles
defaultAppearanceCellAppearanceoptional semantic appearance below theme and explicit table defaults

TableOptions

Optional table appearance and body-row page policies. Absent options retain one-millimeter padding, white quarter-point borders, centered content and a soft keep on every row.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
cellAppearanceCellAppearanceoptional defaults inherited independently by every cell
rowKeepTogetherKeepoptional default row split control, null means PREFER
rowPoliciesList<TableRowPolicy>optional body-row overrides, null becomes empty
rowGroupsList<TableRowGroup>optional disjoint body-row groups, null becomes empty

TableRowGroup

Consecutive body rows requested to stay on one page. Groups cannot overlap and cannot include header rows. A soft preference may break when necessary; an impossible strong keep can fail.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
startRowintfirst zero-based body row index
rowCountintpositive number of rows in the group
keepTogetherKeeprequired keep strength, including AUTO to allow normal breaks

TableRowPolicy

Overrides page-breaking behavior for one zero-based body row. Indices must be unique and in range.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
rowIndexintbody row index, starting at zero
keepTogetherKeepoptional row split control; AUTO allows splitting
keepWithNextKeepoptional relationship to the following body row

TextRun

Literal inline text with optional style overrides and an external hyperlink. Text is XML-escaped during rendering, and spaces and line feeds are preserved by text blocks; it is never interpreted as HTML markup. Styles apply after the containing block or cell. Construction performs no validation. Generation permits empty text but requires nonnull XML-compatible text. A supplied link must be a syntactically valid absolute HTTP, HTTPS, or mailto URI with a nonempty scheme-specific part; HTTP(S) links also require a host.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
textStringliteral text, including any spaces or line feeds
styleStyleoptional run-level overrides, or null to inherit from the block or cell
hrefStringexternal hyperlink target, or null for unlinked text
pageNumberPageNumberoptional dynamic page field; text must be empty when supplied

TextWatermark

Text centered behind selected pages using a built-in or registered regular font. Positioning uses the physical page center, independently of margins and reserved zones. Text size uses points; rotation is about the page center and positive angles rotate counterclockwise in PDF coordinates. Opacity ranges from zero (invisible) to one (opaque). The canonical constructor stores every value unchanged; nulls do not select defaults. Generation requires nonblank XML-compatible text, a supported family, positive finite size, a #RRGGBB color, nonnull page selection, opacity in [0, 1], and finite rotation. Use #of(String) for a complete set of default appearance values.

Java contract and constructors ↗

JSON fieldValue typeMeaning and constraints
textStringliteral watermark text, required and nonblank during generation
fontFamilyStringbuilt-in or registered regular font family; required during generation
fontSizePtDoublefont size in points (1/72 inch); required and positive during generation
colorStringsix-digit hexadecimal RGB text color, required during generation
pagesPageSelectorpage selection, required during generation
opacityDoublefinite paint opacity between zero and one, required during generation
rotationDegreesDoublefinite counterclockwise angle in degrees, required during generation

Enum values

JSON enum values are case-sensitive strings. Null selects inheritance/defaults only where the owning field allows it.

BorderStyle

NONE, SOLID, DASHED, DOTTED

Enum contract ↗

FormatStyle

FULL, LONG, MEDIUM, SHORT

Enum contract ↗

Keep

AUTO, PREFER

Enum contract ↗

LetterElement

SENDER, DATE, RECIPIENT, REFERENCE, SUBJECT, SALUTATION, CLOSING

Enum contract ↗

Orientation

PORTRAIT, LANDSCAPE

Enum contract ↗

PageNumber

CURRENT, TOTAL

Enum contract ↗

PageSelector

FIRST

Enum contract ↗

PageSize

A4, LETTER

Enum contract ↗

SignaturePlacement

Enum contract ↗

StyleRole

BODY, HEADING, TABLE, TABLE_HEADER, TABLE_CELL, HEADER, FOOTER, SIGNATURE, SENDER, RECIPIENT, DATE, SUBJECT, REFERENCE, SALUTATION, CLOSING

Enum contract ↗

TextAlign

LEFT, CENTER, RIGHT, JUSTIFY

Enum contract ↗

TextDirection

AUTO, LTR, RTL

Enum contract ↗

VerticalAlignment

TOP

Enum contract ↗

Zone

TOP

Enum contract ↗