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

How could I access another field in dynamic stamp by event.source?

kendrew
Registered: Oct 27 2006
Posts: 29

In the article "Dynamic stamp secrets", there are samples about the dynamic stamp's property like event.source.forReal, event.source.source, event.source.source.info, event.source.stampName, etc.; Since I can not find the documents about event.source's property/method, if I want to change another field's value in calculation while stamping, how can I access?
Like
event.source.getField("fieldName").value = "ABC";?

My Product Information:
Acrobat Pro 8.0999999999999996447286321199499070644378662109375, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
None of these "event.source" properties in the Stamp Event are documented. That's why the article was called "Stamp Secrets". But I had actually planned on saying that in the article. It looks like I missed that one.

Anyway, since these properties are undocumented they're only known to work in the Acrobat versions that are already out, back to Acrobat 6. This could change in future versions, but rarely does. There are undocumented properties back to Acrobat 4 that haven't changed.

From a stamp script. If you want to change the value of a field on the stamp file you use "this" as the doc object pointer.

this.getField("...");

If you want to modify a field on the document being stamped you use "event.source.source" as the doc object pointer.

event.source.source.getField("...");

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script