Extracting data from PDF forms 

Use the exportData (Javadoc) operation of the Forms service to extract data XML from a PDF form. This operation accepts a document as its first parameter. You can export the data either as an XDP document or an XML file. If you export the data as an XML file, the exported data removes the XDP envelope and returns a plain XML file. You can specify this arrangement using the second parameter.

Importing data into PDF forms

Forms service also lets you merge a PDF form created using either AEM Forms Designer or the renderPDFForm operation with XML data. The importData (Javadoc) operation of Forms service accepts the PDF form and XML data and returns a PDF form with data XML.

Rendering forms based on fragments

Forms service can render forms based on fragments that you create using AEM Forms Designer. A fragment is a reusable part of a form. It is saved as a separate XDP file that can be inserted into multiple form designs. For example, a fragment can include an address block or legal text.

Using fragments simplifies and accelerates the creation and maintenance of large numbers of forms. When creating a form, insert a reference to the required fragment for the fragment to appear in the form. The fragment reference contains a subform that points to the physical XDP file.

The following are the advantages of using fragments:

  • Content reuse: You can reuse content in multiple form designs. To quickly reuse parts of the same content in multiple forms, create a fragment. Copying or re-creating the content takes a longer time. Using fragments also ensures that the frequently used parts of a form design have consistent content and appearance in all the referencing forms.
  • Global updates: You can make global changes to multiple forms only once in a file. You can change the content, script objects, data bindings, layout, or styles in a fragment. All XDP forms that reference the fragment reflect the changes.
  • Shared form creation: You can share the creation of forms among several resources. Form developers with expertise in scripting or other advanced features of AEM Forms Designer can develop and share fragments that use scripting and dynamic properties. Form designers can use the fragments to design forms. In addition, they can use the fragments to ensure that all parts of a form have a consistent appearance and functionality across multiple forms.

Experience Manager


Espressos & Experience Manager: AEM Forms

Espressos & Experience Manager

Thursday, Mar 6, 7:00 PM UTC

Join Adobe's AEM product team as they highlight AEM Forms' latest innovations, including: the new Gen AI Assistant, Unified Composition with AEM Sites, and new ways to deploy forms through conversations.

Register

Connect with Experience League at Summit!

Get front-row access to top sessions, hands-on activities, and networking—wherever you are!

Learn more