Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Steps to Merge XML Data in Existing PDF Forms | AEM Community Blog Seeding

Community Manager
Community Manager


Steps to Merge XML Data in Existing PDF Forms by Suvadeep Dey


The business use case
An organization wants to provide a mechanism to its customers to dynamically populate their demographic data from some other 3rd party system to an offline PDF form, thus saving their customers a lot of time, providing a better experience and automating the form fill-up process.

1. AEM 6.4+
2. Forms Add-on
3. AEM Maven project should have the following dependencies (artifactId)
4. Acrobat PDF license to edit the PDF files

The solution is to use AEM Forms technology by leveraging the Forms API to automatically merge the XML with the existing PDF forms.
Prepare the offline PDF for merge functionality to verify whether the field names in the PDF meet the XML specification with respect to XML tag naming. The field names in the PDF correspond to the XML tag names. This can be done by the following steps —

a) Open the PDF file in Adobe PDF reader.One should have the license to also edit the PDF
b) Select the option Edit the PDF from the right side pane in the PDF reader and this will open the file for editing.
c) Once the file is open for editing, select File menu -> Create -> Create Form -> click on Start button
d) This will make all the fields of the PDF visible on the right side pane as a tree structure where one can edit the actual names of the fields and make the field names to meet the XML

tag naming specification e.g. field names should not have a ‘ ’ in their names because XML tags should not have a space in their name. In case the field names are found to have ‘ ‘ in their names, a good practice would be to just replace them with a character such as ‘_’ or delete the ‘ ‘ altogether. The field During the lease could be converted to During_the_lease or DuringTheLease, etc.

Read Full Blog

Steps to Merge XML Data in Existing PDF Forms


Please use this thread to ask the related questions.


Topics help categorize Community content and increase your ability to discover relevant content.

0 Replies