Expand my Community achievements bar.

How to submit PDF form from my local hard disk(offline submission)?

Avatar

Level 2

Hi All,

       Earlier I used to submit PDF form using LC workspace to a LC workbench Process , but now I had a requirement to submit the PDF without workspace. I need to open a local PDF and if I click the submit button then it should invoke the LC workbench Process via Soap end point. Please can anybody help me out!

I will greatly appreciate any help on this issue

22 Replies

Avatar

Level 10

Here are the two suggestions of which you could consider for offline submission.

1. Email Submit (Simple way)

    - Place an email submit in the form and submit to an email account

    - Configure an email endpoint for your process

2. HTTP Submit (a little Complicated)

    - Submit your form data to a servlet or a .net page

    - Invoke the process using its soap endpoint from servlet/.net code with the APIs provided

Nith

Avatar

Level 2

Hi,

   As you said earlier  two approaches.

    1. First approach is Through Email Submit button.

    2. Submitting PDF form data through servlet.

Actually my requirement is  offline PDF form submission without using any servlet. I am new to adobe Live Cycle Workbench as well as designer tool. First approach is not cleared to me .It will be great if you explain me in more detail. My doubt is , is it possible to invoke the LC Workbench Process from local PDF without using Servlet?

Thanks in advance

Avatar

Level 10

Option 1 (Using email submit button)

On your process:

Create an email endpoint and set the properties. Configure the filters appropriately (See livedocs for any help)

In the form:

You could place an email submit button inside the form and the form could be saved in local hard disk.

Once you filled the form and click on the submit button (i.e the email submit button), the email client will open with the form data attached with it.

The email client will also prepopulated with the email address to send and the subject too.

On clicking of the send button, the data will be posted to the designated email server.

Now your process will be invoked using the email endpoint created with the supplied data

Clear?

Option 2 (Using a Servlet or a .Net application)

You can place a HTTP Submit button in the form.

Mention the Servlet or the .Net page location

Now on click of the submit button, the form will be posted to the java/.net server.

Adobe has provided APIs to invoke your process using Java/.net etc. From there you could proceed to invoke the process.

Since you are new to LiveCycle, I recommend the first option.

Nith.

Avatar

Level 1

Hi All,

This is my first post in this forum.

I am also looking for same solution ,that is how to submit a PDF form  offline via soap end point to a LC workbench process without using any servlet or jsp.

I have gone through the links  http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/help/000285.html#15 48279   provided by Nith.

This link is very usefull . But there is one issue regarding creating  XFAForm variable . Variable type XFAForm is deprecated in LiveCycle ES2 version 9.0.

Now in LiveCycle ES2 version 9.0  , I do not know any alternative for XFAForm variable .

Please help me ...........

Deba......

Avatar

Level 10

I hope this can be surely done; however I do not have time to investigate on this now.

I will give you some ideas to proceed; just take a try and see the result.

1. On click of a button in the form, Export the form data into xml or string format

2. Invoke the web service (SOAP endpoint of your process to be invoked) through javascript

      2.1   You need to pass the data to your process as binary stream (in javascript it is named as readStream)

            2.1.1 In case of strings, you can convert them into binary data as readStream(stringVar)

See the attached Javascript reference manual on page 252 for SOAP related clarifications

Nith

Avatar

Level 10

Finally I have done a sample to achieve this requirement.

Here are the summary of steps what I did.

1. Created a simple event (includes a string data to carry as event data/message)

2. Created a process (Proc1) on which a string variable is created (and parked as Input); The process is short lived

3. Created another long-lived process (Proc2) with the newly created event as startpoint event.

4. Created a form which invokes the Proc1 using SOAP (i.e data connection) and passing the data      (see the attached form which does this logic)

If needed, I will share my processes & events created.

Nith

Avatar

Level 2

Hi Nith,

Thank you for the reply with more informative.

If you dont mind can you share the process and events also with us!

Thanks in advance

Anand

Avatar

Former Community Member

hi Nith,

i tried to use your javascript to send the xml from pdf to soap endpoint in my process, but it does not work.

what i the meaning of the events you used in your process?

E

Avatar

Level 10

Our aim is to invoke a human centric process - a Long-Lived process.

We cannot make synchronous calls to a long-lived process.

I attempted to write a short-lived which invokes the actual long lived process as sub process - which was also unsuccessful.

Hence I thought about events concept.

I created a short-lived process which just contains a simple event(throw) and same event is placed as startpoint of the long-lived process.

Make sure to invoke the short-lived process's soap endpoint.

Regards,

Nith

Avatar

Former Community Member

Dear Nith,

sorry to bother you again. i imported your processes but i am getting an error: event not found. when clicking on event properties. so i tried to mimic your processes by creating the same you did:

1. when creating the short lived process i have to choose the event type. i did take asynchronous/content created. no idea if this is correct.

2. when creating the long lived process the question is how to link this event to the event from the short lived process

3. when setting up the the PDF form i chosse the assynchronous link to the short lived process:

<wsdlConnection name="DataConnection3" dataDescription="DataConnection3invoke_AsyncRequestDD">
      <soapAddress>http://10.100.102.73:8080/soap/services/OznamPsa/P2</soapAddress>
      <wsdlAddress>http://10.100.102.73:8080/soap/services/OznamPsa/P2?wsdl&amp;lc_version=9.0.0&amp;version=1.0</wsdlAddress>
      <soapAction>invoke_Async..9.0.0</soapAction>
      <operation input="invoke_AsyncRequest" output="invoke_AsyncResponse">invoke_Async</operation>
      <?templateDesigner fileDigest shaHash="2zWQFkLYI4hAMY+ki9Jd8D8uE6w="?></wsdlConnection>

but i also had problems with the synchronous...

when recording the process activity i get no recording to play back after the tests.

any more hints for me?

Avatar

Level 10

I created an archive for you.

The archive contains two processes:

SOAP_Invocation_Test          - is the short-lived process

SOAP_Usage                       - is the long lived process

and one event:

SOAP_Test

and one PDF form:

saveas.pdf

After importing the archive do the following changes:

1. open the SOAP_Usage process and edit the AssignTask operation

2. Open the attached PDF file (Directly Invoke Workflow.pdf) in livecycle designer and update the data connection wsdl .

3. Reader extend the modified PDF file

Cheers,

Nith

Avatar

Former Community Member

thank you Nith, now i just have to figure out how to edit an v8 aplication on v9 SE2 server and workbench. i will let you know when i succeed.

E

Avatar

Former Community Member

hi Nith,

now it works thank you .

last question: what pdf client do you use?

adobe acrobat 9 pro - trial version: works fine

adobe reader 9.3.0 - does not send at all (i monitored it with wireshark)

so basicaly if i have to develop an aplication that should recieve messages from various pdf clients i cant relay on that people using it will all have the pro version...

E

Avatar

Level 10

Did you reader-extend the form after editing?

Nith

Avatar

Former Community Member

according to this:

http://cookbooks.adobe.com/post_Using_LiveCycle_Forms_in_Acrobat_and_Reader-16518.html

i would need the option 4 livecycle reader extensions SE, which i dont have and cant download.

i am not sure if my company will purchase this so maybe i will have to search another way to submit the form.

E

Avatar

Former Community Member

Nith,

I followed your steps but I am facing one issue...after clicking on submit button. I am getting worning message and it says that

Couldn't post data to ".

/Srujan

Avatar

Level 10

Can you send your form to nith.mof@gmail.com  ?

I will try to look into the issue.

Nith