My grammar checker keeps telling me that having the word “dynamic” twice in a row is a mistake. I assure you, it’s not. Dynamic stamps can be dynamic.
The trick involves modifying the properties object of the annotation… sort of.
annot = this.getAnnots(); props = annot.getProps(); delete props.APCosObj; annot.setProps(props);
The code above assumes the annotation we want to update is the first one on the first page. Download my example file to try it out.
Now… I think I know the first question that’s going to get asked in the comments. It goes something like this…
“I have a dynamic stamp that uses a dialog to capture the user input. If I do this, will the data that’s in the stamp populate the dialog and let the user modify fields that they stamped earlier?”
No… at least not with just those 4 lines of code.
However… I have developed a technique that will allow that kind of functionality. If you’re looking for dynamic, dynamic stamps where you can refresh previously stamped data, contact me and we can discuss your project.