• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Dynamic Stamp asks only once per Document for information

Community Beginner ,
Jun 16, 2020 Jun 16, 2020

Copy link to clipboard

Copied

Hello all,

I'm creating some dynamic stamps in Acrobat. There are no problems with displaying dates, identities etc.

 

But now I'm trying zu create a stamp that asks the user to enter a number that shall be displayed in the stamp. This stamp works great - but only when I use it in a PDF-document for the first time. When I use it again in the same document, I can not enter another number - it automaticly displays the number I entered without asking again. No chance if I delete the first stamp either. It still remembers the number I entered before. If i use the stamp in another PDF-document, it starts again: First use: I can enter the number. If I use it again ... no chance ... *grrr*

 

I'm using this bit of code in Acrobat Pro DC (2020.009.20067), German:

 

var cAsk = "Enter number: ";

var cTitle = "xxx";

if(event.source.forReal && (event.source.stampName == "#stampname"))

{

                event.value = app.response(cAsk, cTitle);

}

 

What's my fault? Could anybody give me a hand? I'd really appreciate it!

Hannes

 

TOPICS
Acrobat SDK and JavaScript

Views

435

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
community guidelines
Community Expert ,
Jun 16, 2020 Jun 16, 2020

Copy link to clipboard

Copied

Strange. Can you share the stamp file with us?

Votes

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
community guidelines
Community Beginner ,
Jun 17, 2020 Jun 17, 2020

Copy link to clipboard

Copied

Sure. I hope this works: http://blauland.net/NumberTest.pdf

Thanks for your support!

Votes

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
community guidelines
Community Expert ,
Jun 17, 2020 Jun 17, 2020

Copy link to clipboard

Copied

Yes, it's happening to me, too. That is very strange indeed. It's as if the calculation script is not being executed at all after the first time. I haven't seen this happen before.

How did you create this stamp, exactly?

Votes

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
community guidelines
Community Beginner ,
Jun 17, 2020 Jun 17, 2020

Copy link to clipboard

Copied

Thank you for this question. It made me think again.I tried it once again now (100th time) - but now different. And it works!

 

Normaly I change the name of the stamp by deleting the page-template ("#sdfsd7f6fdzfgwefd..." ) of it and enter a new name in the "manage pages section" (sorry - german version, i don't know the correct phrase). When I check the name of the stamp afterwards (place stamp in a dokument, select it and run "this.selectedAnnots[0].AP" it shows the new name). So I thought that really works.

 

Now I did not change the name of the stamp and used the cryptic one the system generated. And ... it works.

So I guess changing the name was the problem. Maybe I didn't do it properly. It was a method I found in the community. When I created stamps with dates and idetitys it worked this way.

 

If I find out more about the problem I'll post it here. I'll do some more tests. But for now my problem is saved. Hallelujah ...

 

Thanks again for your support!

Votes

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
community guidelines
Community Expert ,
Jun 17, 2020 Jun 17, 2020

Copy link to clipboard

Copied

LATEST

Yes, I suspected that might be the issue. It's better to stick with the "cryptic" one, just in case.

Votes

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
community guidelines