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

Custom Text Field in a Dymanic Stamp

New Here ,
Aug 26, 2010 Aug 26, 2010

Copy link to clipboard

Copied

Im creating a new dymanic custom stamp, but instead of the date/time, when inserted, I need to then manually enter text into the dymanic text field.

How do I change the script in the dymanic feild of the stamp to do that?

Thanks

BrianV

Acrobat 8.0 Pro

Win XP Pro

Views

68.9K

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
New Here ,
Dec 22, 2016 Dec 22, 2016

Copy link to clipboard

Copied

Thanks very much it works perfectly.

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
New Here ,
Jan 02, 2017 Jan 02, 2017

Copy link to clipboard

Copied

I am running the below code but nothing happens when I place the stamp? any thoughts why?

var cAsk = "Enter Order Number" ;

if(event.source.forReal && (event.source.stampName == "13SSPjT6lc3sg3x84aYTvD"))

{

  var cMsg = app.response(cAsk);

  event.value = cMsg;

  event.source.source.info.exhibit = cMsg;

}

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
LEGEND ,
Jan 02, 2017 Jan 02, 2017

Copy link to clipboard

Copied

In order for that to work, the actual stamp name has to match what the script is expecting (13SSPjT6lc3sg3x84aYTvD). Have you confirmed that it's correct?

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
New Here ,
Jan 02, 2017 Jan 02, 2017

Copy link to clipboard

Copied

No sorry I am learning that this number is very difficult to find with adobe DC standard. Any suggestions?

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
LEGEND ,
Jan 02, 2017 Jan 02, 2017

Copy link to clipboard

Copied

One thing you can do is add a temporary button to one of the pages of the stamp file and add the following script to the Mouse Up event of the button:

var aTemplates = this.templates;

if (aTemplates) app.alert(aTemplates.join("\r"));

WHen you click the button, you should see at least one template name displayed, which will include the stamp name (the portion before the = character.) If more than one is shown you will have to figure out which one to use.

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 ,
Jan 03, 2017 Jan 03, 2017

Copy link to clipboard

Copied

This article presents a different method to get the stamp name (and there is never any question about which one is the correct one if you have multiple stamps): https://acrobatusers.com/tutorials/print/dynamic_stamp_secrets - scroll down to the section titled "The Stamp Name"

Just in case you are not aware of this, what you are tying to do will not work with the free Adobe Reader: You can only create/update custom properties in the "info" object with Adobe Acrobat Standard or Pro.

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
New Here ,
Jan 03, 2017 Jan 03, 2017

Copy link to clipboard

Copied

That worked great. Thanks.

Mitch Hansen

[ Moderator: Personal information removed ]

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
Guest
Mar 13, 2017 Mar 13, 2017

Copy link to clipboard

Copied

Hi all,

I've been reading through this thread and all of this information has been very helpful. I've been able to add fields to my stamp, and even add hidden fields which will allow users to answer "Yes" to a question which will then automatically check a check box on the the stamp.

The problem is, when I try and add a stamp to an existing document, these dialog boxes will come up when I hover over "Dynamic" and won't allow me to select a stamp. I've tried adding this following code, but when I do the dialog boxes never appear:

if(event.source.forReal &&

  (event.source.stampName == "# _j0JCYhcAFQeflSUnRhoPA"))

I've verified that the stamp name is correct. This is my current code (modified slightly for different boxes):

var cAsk = "Enter the Submission#:";

{

var cMsg = app.response(cAsk);

event.value = cMsg;

}

Since it looks like this thread is relatively active, I wanted to know if anyone had a suggestion. I'm using Acrobat X Standard v 10 if that matters.

Thanks,

John

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 ,
Mar 13, 2017 Mar 13, 2017

Copy link to clipboard

Copied

How did you verify the stamp name?

On Mon, Mar 13, 2017 at 6:15 PM, johnc3927701 <forums_noreply@adobe.com>

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
Guest
Mar 13, 2017 Mar 13, 2017

Copy link to clipboard

Copied

Originally I went by the file name, but some more googling has revealed the stamp file name and the stamp name the script is looking for will not be the same.

What is the best way to check the stamp name?

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 ,
Mar 13, 2017 Mar 13, 2017

Copy link to clipboard

Copied

One thing you can do is output the stamp name to the console just before you test for the stamp name:

