Skip to main content

Module xfa

Module xfa 

Source
Expand description

XFA feature surface for pdf-engine.

This module is compiled only with the xfa feature and re-exports the high-level helpers needed to extract and flatten XFA content without making the base crate depend on the XFA stack by default.

Structs§

FlattenCacheStats
Counters of the flatten cache: hits, misses, entries and bytes held. Counters for observing the cache. hits + misses is the number of lookups.
FormData
A JSON-friendly representation of an XFA form’s data.
FormNodeId
A unique identifier for a form node.
FormSchema
Schema metadata for a form’s fields.
FormTree
The form tree: a node-based representation of the merged template+data.
PresenceChange
One presence transition observed across an interactive episode.
XfaCommitOutcome
Outcome of an interactive XfaSession::commit_value (Phase 2).
XfaFieldModel
SDK-level model of one fillable XFA form field, derived from the merged form tree and the current layout.
XfaFieldOption
A selectable option of a dropdown / list field.
XfaPackets
XfaPackets.
XfaRect
Axis-aligned rectangle in page space, points, top-left origin (XFA coordinate convention: y grows downward from the top of the page).
XfaScriptError
One script that did not complete, and how.
XfaScriptReport
What interactive episodes did not run, and why. Each script is counted once however many calculate passes or episodes visit it.
XfaScriptsSkipped
Scripts the episode did not run, by language.
XfaSession
Parse-once session over a single XFA PDF.
XfaSetOutcome
Outcome of a successful XfaSession::set_value call.
XfaWidget
One layouted widget occurrence of a field.
XfaWritebackReport
Report from a save/writeback.

Enums§

XfaError
XfaError.
XfaFieldType
Public field type, mirroring FieldKind without leaking the layout-engine type into the SDK surface.
XfaScriptErrorKind
Why a script did not complete in an interactive episode.
XfaWriteValue
A value to write into an XFA field.

Functions§

clear_flatten_cache
Drop every cached flatten. Never needed for correctness; releases memory.
export_schema
Extract a schema from a FormTree.
extract_packets
Extract the XFA packets embedded in a document.
flatten
Flatten an XFA document into static PDF bytes.
flatten_cache_stats
Counters of the process-wide flatten cache.
flatten_cached
flatten through the process-wide content-addressed cache (#468).
flatten_with_password
Flatten an encrypted XFA document, using password to open it.
form_tree_to_json
Convert a FormTree into a JSON-friendly FormData structure.
form_tree_to_value
Convert a FormTree into a raw serde_json::Value.
has_xfa
Returns true if the document has an XFA template packet.