Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.
SOLVED

Populate fields at client side dynamically without reader extensions

Avatar

Level 4

Hi,

Can I make a call to the server from a pdf form using Ajax technology ? I want to populate some textfields dynamically on the client side based on some user selection . I dont have the reader extension license yet to make a web service call to the server . Is there any other way to acheive the desired requirement ?

Thanks.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Yes, there is a better way to do this without Reader Extensions.

Ajax is not an option because it is not supported by Adobe Reader.

Here is the solution:

Write a REST based web service or just any Server Page which accepts query string and responds to the given query string.

Let's assume a Server Page http://myserver.com/EmployeeDetails?EmpId=1234 returns the employee details as a comma separated values.

This page can be called from within PDF using FormCalc

the syntax is

Note that if the web service or page requires authentication, a basic authentication dialog will appear when calling this method.

So better to allow anonymous authentication for the pages.

I implemented this approach in many projects and works great.

Hope that helps..

Nith

View solution in original post

4 Replies

Avatar

Level 4

Hi,

     The basic PDF doesn't have any capablities like Submit, importing or exporting data, 2D barcodes, attachments, commenting when your are accessing PDF from ADOBE Reader, and this is improve security (not giving previlages). Hence, one must have a PDF Reader Extended to submit to a domain.

A button in PDF can we implemented in 3 ways

1. Regular Submit: Basically, used with events inside the PDF and run the scripts (example: click event)

2. Execute: to make a call to a Data Connection (Webservice {WSDL})

3. Submit: make a HTTP Call to remote server and you can POST XML, XDP, PDF

For precise information, please find more details in the image below

image_submit.jpg

I hope this helps you, and let me know in case of any questions

thanks,

Rajesh

Avatar

Level 4

Hi,

Thanks for the response . But we dont have the reader extension license to make a webservice call and wont be able to purchase it also for now. Thats why I was trying to use Ajax technology on the pdf to to make a server call and populate the response. The requirement is to populate some textfields based on some value of the drop down which the user will select at runtime . Is there any way to achieve this requirement without using reader extensions ?

Thanks

Avatar

Correct answer by
Level 10

Yes, there is a better way to do this without Reader Extensions.

Ajax is not an option because it is not supported by Adobe Reader.

Here is the solution:

Write a REST based web service or just any Server Page which accepts query string and responds to the given query string.

Let's assume a Server Page http://myserver.com/EmployeeDetails?EmpId=1234 returns the employee details as a comma separated values.

This page can be called from within PDF using FormCalc

the syntax is

Note that if the web service or page requires authentication, a basic authentication dialog will appear when calling this method.

So better to allow anonymous authentication for the pages.

I implemented this approach in many projects and works great.

Hope that helps..

Nith

Avatar

Level 4

Awesome .. Great help ... Thanks a lot !!