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

Using AEM Forms (6.2), interactive form generated is not showing data on the output PDF

Avatar

Avatar
Level 1
yogeshs80721281
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
yogeshs80721281
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
View profile
yogeshs80721281
Level 1

20-05-2020

Hi All,

 

We are using AEM Forms (6.2) for rendering our business forms.

 

To render the input PDF forms with data, we pass in XML data. Once rendered we get a static output PDF, without any issues:

JAVA logic used is:

 

 

ServiceClientFactory myFactory = ServiceClientFactory.createInstance(createConnectionProperties());
OutputClient outputClient = new OutputClient(myFactory);
OutputResult outputDocument = outputClient.generatePDFOutput2(TransformationFormat.PDF, null,formDocument, null, renderOptionsSpec, xmlDataDocument);
document = outputDocument.getGeneratedDoc();

 

 

 

Sample PDF Output with all text fields as read only:

Screenshot 2020-05-20 at 11.58.51 AM.png

 

Recently, we got a new requirement for rendering forms with interactive fields on it. In order to resolve this use case we started using,

below JAVA logic:

 

 

ServiceClientFactory myFactory = ServiceClientFactory.createInstance(createConnectionProperties());
FormsServiceClient formsServiceClient = new FormsServiceClient(myFactory);
formsServiceClient.resetCache();
FormsResult formResult = formsServiceClient.renderPDFForm2(formDocument, xmlDataDocument,
null, null, null);
document = formResult.getOutputContent();

 

 

 

This new input PDF form now has one "read only" & one "user entered" text fields with data bindings.

When this input PDF form is rendered with an input XML data using formsServiceClient.renderPDFForm2() method, we are getting the PDF output.

 

When this new output PDF form is previewed using any browser (chrome/safari/firefox) or any of the browser based viewer components, it is not showing any data on it.

 

Sample PDF Output with one text field as read only and one field as user entered:

Screenshot 2020-05-20 at 12.17.01 PM.png

 

But this new output PDF with interactive fields is getting previewed with data only on "Adobe Acrobat Reader".

Sample PDF Output with one text field as read only and one field as user entered on Adobe Acrobat Reader:

 

Screenshot 2020-05-20 at 12.09.30 PM.png

 

I would really appreciate if some body can help me in this regard.

 

Our requirement is to preview the interactive PDF form on our internal viewer component (which is based out of browser PDF viewer), where we can see data on other read only fields and enter the data on the interactive fields.

 

More Info:

AEM Forms version: 6.2

Designer Version: 6.2.0.20160331

Form saved as : Adobe static PDF Form (*.pdf)

AEM 6.2 AEM Forms AEM Forms JEE Designer Interactive Communication

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
Level 10
Mayank_Gandhi
Level 10

Likes

284 likes

Total Posts

1,105 posts

Correct Reply

182 solutions
Top badges earned
Validate 1
Contributor 2
Ignite 5
Ignite 3
Ignite 10
View profile

Avatar
Validate 1
Level 10
Mayank_Gandhi
Level 10

Likes

284 likes

Total Posts

1,105 posts

Correct Reply

182 solutions
Top badges earned
Validate 1
Contributor 2
Ignite 5
Ignite 3
Ignite 10
View profile
Mayank_Gandhi
Level 10

21-05-2020

@yogeshs80721281  For interactive PDF you should use Adobe reader or acrobat to test the form, not the browser.

Answers (2)

Answers (2)

Avatar

Avatar
Ignite 1
Level 7
GirishBedekar
Level 7

Likes

162 likes

Total Posts

232 posts

Correct Reply

36 solutions
Top badges earned
Ignite 1
Give Back 5
Give Back 3
Give Back 10
Give Back
View profile

Avatar
Ignite 1
Level 7
GirishBedekar
Level 7

Likes

162 likes

Total Posts

232 posts

Correct Reply

36 solutions
Top badges earned
Ignite 1
Give Back 5
Give Back 3
Give Back 10
Give Back
View profile
GirishBedekar
Level 7

26-05-2020

"Our requirement is to preview the interactive PDF form on our internal viewer component (which is based out of browser PDF viewer)" Since your viewer component is based on browser PDF viewer your use case will not work here.

Avatar

Avatar
Level 1
yogeshs80721281
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
yogeshs80721281
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
View profile
yogeshs80721281
Level 1

26-05-2020

@Mayank_Gandhi Thanks for responding.

We understand that interactive forms have to be previewed only using Acrobat Reader and not the browser.

But according to our requirement:

1. "Read Only" fields have the data binding and have to show the data on those fields when rendered.

2. Along with "Read Only" fields, if there are any interactive fields, user should be able to enter the data into the editable text fields.

Internal to our organisation, we have developed a viewer component (using React) for our web app, where we can open the interactive form (on the browser), edit the PDF interactive form and then save it onto local file system.

In this process we were getting the above mentioned issue of data not being displayed.

Can you suggest any other idea to make this work?