Dynamic stamp secrets

Learn how to create a custom dynamic stamp using Adobe JavaScript.

By May 30, 2013

 

So you’ve finally figured out how to create a custom dynamic stamp for Acrobat.  But after all that hard work, what seemed like days of slogging through molasses, it still doesn’t do what it’s supposed to and your boss is getting impatient.  There are three things yet to be done.  The stamp needs to display the file-name of the document on which it is being placed, it needs to ask the user for some state information (i.e., approved, rejected, and so on), and it needs to write this information and a date into the document metadata.  This is crazy! Documentation on dynamic stamps is already hard enough to come by.  But there’s nothing anywhere about how to do these tasks (There is now, see the link to www.pdfscripting.com at the bottom of the page).  Take heart! There is a solution. 

Building a dynamic stamp

Before getting into the advanced details, let’s review some dynamic stamp basics (full dynamic stamp tutorial).  A dynamic stamp is created by adding form fields to an existing PDF Stamp, in a Stamp File.  It doesn’t count if the fields are added to the original PDF that is turned into a stamp.  Those fields are flattened out when the new stamp is added to a Stamp File.  The fields have to be added after the custom stamp is created.

A Stamp File is a regular PDF in which Acrobat has added some special information. The stamps are the pages in the Stamp File. Acrobat creates a new Stamp File when you create a new Stamp Category. Let me repeat that in a different way. All the stamps in a Stamp Category are placed in the same Stamp File, Figure 1.

Figure 1 — Creating a Category creates a new Stamp File

The trick to creating a dynamic stamp is to first locate the Stamp File that contains your custom stamp. Fortunately, all the Stamp Files are contained within two folders, a "user" folder and an "app" folder. Acrobat keeps its own built-in stamps in the "app" folder.  Your custom stamp will be located in the "user" folder. You can find the locations of these folders by executing the following lines of code in the JavaScript Console:

    app.getPath ("app", "stamps");
    app.getPath ("user", "stamps");

The results are shown below in Figure 2.

Figure 2 — Locating the Acrobat Stamp Folders
Unfortunately, when Acrobat creates the Stamp File, it gives it a cryptic looking name.  You cannot know from the file name, which Stamp File contains your stamp. But remember, a Stamp File is a PDF, so you can open each one of the Stamp Files in the user stamp folder to find the stamp you want to make dynamic. Once you find the Stamp File, rename it so you'll know what it is the next time you need to make a dynamic stamp. Acrobat does not care about the name, you can make it anything you want.

To make the stamp dynamic you add form fields to it. At least one of the added form fields must have a calculation script.  Acrobat runs the stamp calculation script every time it accesses the Stamp File. This means the script is run when Acrobat first opens the Stamp File, when the stamp is displayed on the Stamp Menu, and when any stamp in the Stamp File is placed on a PDF. None of the other document or field scripts are useful. You must use the Field Calculation Script, and only the Field Calculation Script.

This calculation script runs in the context of the Stamp File, i.e., the this keyword is the Doc Object of the Stamp File.  To demonstrate, place the following line of code in the calculation script for a field on your dynamic stamp. 
      event.value = this.documentFileName;
When you place the stamp on a PDF, it will display the name of the Stamp File, not the name of the file on which the stamp is placed.

Limitations

There is only one serious limitation to a dynamic stamp script.  Stamp Files do not execute JavaScript like a normal PDF file.  For example, there are no document or page events.  Variables and functions cannot be defined in a document script.   The only scripts guaranteed to execute are the calculation scripts of the fields placed on the stamp.  Everything necessary to execute this script must be present in the script.

Another, less important limitation is that the event.rc value is meaningless in a dynamic stamp calculation script.   It doesn’t block the field from acquiring the assigned value as it would in a normal calculation script.

Privileges

Acrobat grants dynamic stamp scripts a small amount of privilege.  They are able to access the identity object, which is normally off limits to scripts in a PDF.  The identity object contains the same user information listed in the Identity panel in the Acrobat Preferences.  However, dynamic stamp scripts are not fully privileged, so they cannot use other secure Acrobat properties and functions, i.e., anything in the Acrobat JavaScript Reference marked with a red (S) in the Rights Bar is off limited, except for the Identity object.

