Native cloudy annotation borders

HPDFRenderHeadlessPagePNG synthesises a temporary cloudy border for Square, Circle, Polygon and FreeText annotations without a normal appearance

A supplied normal appearance retains precedence and no generated AP, fonts or graphics-state resources are added to the source PDF

Continuous contours

The BE dictionary selects S=C and intensity I from 0 through 2, with the standard default of 0; BS width and dash patterns remain effective as required by ISO 32000-1 Table 167

Clouds use one closed cubic scallop contour with winding-aware outward normals, bounded curved-path flattening and deterministic perimeter spacing

Rectangles and ellipses retain RD geometry; polygons consume Vertices or line/cubic Path operations, including clockwise, anticlockwise and concave shapes

Stroke and fill colours, CA/ca opacity, page rotation, UserUnit and the annotation Form BBox remain effective; zero intensity, zero width and absent stroke colour retain the ordinary appearance path

FreeText uses the existing Unicode layout builder with content bounds inset from the inner cloud ink boundary, without changing the source RD

Limits and acceptance

Contour storage, subdivision depth, operations, tokens, decoded bytes, working memory and output bytes are bounded; cancellation and failed rendering preserve destination bytes and source objects

The normal non-GUI entry points and fixed geometric acceptance formulas are documented in Tests/Linux/HeadlessCairoCloudAnnotations.en-us.md

Independent analytic companions cover width, intensity, dash, opacity, rotation and UserUnit at multiple scales; actual MuPDF and Poppler evidence remains separate because the standard does not prescribe an exact scallop style

Ordinary missing-appearance fixtures are PDF 1.7, whilst PDF 2.0 Path fixtures explicitly exercise missing-appearance recovery

Embedded CFF default fonts, additional FreeText DA operators and exact fractional-triangle text coverage remain separate work

See annotation fallback and line captions and relief borders for related rendering behaviour

Generated annotation font views share one immutable, budgeted decoded buffer within each annotation, whilst repeated font parsing still reserves its temporary working memory and polls cancellation