XFA forms often contain validation, calculation, and visibility logic written in JavaScript or FormCalc. This is the hardest part of XFA migration:
JavaScript migration — AcroForm supports JavaScript via /AA (additional actions) triggers (field change, mouse enter/exit, validate, calculate). XFA's JavaScript model differs: it uses the XFA object model (xfa.form.*, xfa.data.*) rather than the AcroForm/Acrobat JavaScript API. Scripts must be rewritten to use the AcroForm object model. Logic that depends on dynamic layout or data binding has no AcroForm equivalent and must be redesigned.
FormCalc — FormCalc is a proprietary scripting language with no AcroForm equivalent. FormCalc scripts must be converted to JavaScript or the logic must be reimplemented. Adobe published FormCalc documentation that aids in translation, and some common FormCalc functions (Sum, If, Concat) have straightforward JavaScript equivalents.
Practical approach:
1. Audit your XFA form inventory: categorise forms as static (no scripts), simple-scripts (JS/FormCalc without dynamic layout), or complex (dynamic layout, data binding).
2. Static forms: use automated conversion tools.
3. Simple-script forms: convert and manually translate scripts.
4. Complex forms: plan a redesign, possibly replacing with HTML5 web forms integrated with your document management system.
PDF/UA compliance is an important consideration during migration — AcroForm fields must have accessible labels (
/TU tooltip, correct tab order). See
PDF Forms Best Practices for accessible form field requirements.