Create a Dynamic Stamp in Acrobat 7.0x

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...
-greg
LVL 12
Gregory MillerGeneral ManagerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gregory MillerGeneral ManagerAuthor Commented:
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...
-greg
0
Gregory MillerGeneral ManagerAuthor Commented:
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...
-greg
0
Gregory MillerGeneral ManagerAuthor Commented:
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...
0
EE_AutoDeleterCommented:
Technodweeb,
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.

EE_AutoDeleter
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
grinningsoulCommented:
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.
Identity.name:3:Field Approved:Format

Don't know if this helps.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Acrobat

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.