You cannot pass parameters to the execMenuItem function, so cannot control what the resulting dialog boxes do.
is there a work around.??
What i want to achieve is basically , we have Registration section, Once the user has registered successfully then , we get a unique value . I need to save this unique value in pdf form, so that next time the user opens the pdf, he can directly go ahead no need for registration.
Hence for this i was trying to auto - save.
i did try the execMenuitem("Save"), its not working. it doesnot save the values entered, in a text field
Also if u can think of any other way for the requirements to work , i would appreicate it
thanks a lot
Auto saving without a prompt would be considered a security hole, I think, and fixed pretty quick.
[ moved to the scripting forum ]
Please describe how you're obtaining the 'unique value' - is it calculated locally or retrieved from a server via XFDF?
You will have to have a special script file installed on each user's system in one of the Acrobat's/Reader's application folder.
its retrieved from the service through web seervice call, i am fetching it in a text field, which will be hidden
thanks for the suggestion, but this solutions is not feasible for our system.The users are to download the pdf and use it
Retrieved how? XFDF or SOAP? (If you're using SOAP it won't work in Reader without usage rights from LiveCycle ES3 Server Extensions).
Either way your file will be dirtied by the change to the form field, so saving it will be possible provided the document has been Reader-extended (by doing so in Acrobat you are of course imposing the 500-response limit of the Acrobat license). If the file isn't Reader-extended then nothing you do with scripts will let Reader users save the data, that's the point of having usage rights.
i am using soap. We have the extension thats not a problem.
what would you suggest to to save the unique value in the form, so that next time user doesnt need to register.
If you write the Net.SOAP.response value into a read-only form field and your form has save rights, the field value will be retained when it's saved. Your script can check the field for a value when the PDF loads, so it knows if it's been previously-registered. Normally you wouldn't want the form field hidden, as the user wants to see something has happened in response to their submission (plus it'll survive printing and flattening).
You cannot force a remote user to save to a particular location or filename, so the usual workflow is to show them some sort of prompt (e.g. via an alert box) that tells them to save a copy - for example "Your registration has been accepted, please save a copy of this file on your desktop for future reference". By writing to the form you will dirty the document so they'll be prompted to save on close, but as the document author you have no say about where they put it. If the file was originally opened from a read-only location such as a CD the save prompt will direct them to pick someplace else.