Are you trying to use this stamp with the free Adobe Reader? If so, you cannot write to document properties (via the Info object). See here for more information: https://help.adobe.com/en_US/acrobat/acrobat_dc_sdk/2015/HTMLHelp/index.html#t=Acro12_Mast erBook%2FJS_API_AcroJS%2FDoc_properties.htm%23TOC_info1bc-21&rhtocid=_6_1_8_23_0_20
What is the version on of Acrobat/Reader on the user's PC?
If it is 7.0 or greater, then you you need to use the privileged context.
What is the script that is running in the stamp?
The script is:
var cAsk = "Enter Number" ;
var cTitle = "Balloon Number: ";
if(event.source.forReal && (event.source.stampName == "#Balloon"))
var cMsg = app.response(cAsk, cTitle);
event.value = cMsg;
event.source.source.info.exhibit = cMsg;
Yes, we're using the free Adobe Reader DC. I'm beginning to see that things have changed a bit since the book was published...
Actually, this is not a new restriction. It's been a while since I worked through the book, but I am pretty confident that Thom does talk about this restriction.
1 person found this helpful
If you're only interested in the stamp, and not in saving the user's input into the file's metadata, just remove that line from the code.
If you are using the stamp in Acrobat Reader, then saving stamp data into the document is a problem. There are some possible replacements, but it all depends on your objective.
Is it important to save the data on a per document basis? or could it be saved globally? Does data need to persist across Acrobat sessions? You might want to re-read the Chapter 8 section "Data Storage and Persistence"
Ah Ha!! That is my issue - I did not realize that this script was saving the input locally for potential re-use later (as in an auto-incrementing balloon number). I should know better than to just copy code without thoroughly understanding it.
Try67, thanks for your insight, and Thom, thanks for the insight and your great book. I haven't gotten to Chapter 8 because I thought I didn't need to worry about more complicated programming. I guess I did, so I could create simpler programming...
Thanks to everyone who replied - this sure is a responsive and thoughtful community!