Native Linux C ABI form interchange
Use the established versioned hpdf_document_execute_json_v1 entry point and hpdf_operation_v1 record to export or import scalar and bounded rich AcroForm values as FDF or XFDF
The ABI version, exported symbols and callback record layout remain unchanged
| Operation | InputIO | OutputIO | ResultIO |
|---|---|---|---|
forms.export | Optional PDF input; otherwise the loaded document is used | Actual FDF or XFDF bytes | JSON format, media type, field count and output byte count |
forms.import | Required FDF or XFDF bytes; the destination PDF must already be loaded | Prepared updated PDF bytes | JSON format, media type, field count and changed field count |
Both operations expect format to be exactly fdf or xfdf, with schemaVersion set to 1
{"schemaVersion":1,"type":"forms.export","format":"xfdf"}
{"schemaVersion":1,"type":"forms.import","format":"fdf","fontFamily":"DejaVu Sans","fontSize":12}
Supported values include nested Unicode text fields, checkbox and radio export states, scalar choices and multiple choices; UTF-8 and BOM-marked UTF-16 XFDF are accepted
FDF RV and XFDF value-richtext follow the inline-xhtml-v1 rich profile, with actual regular, bold, italic and bold-italic font programs selected by fontFamily
Signature and pushbutton fields are represented by their names without imported values, preserving populated signatures and existing button behaviour
Import regenerates genuine appearances and preserves authenticated AES R5/R6 encryption, read-only fields, DocMDP permissions and FieldMDP locks
Optional signaturePolicy accepts requireCAdES, requireTimestamp, requireTimestampRevocation, existing trust file or PEM settings and revocationInfo using the signing-options schema
Explicit signed revocation policy verifies the actual embedded signature attributes, including those in an RFC 3161 document timestamp; externally supplied status bytes cannot stand in for a missing required attribute
Optional formDataLimits contains positive integer maxBytes, maxFields, maxObjects, maxDepth, maxValues, maxValueCodeUnits and maxTotalCodeUnits settings, bounded by the native defaults and operation capacity
Existing limits.memoryBytes, outputBytes and resultBytes additionally constrain preparation and publication; an exhausted interchange limit returns HPDF_STATUS_BUDGET_EXCEEDED
Callbacks execute synchronously on the calling thread and may return partial reads or writes; cancellation is observed whilst reading form input, parsing, preparing appearances and publishing the result
The loaded destination handle commits only after the updated PDF and JSON result callbacks succeed; callback errors or cancellation preserve its previous state, whilst bytes already accepted by a caller-owned sink remain the caller's responsibility
Annotation XFDF operations take a separate append profile with popup/reply references and embedded file or sound streams
Arbitrary CSS layout, embedded FDF files, arbitrary actions and incremental FDF revision interchange lie outside the form-data profile
Native Linux C ABI · Signing and trust options · Native import transaction