Figure 3 — Identity Object Entry from the Acrobat JavaScript Reference

Dynamic scripts can call functions defined in a Folder level script, so if you need some privileged code for your stamp, you can always place it in an external script file. 

The secrets

Now, down to business.  In the introduction, our intrepid PDF developer was directed to accomplish three seemingly impossible dynamic stamp features.

  1. Display the name of the file (onto which the stamp is being placed) onto the stamp.
  2. Ask the user to choose some document state text to display on the stamp.
    (Approved, Rejected or In Process)
  3. Write the document state info and a date into the document metadata.

Features 1 and 3 require access to the document being stamped.  We can’t use the this keyword because the dynamic stamp script is in the context of the Stamp File and we can’t use the app.activeDocs property because a document has to be disclosed before it shows up on the list.  There are some other possible coding solutions, but they are all awkward and pose problems with version compatibility.
This issue seems impossible, but fortunately Acrobat JavaScript provides us with a solution. For dynamic stamp scripts, the event.source property is an object containing several useful parameters, one of which is the Doc Object for the PDF being stamped,  event.source.source. Use the following code to get the file name for the  PDF on which the stamp is being placed:

event.value = event.source.source.documentFileName;

To write a value into the document’s metadata, use this code

var cDate = util.printd("mm/dd/yyyy", new Date());
event.source.source.info.StampInfo = "Rejected:" + cDate;

That takes care of two issues, 1 and 3. For feature 2 we can use app.response() to ask the user for a simple string. But there is a problem. We want this popup to appear only when the user places the stamp on the PDF. But as discussed previously, the calculate script is called in several different situations. We can't have the app.response() dialog popping up at odd times. So, how does the stamp script know when our particular stamp is being placed on the document

Again, event.source comes to the rescue. In this case, we use the event.source.forReal and event.source.stampName properties. The forReal property is true when any stamp in the Stamp File is being placed on the document and false at all other times. This property narrows things down, but we need one more property to uniquely identify the situation when our particular stamp is being placed. The stampName property identifies the stamp in current use. Both of these properties must be used together to qualify stamp code that performs any kind of blocking operation, such as displaying a popup dialog.

The Stamp Name

So what is the name of our stamp? If you look back at Figure 1, you might think that the name you entered into the "Create Custom Stamp" dialog is the stamp name. But this would be incorrect. The name you gave the stamp is just a label. Acrobat gives the stamp a unique internal name you don't see. This name is a string of very cryptic looking letters and numbers and it is always prefixed with a "#" symbol.  This is the name you need for your stamp script. But how do you find it?
There are several ways to get the real name of your stamp, but here is the easiest.

  1. Place your stamp onto a PDF file. It doesn't matter which file, this is just a dummy placement so you can get some information. You can delete it later.
  2. Select the stamp with the cursor.
  3. Open the console window and run the following code (Figure 4)
this.selectedAnnots[0].AP

This code displays the internal name of the dynamic stamp in the JavaScript Console, as shown in Figure 4.

Figure 4 — Acquiring the real name of the stamp

You can now use this name to qualify any stamp code that needs to be protected from running at odd times by using the following "if" statement. Of course you'll need to change the stamp name to match your stamp.

