Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

How to make a PDF form call Web service and return a static pdf for user to print?

Avatar

Level 1

Hi all,


Can anyone help me regarding the feasibility of using PDF forms for my following case?

I would like to create a Dynamic pdf form. User only have the Acrobat reader. they can enter some information. Then have a submit button. when user click the submit button, it can call the web service with data. then Web service returns a Static PDF document based on data and the user can print it out. (and maybe save as separate pdf file)

1. Is that possible to implement? Because I know PDF can call web service, but dont know how it handle when the webservice returns another static PDF document. could it able to handle the responds and open up in another acrobat reader?

2. As I understand I need to have Live Cycle Designer to create a pdf  and make it Reader Enabled. So user can user reader to call webservice? am I correct?

3. What minimum reader that user need to have? PDF reader 7 or above?

4. I have a webservice serve the same purpose for web. But if I want the same web services can serve both web and PDF form. So, whatever client (PDF or Web)make the web service call, server returns the PDF document to client. Is that possible ? Do I need to make any changes on web service?

5. Do I need to get any other Adobe server product? (other than Live Cycle Designer )

Thanks a lot

4 Replies

Avatar

Level 10

We have done a similar approach in the past and yes, it can be doable.

1. Is that possible to implement? Because I know PDF can call web service, but dont know how it handle when the webservice returns another static PDF document. could it able to handle the responds and open up in another acrobat reader?

Srini: We have developed a Servlet to talk to Webservice. Based on the Webservice response, the Servlet, prepares the Byte stream and sends it to Webbrowser to display as a PDF. The PDF data was submitted to Servlet in XML format.

But if you do not want to use the above approach, then you have to use the Workbench Process.

Submit the PDF data to a Workbench process and the inside process, execute Webservice Service with the data. Once the response is received, prepare the data XML and render a PDF with it.

To do this, you need LiveCycle Server and Reader Extensions server component.

2. As I understand I need to have Live Cycle Designer to create a pdf  and make it Reader Enabled. So user can user reader to call webservice? am I correct?

Srini: If you want to use the Servlet, you can Reader extend the PDF with Acrobat.. But if you want to submit the data directly to Webservice, then you need Reader Extensions server component.

3. What minimum reader that user need to have? PDF reader 7 or above?

Srini: Not sure but Reader 8 and above should work.

4. I have a webservice serve the same purpose for web. But if I want the same web services can serve both web and PDF form. So, whatever client (PDF or Web)make the web service call, server returns the PDF document to client. Is that possible ? Do I need to make any changes on web service?

Srini: If you use the Servlet approach, then you can re-use the same webservice. But if you want to submit directly to the same webservice, you may need to change it to suit your data XML.

5. Do I need to get any other Adobe server product? (other than Live Cycle Designer )

Srini: If you use the Servlet approach, you do not need any server component but other approach, you need Livecycle Server and Reader Extensions server component.

Thanks

Srini

Avatar

Level 1

Thanks a lot Srini, this is very helpful to me.

  However I am thinking the user will be anywhere in the world, then go thur internet.

Just one thing I am not very clear is how it pop up when static PDF reply back from webservce to the original PDF form? Suppose User open the PDF form using the Acrobat reader to fill in data.

But some point is not very clear to me.

First approach:

user fill in data (using arcobat reader) and submit XML data -->[ internet ] -->Servlet --> Webservice -> static result PDF -->Servlet -->[ internet ]--> Byte stream and sends it to Webbrowser (User is using acrobat reader, how could it popup the browser for the replied PDF file from acrobat reader?)

Second approach:

user fill in data (using arcobat reader) and submit data -->[ internet ] --> Workbench process --> Webservice -> Workbench process to prepare the data XML and render a PDF with it.-->[ internet ]-->> (then how it get back to original PDF form? it will show in another Acrobat reader?

Many thanks

Avatar

Level 10

Our application was also accessed by the users using internet. They go to our company website click on a link to get the PDF form on their screen. In this case, the PDF is displayed in a browser using Acrobat plugin.

Once they submit, the data goes to a Servlet and then the Servlet displays the response PDF in a second browser on top of the original PDF.


It all depends on how the users will have access to the PDF. If you distribute the PDF files to the users then the approach I mentioned does not work. But if your users get the PDF by clicking on a link on any website, then you can use the similar approach.

Hope this helps..

Thanks

Srini

Avatar

Level 1

Thanks for your responds.

Actually, I expect the user will download the PDF file and they will open it up with Acrobat Reader. So, under the Acrobat reader, they fill in the form and click the submit button and (call the webservice) return back the another returns PDF document for user.

As you mentioned, for both approach using servlet and using Workbench is Not going to work?  :<

Is it because acrobat reader only accept the simple string as returns type?  (In fact, just thinking is that possible for servlet approach? when the submit button click, can it open up a webbrowser with url +  user filled data (POST methos), then it will process and returns a link of pdf file. It that a possible solution?)

Is there any other solution for this scenario?