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
BedrockMission!

Learn More

View all

Sign in to view all badges

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

Avatar

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,198 likes

Total Posts

6,369 posts

Correct Reply

1,147 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,198 likes

Total Posts

6,369 posts

Correct Reply

1,147 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile
kautuk_sahni
Community Manager

09-05-2021

BlogImage.jpg

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

Abstract

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.

Prerequisites
1. AEM 6.4+
2. Forms Add-on
3. AEM Maven project should have the following dependencies (artifactId)
adobe-lc-forms-bedrock-connector
adobe-aemds-core-docmanager
adobe-aemfd-docassurance
com.adobe.aemfd
4. Acrobat PDF license to edit the PDF files

Solution
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

Q&A

Please use this thread to ask the related questions.

AEM AEMEBlogSeeding Experience Manager