console.println("Stamp name is " + event.source.stampName);

Alternatively, you can select the stamp, and then execute the following code in the console

this.selectedAnnots[0].AP

You will find the last method here as well (plus a ton of other valuable information): https://acrobatusers.com/tutorials/print/dynamic_stamp_secrets

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
Guest
Mar 13, 2017 Mar 13, 2017

Copy link to clipboard

Copied

Perfect, thanks for your help I'm all set.

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
New Here ,
Jun 06, 2018 Jun 06, 2018

Copy link to clipboard

Copied

Hi there,

I allow myself to come back to this thread because I have an issue.


I have managed to create the stamp and include the script and it works.

But, whenever I open a new pdf and want to use a stamp, it does show the box, like if I had chosen the stamp but I did not : the stamp box is showing up as soon as I click on stamp without even selecting it.

Did it happen to anyone ?

Thanks for your help !

Regards,

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 06, 2018 Jun 06, 2018

Copy link to clipboard

Copied

Post the full code you're using in the stamp, please.

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
New Here ,
Jun 06, 2018 Jun 06, 2018

Copy link to clipboard

Copied

Hi,


Thanks for your reply.

Here it is:

var cResponse = app.response({

cQuestion: "Entrer la date à indiquer",

cTitle: "Date",

cLabel: "Date:"

});

if (cResponse == null) {

event.value = "*NVALID*";

}

else

event.value = cResponse;

Thanks you,

var cResponse = app.response({

cQuestion: "Entrer la date à indiquer",

cTitle: "Date",

cLabel: "Date:"

});

if (cResponse == null) {

event.value = "*NVALID*";

}

else

event.value = cResponse;

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 06, 2018 Jun 06, 2018

Copy link to clipboard

Copied

To prevent it from happening you have to include this if-condition around your code:

if (event.source && event.source.forReal && event.source.stampName == "INSERT STAMP AP VALUE HERE") {

// rest of code goes here

}

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
New Here ,
Jun 07, 2018 Jun 07, 2018

Copy link to clipboard

Copied

Hi,


Thanks again for your quick answer.

Unfortunately, I am not sure how I can retired the AP value ?

Thanks for your help,

Regards,

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 07, 2018 Jun 07, 2018

Copy link to clipboard

Copied

Apply the stamp to a page, select it with the mouse and then run this code from the JS Console:

this.selectedAnnots[0].AP

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
New Here ,
Jun 07, 2018 Jun 07, 2018

Copy link to clipboard

Copied

Yes !!

It does seem to work indeed !

Thanks a lot for your help

Regards,

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
New Here ,
Jun 13, 2018 Jun 13, 2018

Copy link to clipboard

Copied

Hi,


I allow myself to come back because I noticed something strange.

I have managed to create one stamp through your assistance and it works.


But, when I want to create another custom stamp and when I include this new stamp in the dynamic stamps category, it does not create a new pdf stamp file but it adds the new stamp to the first one. So, I cannot use them because they become one.

The only workaround I have found is to add a new category for each new stamp I want to create. By doing so, a new PDF file is generated as soon as I create a new stamp.

Do you know if it is a known issue ? And if yes, is there a way to face it ?

Thanks a lot for your help,

Regards,

Alex

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
New Here ,
Jun 26, 2018 Jun 26, 2018

Copy link to clipboard

Copied

Hi,

Is there anyone that has the same issue ?

Thanks,

Regards,


Alex

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 26, 2018 Jun 26, 2018

Copy link to clipboard

Copied

Did you try the suggestions made above?

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
New Here ,
Jun 26, 2018 Jun 26, 2018

Copy link to clipboard

Copied

Hi,


Yes, it works fine.

But, when I want to create another custom stamp and when I include this new stamp in the dynamic stamps category, it does not create a new pdf stamp file but it adds the new stamp to the first one. So, I cannot use them because they become one.

Do you know why is it happening ?

Thanks !

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 26, 2018 Jun 26, 2018

Copy link to clipboard

Copied

That's not a problem. It's just how Acrobat sets up stamps. Why is it preventing you from using it?

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
New Here ,
Jun 26, 2018 Jun 26, 2018

Copy link to clipboard

Copied

Because the two stamps are inside one and they are not separate stamp. So, when I come to use the stamp, I have the two stamps integrated.

Thanks,

Regards,

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