Subversion Repositories rld.adobe

Rev

Blame | Last modification | View Log | Download

# Create a Dynamic Stamp in Adobe Acrobat

How to create a dynamic stamp in Adobe Acrobat.

In this instance, we need to stamp invoices to certify their payment.

This stamp in particular needs the following information:

- Prices Checked
- Goods Received
- Services Satisfactory
- GST Indicator
- Certified for Payment
- G/L Cost Allocation

<img width="1154" height="550" src="./_resources/yd16N0bvJA6MGfVVgLvyFiz_JTzTMZbr_ccb9b3f19e67441db.png"/>

1. Create a Stamp from PDF, name it and ensure you save it into the Dymanic Subfolder
2. Stamp the stamp --> select it and press CTRL+J (Opens JavaScript debugger)
3. Paste **this.selectedAnnots\[0\].AP** into console and CTRL+ENTER - Should return a name such as: **#IIfBcQJ9RTIF_4ypJb0tBD**
4. Find the Stamp (%appdata%) then head to Adobe --> Acrobat --> DC (may be different depending on version) Stamps and find the latest file created
5. Open the file, scroll to page 2 (usually, unless you have more than one stamp)
6. Click Prepare Form
7. Go to Calculate Tab --> Custom Calculation script and paste:

var cAsk = "Have the Goods Been Received / Services Satisfactory? (Initial)";

var cTitle = "GoodsRec/ServicesSat";

if(event.source.forReal &&

(event.source.stampName == "#IIfBcQJ9RTIF_4ypJb0tBD"))

{

var cMsg = app.response(cAsk, cTitle);

event.value = cMsg;

}

1. Change var CASK and cTitle to reflect the field details
2. Change event.source.stampName to the name you got in point 3
3. If you need a date enter: event.value = util.printd("dd mmmm yyyy", new Date());
4. Save the file back to where Point 4 was (C:\\Users\\mit\\AppData\\Roaming\\Adobe\\Acrobat\\DC\\Stamps)
5. Change the order of the Javascript Prompt by preparing form --> More --> Set Field Calculation Order