OptionalactorOptionalappearanceRGBA pixels used as the normal appearance of a stamp annotation.
OptionalappearancePre-wrapped lines used by the generated FreeText appearance. Usually populated by PdfDocument.prepareFreeTextAppearance.
OptionalappearanceNormalized vector paths used as the normal appearance of a stamp
annotation. Points are in a 0–1 box with an SVG-style y-down axis.
Stroke width as a fraction of the appearance width.
OptionalappearancePer-line positioned font and image runs used for mixed-script text and emoji. Usually populated by PdfDocument.prepareFreeTextAppearance; advanced integrations may construct the runs directly.
OptionalauthorOptionalborderOptionalcolorOptionalcontentsAnnotation text. For authored FreeText, pass this spec through PdfDocument.prepareFreeTextAppearance to resolve its fonts, wrapping, and emoji image runs.
OptionalflagsOptionalfontPrimary font face registered with the engine for a generated FreeText appearance. Usually populated by PdfDocument.prepareFreeTextAppearance.
OptionalfontFreeText font size in points. Defaults to 12.
OptionalgeometryOptionalidIdentity stored in the PDF annotation dictionary's /NM ("annotation
name") entry. Supply an application id when the annotation must correlate
with another representation, such as an external store. Omit it to let the
engine generate an id; PdfPage.addAnnotation returns the generated
value.
OptionalinteriorOptionallinkRequired when subtype is link; ignored for other annotation types.
OptionalrectOptionalrevisionOptionaltextHorizontal placement of FreeText content within its box. Defaults to left.
OptionaltextFreeText glyph color. Defaults to black.
OptionaltextText direction for FreeText content. Defaults to page-relative, unrotated.
OptionaltextVertical placement of FreeText content within its box. Defaults to top.
Parameters to create or replace an annotation via
PdfPage.addAnnotation/PdfPage.updateAnnotation.Only these geometries are honored by the engine:
ink(freehand; also how the viewer realizes line/arrow),markupquads (highlight/underline/squiggly/ strikeout), and rect-definedsquare/circle.freeText/textuserect+contents. Coordinates are bounding-box-relative page coordinates (y-up).FreeText requires language-aware font selection, measurement and wrapping; emoji are rendered as image runs because PDF text appearances cannot reliably represent modern color emoji. The normal authored-FreeText flow is therefore:
subtype,rect, andcontents.prepareFreeTextAppearance()mutates the spec by fillingfontFace,appearanceLines, andappearanceRuns. It recognizes mixed scripts, chooses language-specific CJK fonts when a resolver is available, wraps using the selected fonts, and replaces supported emoji with embedded image runs. Kana and Hangul normally identify Japanese and Korean themselves. For ambiguous Han-only text, the engine uses an explicit BCP-47 hint such asja,zh-Hant, orko, followed by the browser's locale when available. Server integrations should obtain the hint from document metadata, the signed-in user's locale, or a parsedAccept-Languagepreference.Example: Add Japanese and emoji FreeText
Most applications should let the preparation method create the appearance fields. Set them directly only when an integration already performs its own font resolution, measurement, line breaking, and emoji rasterization.
For the reason language affects glyph shapes, the automatic browser/server behavior, Linux font setup, offline assets, caches, and custom providers, read the Text, language, and emoji appearance guide.
The corresponding PDF annotation dictionaries are defined by ISO 32000-2:2020, 12.5.2 and the subtype-specific parts of 12.5.6.