Solved

Adobe Acrobat script for stamp issue

Posted on 2013-02-01
3
1,105 Views
Last Modified: 2013-02-02
I have a field on stamp that i am using this code for:

var cRtn = app.response ("ENTER SHAMROCK PART NUMBER");
event.value = cRtn;

It worked the first time but now I have 2 issues.  One being that anytime i go to the dynamic stamp list it automatically pops up the java pop up asking for part number. (this is before I can even select a stamp) Two the stamp does not show up after entering part number.  I am sure I am not using the correct code but i have tried many different ways and cant seem to get it to work.  As you can see I really just want to be able to enter a part number and place the stamp.  The stamp does have other dynamic fields.  I am attaching the stamp file as well.
ControlledCopyStamp.pdf
0
Comment
Question by:notasgoodasyou
  • 2
3 Comments
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 500 total points
ID: 38846756
I see you did run into a problem with your stamps...

The problem is that you need to limit when the stamp script is actually executed. You need to use a stamp script like this:

if(event.source.forReal && (event.source.stampName == "#EkwOt9ACueFSPMv-OqOo0C"))
{
    // for the "Revised" field
    this.getField("Revised").value = util.printd("mmm dd, yyyy", new Date());

    // for the "Text2" field
    this.getField("Text2").value = "By " + ((!identity.name || identity.loginName != (event.source.source || this).Collab.user) ? (event.source.source || this).Collab.user : identity.name);

    // for the Text3 field (this field)
    var cRtn = app.response ("ENTER SHAMROCK PART NUMBER");
	event.value = cRtn;
}

Open in new window


I've attached a file with the script fixed.

The crucial point is that you need to know the stamp name, and you can find that by going to the page template interface (in Acrobat XI this is Tools>Document Processing>Page Templates. You will see all the stamps that are defined in your file in a syntax like this:
#SOMERANDOMTEXT=Stamp Name

Open in new window


In the code above, you need to use the #SOMERANDOMTEXT portion (just before the equal sign) in the conditional statement to see if you are running in the right context.
ControlledCopyStamp.pdf
0
 

Author Closing Comment

by:notasgoodasyou
ID: 38846894
Thank you for a much fuller explanation and all the help.  I should have done more testing before accepting my previous questions answer.
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 38846905
You are welcome. You can always post a support request to have the other question reopened.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is in response to a question here (http://www.experts-exchange.com/Other/URLs/Q_28283850.html) at Experts Exchange. The Original Poster has a scanned signature and wants to make the background transparent so that the signature may be pl…
The Adobe PDF proprietary file format is recognized as secure and formulated. But these PDF files are also prone to corruption and any external threat like virus attacks, improper storage can hit PDF file integrity.This type of damages can make cruc…
In this video, we show how to convert an image-only PDF file into a PDF Searchable Image file, that is, a file with both the image (typically from scanning) and text, which is created in an automated fashion with Optical Character Recognition (OCR) …
Sometimes we receive PDF files that are in the wrong orientation. They may be sideways or even upside down. This most commonly happens with scanned or faxed documents. It is possible to rotate the view of these PDFs with the free Adobe Reader produc…

911 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

22 Experts available now in Live!

Get 1:1 Help Now