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

bharanig3809731

02-04-2019

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.

Accepted Solutions (0)

Answers (3)

Answers (3)

bharanig3809731

11-04-2019

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.

bharanig3809731

03-04-2019

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.

BarlaeDC

03-04-2019

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