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

Externally managed automatically generated number

sjfletcher
Registered: Apr 1 2011
Posts: 2

I have a PDF form created in Acrobat Pro 9 that is used at my company as a template document for data entry. This form contains data entry fields entered by many network users who submit the completed form by email. It is a requirement of this form for it to be used as a template with empty fields. Users cannot write data to the form.
 
I would like to add an autonumbering field to this form but have struggled with finding an acceptable method. I am an experienced JavaScript programmer and can easily write the code to create a method to auto increment a number but security concerns in Acrobat Reader are preventing me from finding a suitable solution.
 
My first attempt was to create a simple text file containing the last number generated, import it with the importTextFile() method, increment the number and add the new number to the required field. Then I would write the new number back to the text file when the user submits the form. For security reasons, the previously described Javascript needs to be in a folder level code file. This is impractical as I don't know which users and which systems will be using the form. I would need to deploy my code to virtually every machine in my company.
 
Next, I tried accessing a simple web service I created that would provide two methods to perform the same functions as described in the previous paragraph. Unfortunately, Acrobat Pro cannot extend enough rights to the form for Acrobat Reader to successfully access the web service. Again, this is for security reasons.
 
Does anyone know of a way to securely create an externally managed automatically incremented number for an Acrobat Reader compatible form that doesn't require modifying every machine that may use the form?
 
Thanks, in advance, for any help.
Stephen

My Product Information:
Acrobat Pro 9.4.2, Windows
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
The text file approach is less than ideal, but you can get the privileged code to run if you include it in a certified document, but your users will have to allow the execution by trusting your digital certificate.

The better approach is to have the form submit a request foo a new number to a web server, which returns an FDF response that includes the number. This is different from using SOAP, which does require usage rights that only LiveCycle Reader Extensions can apply.
sjfletcher
Registered: Apr 1 2011
Posts: 2
Thanks for your response George.

What is an FDF response and where can I learn more about it?

Stephen
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
You can also use XFDF. I posted a link to some documentation in this other topic: http://acrobatusers.com/forum/javascript/update-pdf-ajax