Step 1: Check us out

You don't have to be a member to look at any content on the site. Increase your expertise with our helpful tutorials, videos, forums, and sample PDFs.

Step 2: Sign up for a free account

Like what you see? Take the next step and become a member. Register now to get discounts, attend eSeminars, ask questions and more.

Step 3: Start participating

Get the most out of your membership. Post in the forums, create your profile, submit to the gallery, attend a user group meeting. Log In now.

Acrobat User Community Forums

You are not logged in.     Log in to your AUC account.     Don't have an account? Sign up today

#1 2009-12-26 13:41:12

shenry
Member
Registered: 2009-12-26
Posts: 1

Adding stamp via combo box selection

I am stuck with this simple project of adding a stamp to the page at a specific location from my custom stamps when a forms menu item is selected.  Here is the code.  The rectangle is created but not filled with the stamp jpeg picture.  Variable stampName does match and receive the name of the stamp in the custom stamp file.  This works perfectly fine when I add a standard stamp name like "Approved".

Am I missing something here with the path to custom stamps or something?



//<Document-Level>
//<ACRO_source>SetStamp</ACRO_source>
//<ACRO_script>
/*********** belongs to: Document-Level:SetStamp ***********/
function SetStamp(stampName)
{
    var annot = this.addAnnot({
        page: 0,
        type: "Stamp",
        rect: [20, 570, 150, 680],
        AP: stampName
    });
}
//</ACRO_script>
//</Document-Level>

//<AcroForm>
//<ACRO_source>Title:Keystroke</ACRO_source>
//<ACRO_script>
/*********** belongs to: AcroForm:Title:Keystroke ***********/
if(event.willCommit)
{
    if(event.value == "")
        this.resetForm([ ]);
    else
        SetStamp(event.value);
}
//</ACRO_script>
//</AcroForm>

Last edited by shenry (2009-12-27 13:43:21)


My Product Information:
Acrobat Pro 9.2 / Macintosh

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson