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

how to read form field values from adobe live cycle manager in java

bharanig3809731
Level 2
Level 2

I created a pdf using Adobe acrobat DC and able to read values using below code.

PdfReader pdfReader = new PdfReader(filePath);

        AcroFields acroFields = pdfReader.getAcroFields();

        Map<String, AcroFields.Item> fields = acroFields.getFields();

        Map<String, String> fieldsMap = new HashMap<>();

        for (Entry<String, Item> entry : fields.entrySet()) {

            fieldsMap.put(entry.getKey(), acroFields.getField(entry.getKey()));

        }

But when i created a pdf using Adobe Live Cycle Manager the above code is not working when i try to read the form fields.

Please let me know how to read the form fields if we create a form using Adobe LiveCycle Manager.

3 Replies
BarlaeDC
Level 5
Level 5

Hi,

When you create a form using LiveCycle, it does not create an AcroForm, it creates an XFA (XML) form. You can read here about the differences, but it boils down to you cannot access the fields in an XFA form using AcroFrom methods.

What is the difference between AcroForms and XFA? – Appligent

Regards

Malcolm

bharanig3809731
Level 2
Level 2

Thanks for your reply.

Can you please share the examples which contains how to read from form and write into form(created by Adobe LiveCycle Designer) in java.

bharanig3809731
Level 2
Level 2

Hi,

I created a template using AEM forms designer. And my input is Map with key, value pairs. And i need java code to pass these values to template and generate a pdf.

Can you please help on this.