?
Solved

Adobe Acrobat script for stamp issue

Posted on 2013-02-01
3
Medium Priority
?
1,175 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Power PDF (http://www.nuance.com/for-business/document-imaging-and-scanning/power-pdf-converter/index.htm) is the newest product from the Document Imaging division of Nuance Communications (http://www.nuance.com/). It is available in two editions — …
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
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…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Suggested Courses

765 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