Copy link to clipboard
Copied
Good day.
I have a custom stamp and I am just trying to get Adobe Acrobat to ask the user to enter characters (a string) then it display in the stamp. We call it a GL code (finance term in company)
I am very close but the only issue is Adobe Acrobat prompts the user to enter the info twice - once when selecting the stamp in the menu and again while actually using the stamp.
This is the current custom script code:
var cAsk = "Enter the GL Account (i.e. HEN.60201)";
var cMsg = app.response(cAsk);
{
event.value = cMsg;
event.value = event.value.toString().toUpperCase();
event.source.source.info.DocumentState = cMsg;
}
Anyone know what I need to add or change so it only ask the user when placing the stamp in the PDF and NOT when choosing it from the stamp menu?
Place this around your current code:
if (event.source && event.source.forReal && event.source.stampName == "STAMP_AP_VALUE") {
// rest of code goes here
}
To find out the AP value of your stamp apply it to a page, then select it and run this command from the JS Console:
this.selectedAnnots[0].AP
Copy the outputted value into the code provided above, instead of STAMP_AP_VALUE.
Copy link to clipboard
Copied
Place this around your current code:
if (event.source && event.source.forReal && event.source.stampName == "STAMP_AP_VALUE") {
// rest of code goes here
}
To find out the AP value of your stamp apply it to a page, then select it and run this command from the JS Console:
this.selectedAnnots[0].AP
Copy the outputted value into the code provided above, instead of STAMP_AP_VALUE.