Highlighted

Custom Stamp No Longer Prompting After Close

New Here ,
Sep 04, 2020

Copy link to clipboard

Copied

I built a custom stamp that worked great yesterday. After going home for the night I come in, fire up Acrobat 2017, and my stamp no longer prompts for the fields. Any ideas? Code is below. 

Thanks for all the help! 

var cApproval = "Approval?";

if (event.source.forReal && (event.source.stampName == "#APStamp"))
{
var cMsg = app.response(cApproval);
cMsg += "";
event.value = cMsg;
event.source.source.info.DocumentState = cMsg;

}

TOPICS
General troubleshooting

Views

380

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Custom Stamp No Longer Prompting After Close

New Here ,
Sep 04, 2020

Copy link to clipboard

Copied

I built a custom stamp that worked great yesterday. After going home for the night I come in, fire up Acrobat 2017, and my stamp no longer prompts for the fields. Any ideas? Code is below. 

Thanks for all the help! 

var cApproval = "Approval?";

if (event.source.forReal && (event.source.stampName == "#APStamp"))
{
var cMsg = app.response(cApproval);
cMsg += "";
event.value = cMsg;
event.source.source.info.DocumentState = cMsg;

}

TOPICS
General troubleshooting

Views

381

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Sep 04, 2020 0
Most Valuable Participant ,
Sep 04, 2020

Copy link to clipboard

Copied

Add this line to it and see what appears in the dialog when you apply it:

app.alert(event.source.stampName);

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 04, 2020 0
New Here ,
Sep 04, 2020

Copy link to clipboard

Copied

I'm not having any kind of popup or dialogue display - which I suspect is my ogrinal problem. 
"this.selectedAnnots[0].AP" returns with the correct stamp name: APStamp

 

=Addditional Question=
Could this be due to makeing the stamp a page template? 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 04, 2020 0
Most Valuable Participant ,
Sep 04, 2020

Copy link to clipboard

Copied

Where did you place that line? Where is the code located?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 04, 2020 0
New Here ,
Sep 04, 2020

Copy link to clipboard

Copied

Code is located in the same field that is populated by the dialogue. I added the code you recomended after the event.source.source.info.DocumentState. 

I recreated the stamp a minute ago following the sme process, without making it a page template. Everything worked great until I closed out Acrobat and reopened it. Stamp no longer prompts for diolague / input. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 04, 2020 0
Adobe Community Professional ,
Sep 04, 2020

Copy link to clipboard

Copied

Why a page template?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 04, 2020 0
New Here ,
Sep 04, 2020

Copy link to clipboard

Copied

In the orginal guide I found had the stamp dreated as a page template. However in recreating the stamp and not using a page template - I have not had any issues after restarting the appplication and reboothing the computer. Code is as follows: 

var cApproval = "Approval?";
	
if (event.source && event.source.forReal && (event.source.stampName == "#d2s863wySB-pVMwInGqeLD"))
{
   var cMsg = app.response(cApproval);
   cMsg += "";
   event.value = cMsg;
   event.source.source.info.DocumentState = cMsg;
   app.alert(event.source.stampName);
}

I kept the app.alert in until deploying to end users. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 04, 2020 0