These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

simple sample javascript to call web service on pdf open

acrobat_student
Registered: Dec 29 2010
Posts: 28

Hi,
 
I reviewed the documents at http://forums.adobe.com/thread/773075 and still trying to get a good feel for the acrobat javascript scripting and finding it a bit confusing. meanwhile could someone point me to where I can find simple sample javascripts to call a web service from a pdf, say on pdf open... any other resources to better understanding the features and functionality available via acrobat javascript are also much appreciated.
thanks

UVSAR
Expert
Registered: Oct 29 2008
Posts: 1357
Bear in mind that the SOAP JavaScript interface is only accessible by default in Adobe Acrobat. To get it to work in Adobe Reader, the PDF file containing the script must have special rights assigned using Adobe LiveCycle Reader Extensions (which is an enterprise-class solution and most certainly not part of Acrobat). The commenting and form-filling permissions assigned by Acrobat Pro do NOT enable SOAP commands in Adobe Reader.

You're better off looking at XFA (the type of form created by LiveCycle Designer) - whose database connectivity methods will work in both Acrobat and Reader. LCD is bundled with Acrobat Pro and there are loads of tutorials and books available to learn how to use it.
acrobat_student
Registered: Dec 29 2010
Posts: 28
whats LCD?
acrobat_student
Registered: Dec 29 2010
Posts: 28
ok, livecycle designer...
acrobat_student
Registered: Dec 29 2010
Posts: 28
we are actually looking for a solution that would work for users with acrobat reader and would involve the lowest additional cost overhead to us. Does being able to use a web service from a pdf have to incur a cost overhead ? it looks that way to me based on the above update- pay for LC Extensions with Acrobat Javascript or LCD with XFA..Which would likley be lower cost? thanks again for the assist...cheers
acrobat_student
Registered: Dec 29 2010
Posts: 28
is there any way to do this outside javascript/XFA, say using C++/java adobe plugins, acrobat SDk etc...? that would call a web service on pdf open? in case those are lower cost...
acrobat_student
Registered: Dec 29 2010
Posts: 28
I installed acrobat pro but dont see livecycle designer also installed or bundled with it..any idea how I can logonto the bundled lcd instllation?
UVSAR
Expert
Registered: Oct 29 2008
Posts: 1357
LiveCycle Designer is bundled with the Windows edition of Acrobat Pro, and will appear as a second program rather than a plugin to Acrobat. There isn't a Mac version, bundled or otherwise.Using LCD to design an XFA form there isn't any cost other than the time and the price for the copy of Acrobat, though you will naturally be restricted by the EULA in terms of receiving the responses from a Reader-extended document - namely 500 per document. Creating forms in LCD is not difficult but it's a different concept to Acrobat - there are tutorials on this site, and experts on the forums can help with specific queries.

Plugins for Adobe Reader are not a financially-realistic option unless you have a closed user group (an enterprise) where installation can be controlled. Not only would you have to write and compile plugins for each platform in C++, there is a fee payable to Adobe for the digital key required to sign a Reader plugin. Without that key, it won't install. Plugins for *Acrobat* are free to develop and distribute, but Reader has a tightly-controlled approval process to stop developers adding features such as document editing.
acrobat_student
Registered: Dec 29 2010
Posts: 28
" be restricted by the EULA in terms of receiving the responses from a Reader-extended document - namely 500 per document" - You mean I will be resticted by the EULA to receiving 500 responses from a Reader-extended document?
try67
Expert
Registered: Oct 30 2008
Posts: 2398
Correct.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

acrobat_student
Registered: Dec 29 2010
Posts: 28
not to belabor the point - does that mean 500 responses from one instance of the document being opened in an acrobat reader session or 500 responses from one instance of the document from one acrobat reader installation(for the lifetime of the document on that installation) or 500 responses total from all instances of the document being opened on all acrobat reader instances.
acrobat_student
Registered: Dec 29 2010
Posts: 28
it looks to me that the '500 users' cllause applies only to reader-extended documents. i.e documents which have been processed via livecycle reader extensions, but UVSAR's post above seems to imply that it also applies to forms using XFA and LCD via acrobat pro. Is that true?
acrobat_student
Registered: Dec 29 2010
Posts: 28
also would I be able to enable SSL with XFA generated forms calling web services? I noticed that javascript had support for WS-Security but wanted to check if XFA would too...
UVSAR
Expert
Registered: Oct 29 2008
Posts: 1357
The restriction on receiving 500 responses from any unique document, or unlimited responses from a distribution group of 500 or less, is activated for any PDF file with extended Reader rights applied. These allow Reader users to fill in and save copies of forms, and are applied when the Distribute tool is used in LCD or when a PDF file is saved in Acrobat with the Extended Rights option chosen.
acrobat_student
Registered: Dec 29 2010
Posts: 28
so, If I have a user base > 500 (though finite), Would I have to manually have to create multiple copies of the document by splitting up my user base into groups of 500 or can that be automated?
acrobat_student
Registered: Dec 29 2010
Posts: 28
also in a scenario that I am using LCD and XFA to call a web service, where exactly are these 500 unioque users per document audited? given that there is no central adobe server product they are hitting?
try67
Expert
Registered: Oct 30 2008
Posts: 2398
skrish wrote:
so, If I have a user base > 500 (though finite), Would I have to manually have to create multiple copies of the document by splitting up my user base into groups of 500 or can that be automated?
No, you'll have to buy the license from Adobe to be allowed to do so.

skrish wrote:
also in a scenario that I am using LCD and XFA to call a web service, where exactly are these 500 unioque users per document audited? given that there is no central adobe server product they are hitting?
It's a legal restriction, not a technical one.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com