Create a Dynamic Stamp in Acrobat 7.0x

Posted on 2006-03-30
Last Modified: 2009-03-06
I am wishing to create a Dynamic Stamp which when applied will allow me to enter a number (could be any number between 1-10,000 and not sequential)

The goal is to drop a stamp onto a document and be presented with a dialog to simply input the number desired. Once the number is entered and OK is clicked the stamp with the number will appear as any Custom Stamp would.

The area I need assistance is in the creation of the Dynamic Stamp in Acrobat 7.0x as the process is different from that in 6.0x and since I am asking for help I will award the points for the complete solution.

Thank you in advance...
Question by:Technodweeb
    LVL 11

    Author Comment

    I have a base stamp image which will be used as the basic stamp and has text across the top and a space to add the number below it. I did not figure this would matter but I am including the info just in case...

    Thanks again...
    LVL 11

    Author Comment

    OK, I have the process of creating a dynamic stamp worked out and will post the how to in my next posting except now all I need help with is the underlying Javascript included with the stamp.

    The following is the code I have worked out is located in the Custom Calculation Script section of the Text Field Properties:

    var cResponse = app.response(
        cQuestion: "Enter the Exibit ID in the field below and click OK",
        cTitle: "Data Entry",

    event.value = cResponse;

    This works but it has some problems... First and biggest issue is the fact that when I pull down the stamp menu and a preview of the stamp is seen, the Response dialog fires. This only happens one time during the Acrobat session, if I close Acrobat, it will occur again but only once. I can not figure out how to build a test for the script so that it only fires when the stamp is dropped on the document. After the above mentioned first display of the Response dialog, the stamp works as desired.
    The only other problem is something I can live with but has presented itself as confusing to the users... After the stamp has been successfully added once and a number assigned to it, the next time the stamp is used, it remembers the previous number until it is dropped on the document and then the Response dialog fires and the new number is inserted. Like I mentioned, this is a very minor issue.

    I am leaving the points at 500 even though the requirements have been cut in half. We are now down to some Javascript but still very important to me to get finished.

    Thank you in advance...
    LVL 11

    Author Comment

    Here are the steps I took to create the Dynamic Stamp portion of my original question:

    1. Create the base graphic in something like Photoshop and save the image locally. The name makes no difference.

    2. In Acrobat 7.0 click on Comments -> Commenting Tools -> Stamps -> Create Custom Stamp and browse to the graphic image just created and click OK. Choose a Category name or create a new Category and then Name the Stamp and click OK. This action creates a PDF file with a random name.

    3. Locate the PDF file created from step 2 above. On my XP system it was located in C:\Documents and Settings\USERNAME\Application Data\Adobe\Acrobat\7.0\Stamps\RANDOMNAME.pdf. The file you just created should be the most recently modified. If you are uncertain about which one, open each one to determine which one to work with. Once you determine the right file, rename it to something you will be able to quickly find again. Again, the actual name used here is not important to Acrobat but makes the human process of locating easier.

    4. Open the file you created in step 2 above in Acrobat (not reader) and find the image embedded. Somewhere on your image, place a Text Field on your image by clicking Tools -> Advanced Editing -> Text Field Tool and draw a text region onto your image. You may have to play around a bit to get the Font size to match up properly. This is where I had much trouble. I kept increasing the size of the Text Region until the font size closely matched the font in my original image.

    5. Once you draw your Text Field region a properties box will open. The only thing I changed was on the Calculate tab. I set it to Custom calculation script and added the script as listed in the posting above. I forgot, I also changed the default Font on the Appearances tab to match the Font I was using on the original image.

    6. Save and close your Stamp PDF file and open another existing PDF to test out your stamp.

    The code as supplied so far will cause some odd behavior but it still works. Hopefully some other expert will offer up some better JavaScript to make this work a bit better. I am hoping...

    The motivation for this projct began with a clerk at a law firm who was creating literally hundreds of custom stamps all of which were numbered sequentially to place on Exhibits for the court. She was quite a ways into the project when the question came up... How to share all this work with others in the firm? When I saw what she had created, I said there has to be a programatic way to do this better. There you have it...

    I hope this is helpfull to someone else. I spent 4 hours figuring this out and it took the clerk two days. I got a candy bar as a thank you from the clerk...

    Accepted Solution

    Because you have presented a solution to your own problem which may be helpful to future searches, this question is now PAQed and your points have been refunded.


    Expert Comment

    Has anyone ever figured out a solution to the "First and biggest issue is the fact that when I pull down the stamp menu and a preview of the stamp is seen, the Response dialog fires." I've successfully created an interactive stamp for my accounting department, but would like this error to be fixed before I roll it out to them, as they are not the most saavy of users.

    Here is the error that the JavaScript Debugger pops up in Acrobat:
    NotAllowedError: Security settings prevent access to this property or method. Approved:Format

    Don't know if this helps.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Hiding pages in PDF document 8 61
    Paperport 14.5 Cannot unstack 4 138
    PDF: Display my cards game? 8 44
    pdf file 7 63
    *Adobe Acrobat 9 was used for this article. Particular steps may vary depending on software versions. 1. Create a framework of your form in Word, leaving space where you’d ultimately like the Adobe fields to appear.  (Note: I use the blank lines …
    In a previous article published here at Experts Exchange, Signature Image with Transparent Background (, I explained how to cre…
    In this third video of the Xpdf series, we discuss and demonstrate the PDFtoText utility, which converts PDF files into plain text files. Download and install the software.: You may have already downloaded and installed the Xpdf tools while watching…
    In this video, we show how to perform Bates Numbering/Stamping of PDF documents using Power PDF Advanced, the newest product from the Document Imaging division of Nuance Communications. There are two editions of Power PDF — Standard and Advanced. Th…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now