if( event.source.forReal &&
   (event.source.stampName == "#yCY1HRSQtWDRvKLBcmfDcA""))
{
   event.value = app.response();
}

The sample file linked below also shows another way you can acquire the stamp name, by displaying it on the stamp using the stamp script.

Putting it all together

Let’s lay out the code our intrepid developer has created for his stamp.  The stamp needs two fields:  one on which to place PDF file name and one on which to place the user entered value.

Calculation (Dynamic) Script for Document Name Field

event.value = event.source.source.documentFileName;

Calculation (Dynamic) Script for User Data Field
(this is also the same script that will set metadata)

var cAsk = "Enter One of: Approved, Rejected, or In Process";
var cTitle = "Document State For Stamp";
	
if(event.source.forReal &&
   (event.source.stampName == "#UdzyXagRctZoS5p43TZ43C"))
{
   var cMsg = app.response(cAsk, cTitle);
   cMsg += " : " + util.printd("mm/dd/yyyy", new Date());
   event.value = cMsg;
   event.source.source.info.DocumentState = cMsg;
}

That’s all there is to it.  Here’s what the stamp and popup response box look like.

Figure 5 — User input response box and resulting stamp

Yet Another Stamp Secret

All code presented here is in the example Stamp File, StampSecrets_Sample.pdf, which will operate on Acrobat 7 or later. You heard that right. Stamps have not changed significantly in a very long time. The only reason the sample won't work in early versions is because of changes to the JavaScript model, not stamps. And to make things even better, Reader XI will apply dynamic stamps to any PDF document, without any special Reader Rights enabling. If you don't know about Reader Rights, then don't worry about it. The important bit is that you can use your dynamic Stamp Files with Adobe Reader XI to stamp any PDF file.

To use these stamps, place the sample file linked above into one of Acrobat’s stamp folders.  Then close and restart Acrobat/Reader. “Secrets Examples” should now be visible in your Stamps menu.
Good Stamping!

For complete information on using and creating Acrobat and PDF stamps in document workflows (for both managers and users), and  to learn all about stamp scripting from entry level to advanced automation, see The Stamp Book:


Was this tutorial helpful?

Please Log in to provide feedback on this tutorial.

Rate this tutorial

Please Log in to rate this tutorial.

Rating:

Did you know?

  • You can ask a question and get an answer from one of our experts.
  • You can search our database of over 800 tutorials by product and/or topic.
  • You can leave a comment below for the author of this tutorial.

Products covered:

Acrobat XI Pro

Related topics:

JavaScript

Top Searches:

Edit PDF, Create PDF, Interactive PDF, Action Wizard


43 comments

Lori Kassuba

3 weeks ago

Hi jaime,

Try right-clicking on the stamp tool and checking “Keep Tool Selected”.

Thanks,
Lori

Lori Kassuba

3 weeks ago

Hi Sheri,

Make sure everyone is using the latest point update for Acrobat (11.0.7 at this point). There was an issue in earlier versions of Acrobat 11, where comments were not appearing when the author’s identity includes an ampersand or double-quotes.

Thanks,
Lori

jaime

3 weeks ago

We use the check mark stamp multiple times on a document.  Is there a way to keep that check mark stamp active so that you are not having to go back and keep selecting it after you stamp each time?  I pinned the check mark to my favorites but after you stamp each time, you have to select the check mark over and over.

Sheri

3 weeks ago

We use dynamic stamps and for some reason we have a few users who, when they add a stamp and then publish the pdf, others do not see the stamp, and if the user goes back into the PDF s/he does not see the stamp either. Is this a configuration setting issue?

Lori Kassuba

1 month ago

Hi David B,

Acrobat uses native sizing parameters such a resolution. Try reducing the resolution prior to importing into Acrobat.

Thanks,
Lori

Lori Kassuba

1 month ago

Hi Jacqueline,

You would need to create a custom dialog, which is very complex to create. You can find out more information about them here:
http://acrobatusers.com/tutorials/popup_windows_part5

Thanks,
Lori

David B

1 month ago

I am just trying to create a custom stamp but it comes out very large , how do I make a jpeg stamp that has a smaller size ?

Jacqueline

1 month ago

This was a fantastic tutorial and I have absolutely no scripting or programming experience!

Due to my lack of knowledge, I have a question. How do you get a drop down field to perform similarly? I’ve looked all over the web and can’t seem to find an example script simple enough for my inexperienced mind to understand so I can manipulate it to have the text I want. Any suggestion would be much appreciated.
Thanks much!

Thom Parker

1 month ago

Tim - Try using the instructions directly under figure 1 above, for finding the stamp folders

Lori Kassuba

1 month ago

Hi Tim Fischer,

Have you tried:
/Users/[USERNAME]/Library/Application Support/Adobe/Acrobat/11.0/Stamps

The Users folder may be hidden in your OS version.

Thanks,
Lori

Tim Fischer

1 month ago

I am using Acrobat XI Pro and OS X 10.9.3.  Just can’t seem to locate the Stamp Folder on my computer.  Any suggestions?

Thom Parker

3, 2014-05-06 06, 2014

Swapna, there is no alternative to getField() for acquiring a field object from a script at the document level.  Unless of course the PDF is really an XFA form. Then you’d use the XFA JavaScript model.

Swapna

1, 2014-04-30 30, 2014

I want to know if there is any alternative to this.getfield(“Fieldname”); in document level script

Tom

3, 2014-04-24 24, 2014

Lori,

Thank you for the tip. It is so easy I’m embarrassed.

Lori Kassuba

1, 2014-04-21 21, 2014

Hi Jeremy,

Thom posted this information about incremental numbering in a stamp in an earlier comment - here it is for your reference:


“Incrementing a stamp value is not as simple as you might initially think because it requires the ability to store the value being incremented. Because of the way dynamic stamps work, you cannot reliably store this data on the stamp itself.

I have a few incrementting stamp samples, as well as instructions on how to create one here:
http://www.pdfscripting.com/public/department53.cfm

You’ll see that there is also a book on stamps advertised on this web page. It includes detailed instructions on how to create a self incrementing stamp.

I also believe that Rick Borstein has an incrementing exhibit stamp here, which you could use as an example:
http://blogs.adobe.com/acrolaw/?s=exhibit+stamp&submit;=”

Thanks,
Lori

Jeremy

6, 2014-04-16 16, 2014

I’m trying to create a stamp that will increment numbers across multiple files. I know you can write the custom metadata to the stamped document using the event.source.source code. I tried to write the metadata to the stamp file itself using this.info, but it will only do so when I have the stamp file open and save it.

Is there a way to save metadata directly to the stamp file, and then call it back when you open a new file to use in the new stamp? Thanks.

Thom Parker

12, 2013-11-11 11, 2013

Nothing has changed with Acrobat JavaScript for Dynamic stamps in many years. It is likely that something has changed on your system. For example, if you used the “manage stamps” option on the file containing your stamp, then Acrobat may have flattened out the dynamic stamp fields. Essentially converting it to a static stamp.

To find out for sure, open the stamp file in Acrobat and check to make sure the dynamic stamp field and the script are still there.

cees van kollenburg

10, 2013-11-08 08, 2013

I try to limit my stamp to “dd mmm yyyy” in the ‘Calculate’ field. Until a few days this worked perfectly. Today I get a datestamp as FRI NOV 08 2013 16:14:10 GMT+0100(CET).
It doesn’t react on changes in the ‘Calculate’ field.
Is something changed in Javascript? Or how can I get back my limited day stamp?

Thom Parker

1, 2013-10-23 23, 2013

Amanda, There are several possible reasons for why the stamp script is not performing correctly. So the first thing you need to do is to verify that the script is in fact running. And second, you need to verify that you have the correct stamp name. To do both of these, place this code at the top of your script.

console.println(“Stamp: ” + event.source.stampName);

Restart Acrobat, open a PDF, open the console window, and then place your stamp. If you do not see a message in the console window you know the script is not running at all. If you do see a message, it will display the correct stamp name.

Amanda B

12, 2013-10-23 23, 2013

I am trying to create a stamp with multiple interacive fields.  One of our departments needs to stamp a PDF indicating borrower information (name, loan # & Loan Rep).  I am trying to copy your example above (with modification) and it is not giving me the pop up as in your example.  Any ideas?

var cAsk = “Enter Borrower Name”;
var cTitle = “Document State For Stamp”;

if(event.source.forReal &&
  (event.source.stampName == “#26XJoZshKavEXIp3ZOELrA”))
{
  var cMsg = app.response(cAsk, cTitle);
  cMsg += ” : ” + util.printd(“mm/dd/yyyy”, new Date());
  event.value = cMsg;
  event.source.source.info.DocumentState = cMsg;
}

Thom Parker

1, 2013-08-20 20, 2013

Muhammad,
  Thank you very much for your comment. You have hit on several common points of misunderstanding with dynamic stamps. First, all PDF stamps are actually static. They are just pictures. When Acrobat places a stamp on a PDF if flattens out all the content. The dynamic bit is a special Acrobat feature that is only active in a small window.  Just after the user clicks to place the stamp, and before that stamp is actually placed, Acrobat runs scripts on the stamp that fill out the form fields on the stamp. That small window is the only time those fields can be used.

So you see, the user cannot interact with the fields on the stamp. Only the stamp scripts can change those fields. So it makes no sense to put a signature field on the stamp. And if you want to use radio buttons or check boxes, you need some way for the stamp script to change them. This Article shows how you can use a popup “Response” box to set a custom, user entered value into a stamp. You can use an extension of this same technique to set a value in a check box or radio button. You’ll find a simple example of this in the appendix of the Stamp Book linked above.

Muhammad Ataya

10, 2013-08-05 05, 2013

Lori,

Thank you for that, fortunately, that is exactly where I am saving it (the first file path you mentioned). It is not working. Here is what I did in a nutshell:

1. Added the stamp in as a dynamic custom stamp in Adobe.
2. Exited Adobe, navigated to the file path you mentioned.
3. Renamed the file to a recognizable file name
4. Opened the file, added 5 check boxes (hit save)
5. Added a signature field (hit save)
6. Added a Text box for date (hit save)
7. Added another text box with the script you mentioned (I right-clicked the text box, wehn to properties, hit the calculation tab, and then added that line of code) so that it pulled in the name of the file (hit save).
8. Close out of Adobe
9. Reopen a file and try to drop the stamp in. It comes in with the radio boxes un-checkable, the signature field isn’t recognized and neither is the text field, and the name of the file shows up in the “calculation” text box.

Lori Kassuba

12, 2013-08-02 02, 2013

Hi David and Muhammad,

To keep the dynamic nature of the stamp, it’s critical that you place the stamp in one of two locations. The first requires admin access because you’re placing the stamp in the program directory:

C:/Users/[username]/AppData/Roaming/Adobe/Acrobat/11.0/Stamps
C:/Program Files/Adobe/Acrobat 11.0/Acrobat/plug-ins/Annotations/Stamps/ENU/Dynamic.pdf

Next, restart Acrobat.

Thanks,
Lori

Thom Parker

5, 2013-08-01 01, 2013

Muhammad and David,
  There are a number of issues that could be causing the stamp script to fail. An incorrect stamp name is one of those. There might also be an error in the stamp script, so please check the console window. 

However, this is not the proper forum for a protracted discussion. Please post you questions on the regular forum..

David Linford

9, 2013-07-31 31, 2013

I have the same “read only” problem that Muhammad Ataya is having.  But when I save it elsewhere and then copy it back into the Stamps folder the stampname value changes.  And none of my scripts run, I think because the stamp name is not correct.

Muhammad Ataya

11, 2013-07-31 31, 2013

Thom and Lori,

Thanks for the advice! It worked to allow me to save. But the stamp still is not dynamic when I insert in into a pdf. The stamp is pretty simple, I added a few checkboxes, a signature field, and a text box for the date. I think where I am not doing something right is with the calculation field. Right now, I’ve got a text field with the calculation mentioned in this guide (to show the title of the file). But when I put the stamp into a pdf, those fields are just static they are not dynamic.

Thom Parker

11, 2013-07-30 30, 2013

Muhammad, Acrobat will not allow you to directly modify stamp files in the application stamp folder. If you are trying to edit one of these files then you’ll need to save it to a temporary location, quite Acrobat , and then copy the modified stamp file back into the application stamp folder. There are also sometimes issues with the user stamp folder where you will need to follow the same procedure, but this is much more rare.

Muhammad Ataya

10, 2013-07-30 30, 2013

Lori,

I got it to work with the save issue after getting your response! Thanks so much for that. Unfortunately, the stamp is still not dynamic when i put it in. Its simple, I have a few check boxes, a digital signature, and a text box for date. I used the “calculation” formula you mentioned in another text box as well. But it isn’t working. I suspect it has to do with that calculation formula. Maybe I’m not putting it in the right place? The formula itself is working, it brings in the name of that stamp file. But if it is supposed to act as a trigger for the form fields, it isn’t doing that.

Lori Kassuba

10, 2013-07-30 30, 2013

Hi Muhammad Ataya,

This sounds like a system permission problem. You’ll need to confirm you have permission to update the stamp file especially if it’s located in the program directly.

Thanks,
Lori

Muhammad Ataya

7, 2013-07-25 25, 2013

I follow all the steps, but once I open the file to add dynamic field, and I try to save it, it tells me that the document cannot be saved because it is a read only. Wants me to change the name or put it in a different folder.

Tom

12, 2013-07-08 08, 2013

Thom,
You instructions on creating a stamp were a breeze. But no that I have created and placed my new Dynamic stamp, I can’t get it to print. Any suggestions? (PS - I also can’t print highlights.) Thx for your assistance.

Hi Tom,

In the Acrobat print dialog, on the right-hand side, make sure you have “Document and Markup” selected from the Comments & Forms dropdown.

Thanks,
Lori

Thom Parker

11, 2013-06-26 26, 2013

Colin, 
  A stamp is simply an image. It does not contain any fields. Stamps are a convenient (and only) way to apply a custom image annotation to a PDF. You place form fields onto a dynamic stamp in order to dynamically change the image at the time it is placed. But these fields are flattened (to create the static image) when the stamp is placed.

There are other reasons why it does not make sense to put a digital signature field on a stamp, but this is the main one. You may want to consider using a Wet Signature instead.

Colin

3, 2013-06-25 25, 2013

Is there a way to preserve a digital signature field that is placed into the stamp file? I have the need to obtain three signatures from three different parties with their printed initials and date inside the QA stamp. Managed to do this successfully with some javascript on a pdf file but when used as a stamp then these fields are wiped clean. Thanks.

Thom Parker

12, 2013-06-14 14, 2013

Tamya, there are many things that can go wrong with creating a dynamic stamp. It’s a complex and not always obvious process, and this is not the correct place to cover the details. Please ask your question on the forum. And provides some specific details about your process.

Tamya Jones

1, 2013-06-11 11, 2013

I created a Dynamic stamp with a script to update the date/time each time you use the stamp.  But, this does not happen.  The only way I can get the stamp to work is to edit it each time right before I use it.  I’m new to Adobe and now nothing about JavaScript.  Any suggestions to help?

Thom Parker

1, 2013-05-27 27, 2013

Incrementing a stamp value is not as simple as you might initially think because it requires the ability to store the value being incremented. Because of the way dynamic stamps work, you cannot reliably store this data on the stamp itself.

I have a few incrementting stamp samples, as well as instructions on how to create one here:
http://www.pdfscripting.com/public/department53.cfm

You’ll see that there is also a book on stamps advertised on this web page. It includes detailed instructions on how to create a self incrementing stamp.

I also believe that Rick Borstein has an incrementing exhibit stamp here, which you could use as an example:
http://blogs.adobe.com/acrolaw/?s=exhibit+stamp&submit;=

Cam McC

1, 2013-05-27 27, 2013

I’ve used this tutorial in the past and it worked great, but this time around I’m having trouble -
When I try to obtain my stamp name with:
event.value = event.source.stampName;
console.println(“Stamp Name: ” + event.source.stampName);
I only get:
TypeError: event.source is null
Any ideas?

Jason

4, 2013-05-26 26, 2013

Thom,
Thanks for your very instructional videos and explanations on javascript and dynamic stamps. I’m at the point of progress where i have added the stamp, opened the file, added the text form field and copied: var i = 1; into the custom calculations edit area. The only action i need from this stamp is to increment numerically when i place the stamp and It doesn’t seem to be working. When I place the stamp there isn’t a number in the text field. please advise and thank you for your time.

Thom Parker

2, 2013-05-15 15, 2013

Louis, the answer is simple. In JavaScript code, the opening and closing Parenthesis must be matched. The error you are seeing is being caused by a missing “Closing” parenthesis. Look through your code and make sure each opening “(” is matched with a “)” in the correct location.

louis

4, 2013-05-10 10, 2013

I am getting this syntax message when editing the script of my dynamic stamp in attempt to prompt user added data: “SyntaxError: missing )- in compound statement 6: at line 7” can you help me with this?

Lori Kassuba

9, 2013-04-15 15, 2013

Hi Javier,

You can create custom dynamic stamps in Acrobat 9, X and XI. Here is an updated tutorial on the subject:
http://acrobatusers.com/tutorials/creating-a-custom-dynamic-stamp-infographic

Thanks,
Lori

Thom Parker

2, 2013-04-13 13, 2013

Javier, You can do this on any version of Acrobat. Post the specific issue on the forum

Javier

6, 2013-04-09 09, 2013

I have tried doing this in Acrobat 9 and X.  Are creating these dynamic stamps disabled in these versions?

Thom Parker

11, 2013-03-05 05, 2013

Roy,
  The stamp name is part of the Template name in the stamp file. It’s not something I can explain here. However, I would suggest you create your stamp from scratch, you can give it your own name. Or learn more about stamps by purchasing the Stamp Book:
http://www.pdfscripting.com/public/All-About-PDF-Stamps-in-Acrobat-and-Paperless-Workflows-The-Book.cfm

Or becoming a member at www.pdfscripting.com

Roy

4, 2013-03-01 01, 2013

Thom,
I need your assistance, I was able to modify your example of the dynamic stamp secrets file, but I’not able to change the name of the stamp, the stamp reads “Example3”. How can I achieve this?

Thom Parker

11, 2012-10-01 01, 2012

Susan, what you are asking about is how to manipulate strings in JavaScript.  Here is an article on the topic, it includes and example of removing the extension from a file name:
http://acrobatusers.com/tutorials/splitting-and-rebuilding-strings

Susan

6, 2012-09-27 27, 2012

Thank you for a good tutorial.

Is there a way to get the following string to return the file name without the file type (.pdf)?
event.value = event.source.source.documentFileName;

Thom Parker

3, 2012-07-16 16, 2012

Julie,
  I’ve created many stamps that are very similar to what you’ve described, so it can definitely be done. The details are not something I could give you in this form. You’d need a training session. Or, If you are motivated, you’ll find all the details in this book:

http://www.pdfscripting.com/public/183.cfm

There are also tutorials and samples here:
http://www.pdfscripting.com - Watch the “Stamps Gone Wild” Video

We also provide custom development. Please feel free to contact me at [email protected]

Julie

12, 2012-07-11 11, 2012

Hello, I am trying to create a custom dynamic stamp which will stamp “PAID” followed by the date (which may or may not be the current date) and then the payment method (cheque, visa, mastercard, cash, debit, wire transfer). I managed to get the PAID part, but the rest is beyond me, seeing as I know nothing about JavaScript. I tried to at least get it to do the payment method part, based on the code you wrote for option 2, but it didn’t work. Any assistance would be much appreciated. :)

Thom Parker

12, 2012-07-09 09, 2012

Vernon,
  There are no examples here in the Comment area. However, date and time Dynamic stamps are this easiest to make. Adobe does not exactly provide a template, but they do provide several examples, i.e, all of the built-in stamps that display a date and time. There are other tutorials on this site on creating a dynamic stamp. This particular article is about creating advanced features.

If you want a better set of instructions for creating a basic date and time stamp then I would suggest purchasing this book.
http://www.pdfscripting.com/public/183.cfm

Vernon Alexander

11, 2012-07-03 03, 2012

I want to create a date and time stamp.  Is there a built in template to work from in the “Comment” area?  Am I missing something.

Thom Parker

7, 2012-06-26 26, 2012

Hello Mathew, I believe I already answered this question in the forums.

Mathew

12, 2012-06-25 25, 2012

Is there any way to build a dynamic stamp which can open an attached file (i.e. having the same function as the ‘attach file as comment’ tool)?

Leave a reply:

Have an urgent question? Post your question to our Ask an Expert forum for a faster response.

Fields marked with * are required.

Download
Acrobat XI trial

Get the trial now

Learn how to
edit PDF.

Get started