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§
- Flatten
Cache Stats - Counters of the flatten cache: hits, misses, entries and bytes held.
Counters for observing the cache.
hits + missesis the number of lookups. - Form
Data - A JSON-friendly representation of an XFA form’s data.
- Form
Node Id - A unique identifier for a form node.
- Form
Schema - Schema metadata for a form’s fields.
- Form
Tree - The form tree: a node-based representation of the merged template+data.
- Presence
Change - One presence transition observed across an interactive episode.
- XfaCommit
Outcome - Outcome of an interactive
XfaSession::commit_value(Phase 2). - XfaField
Model - SDK-level model of one fillable XFA form field, derived from the merged form tree and the current layout.
- XfaField
Option - 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).
- XfaScript
Error - One script that did not complete, and how.
- XfaScript
Report - What interactive episodes did not run, and why. Each script is counted once however many calculate passes or episodes visit it.
- XfaScripts
Skipped - Scripts the episode did not run, by language.
- XfaSession
- Parse-once session over a single XFA PDF.
- XfaSet
Outcome - Outcome of a successful
XfaSession::set_valuecall. - XfaWidget
- One layouted widget occurrence of a field.
- XfaWriteback
Report - Report from a save/writeback.
Enums§
- XfaError
- XfaError.
- XfaField
Type - Public field type, mirroring
FieldKindwithout leaking the layout-engine type into the SDK surface. - XfaScript
Error Kind - Why a script did not complete in an interactive episode.
- XfaWrite
Value - 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 flattenthrough the process-wide content-addressed cache (#468).- flatten_
with_ password - Flatten an encrypted XFA document, using
passwordto open it. - form_
tree_ to_ json - Convert a FormTree into a JSON-friendly
FormDatastructure. - form_
tree_ to_ value - Convert a FormTree into a raw
serde_json::Value. - has_xfa
- Returns
trueif the document has an XFA template packet.