Script to Insert a Custom Stamp/Annotation

Hello,
I have created a new custom stamp and need to add a script to "Batch Processing" to insert this stamp on 1,000 drawings.
The sample script available from the JavaScript for Acrobat API Reference inserts a stamp from the "Standard" Stamp File.
The standard stamp file is located in the following directory:
C:\Program Files\Adobe\Acrobat 8.0\Acrobat\plug_ins\Annotations\Stamps\ENU\Standard.pdf
The script needs to be modified to insert a stamp from a custom stamp menu called "Doc Control" and the custom stamp name is "Received".
The actual file which contains the custom stamp is located in the following directory:
C:\Documents and Settings\username\Application Data\Adobe\Acrobat\8.0\Stamps\Doc Control.pdf
Please find below the script which needs revising to include the new custom stamp.
var annot = this.addAnnot({
page: 0,
type: "Stamp",
name: "myStamp",  rect: [400, 400, 550, 500],
contents: "Received Stamp!",
AP: "NotApproved" }); This part of the script needs revising to refer to the new custom stamp not the stamp in the standard stamp file?
Any assistance will be greatly appreciated - Thank you.

The AP property needs to be set to the Name of the stamp.  When the stamp is created Acrobat automatically assigns it a stamp name.  Not the name of the annotation when the stamp is placed, but a name for the stamp itself.   See this article to figure out what this name is:
http://www.acrobatusers.com/tutorials/2007/02/dynamic_stamp_secrets
Thom Parker
The source for PDF Scripting Info
pdfscripting.com
The Acrobat JavaScript Reference, Use it Early and Often
http://www.adobe.com/devnet/acrobat/javascript.html
Then most important JavaScript Development tool in Acrobat
The Console Window (Video tutorial)
The Console Window(article)

Similar Messages

  • Custom Stamp no longer worker in Acrobat X

    I created a custom stamp using Adobe X; not sure it was working the way it was suppose to but it still met my needs.
    I used a PDF form which I created using Word, added some form fields and saved it.
    Added the PDF form file as a custom stamp.
    Opened another PDF document and was able to insert the custom stamp.....and this is where I don't know if it really worked correctly or not.  The stamp was basically an image, none of the fields were accessible; I thought a PDF form would act like a dynamic stamp but it didn't work as I expected.
    But if I opened the original PDF of the stamp and filled in the form fields & saved it and then inserted the custom stamp again, all the fields were updated/filled in.
    But then for some reason my custom stamp disappeared from stamp pull down menu.  And now when I try to add it back it creates an anonymous PDF file with the current form fields filled in.  If I open the original PDF stamp and change any of the form fields and save it, the custom stamp doesn't update when I go and insert it again.
    And if I delete that anonymous PDF file, my custom stamp again disappears from the stamp pull down menu.
    This now happens with any PDF file I use to create a custom stamp; Acrobat X creates an anonymous PDF file.
    If anyone has any idea how to fix this problem, it would be greatly appreciated.
    GT

    Behavior for PDFs is not handled by SharePoint, but rather Adobe Acrobat. Validate Adobe Acrobat's PDF browser extension has been disabled (you can do this via IE and I believe Adobe Acrobat has this option within it's own Preferences).
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Can only get the "Draft" stamp when insert customer stamp with C#+JS

    I am trying to insert customer stamp in batch files with C#+JS.
    My JS works well in Acrobat. However, it doesn't work when use C#+JS. I always get the Acrobat's "Draft" stamp other than my own ones (the AP value is confirmed correct).
    In c#, it runs as this ( with the objectype.InvokeMember())
    1. initial an annotation with addAnnot first and get the properties object with method of getProp().
    2. Set the type entry of the properties object as "Stamp"
    3. With setProp(), modify the annotation to a Stamp annotation, and then get the properties object of the Stamp annotation.
    4. Set the entries (rect, page, AP ) of the properties object. Then use setProp() again to modify the properties of the Stamp annotation.
    The program runs without any error message. But I can only get the default stamp "Draft".
    One thing I found so far, in JS console in Acrobat, if I set the AP properties AFTER set the annotation type to "Stamp", it also get the "Draft" stamp only. as this,
         annot = this.addAnnot();
         prop = annot.getProps();
         prop.type = "Stamp";
         annot.setProps(prop);
         prop = annot.getProps();
         prop.page = 0;
         prop.rect = [0, 0, 100, 100];
         prop.AP = "#xxxxxxxx";
         annot.setProps(prop);
    If I set the prop.Ap before the forth line in above para, I can get the right stamp.
         annot = this.addAnnot();
         prop = annot.getProps();
         prop.type = "Stamp";
         prop.AP = "#xxxxxxxx";
         annot.setProps(prop);
         prop = annot.getProps();
         prop.page = 0;
         prop.rect = [0, 0, 100, 100];
         annot.setProps(prop);
    Or, if I set the props in the typcial JS format like below, I also get the right one
    annot = this.addAnnot({
    type: stamp,
    page: 0,
    rect: [0,0,100,100]
    AP: #xxxxxxxx)});
    But, the problem is, in C#, the AP properties can only be set after set the annotation type as Stamp (step 4). I think this might be the reason, but I don't know how to get over this.
    Please help. Thanks!

    No, it can't – but you could do that yourself as part of the watermarking process (ie. Two watermarks or fields)
    From: santa-satan <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Mon, 6 Feb 2012 18:35:19 -0800
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: Can only get the "Draft" stamp when insert customer stamp with C#+JS
    Re: Can only get the "Draft" stamp when insert customer stamp with C#+JS
    created by santa-satan<http://forums.adobe.com/people/santa-satan> in Acrobat SDK - View the full discussion<http://forums.adobe.com/message/4190155#4190155

  • Adding custom stamps to many pages in white space.

    Is there any way to add a custom stamp to every page of a PDF book and having it placed into the white space on the document? I have found a script that will do every thing except for the 'white space' part of my query, so I don't think I will have much luck.
    Watermarks will probably not work in this instance, the stamp needs to be noticible but not in the way, and the watermark will encouter the same placement problem (as it is preferable if the stamp/watermark is not getting the in way of the drawing pdf's content).
    Any help will be appreciated, just let me know if you need more clarification.

    The question is what do you mean by "white space"? Is it always the same area on the page (like a 2" margin), or is it a different location for each page, where there happens to be no text or images? The former is possible, the latter only partially, and is very difficult to implement with a script.

  • How do I flatten a custom stamp in Acrobat XI?

    I use a custom stamp made from a scanned signature for signing documents.  There was a simple flatten function in the Document menu of Acrobat X that quickly merge the signature into the document.  I do see such a function in Acrobat XI.  I use Windows 7.  Any suggestions?

    By the way, that blog post above doesn't make it clear that this folder isn't created by default when you install Acrobat, so if it's not present, you have to create the ..\Acrobat\Privileged\11.0\JavaScripts folder manually and place the script file there.

  • Problem when applying a custom stamp, it shows on my document on the screen but when I print it, the stamp is not there.

    I have my pdf open, I created a custom stamp.  Applied the stamp to the document and I see it.  Save my document and then do either a print preview or print it and the stamp is not showing!  This method of applying stamps used to work but something has changed.  I thought it even worked when using Acrobat Standard X but can't be sure.  Really need help as even documents I created previously with stamps applied and I have proof that they printed with the stamp, won't print with the stamp on it.  Thank you.

    You don't even need to use a third party tool.
    Open the JavaScript Console (Control+J)
    Type the text string below in the JavaScript Console and hit Control+Return key.
    this.flattenPages();
    It will flatten all of the annotations and fields within the document to ensure that all the comments and stamps print.

  • Custom Stamp Name Display in Acrobat X?

    Our organization relies heavily on the usage of the Stamp tool, we have over 100 custom stamps created which enables us to be a paperless environment.  Here's the problem, in the new Acrobat X, Adobe removed the "names" of the custom stamps in the drop down.  So now you only see the stamp instead of the name.  We have some very large stamps, and some that are very similar but are used in completely different cases.  Does anyone know if it is possible to show the names of the custom stamps in Acrobat X?  This is such a huge deal to us, we won't be able to use any new versions of Acrobat unless this is possible!

    Acrobat does not, or at least it didn't, execute doc level scripts in a
    stamp file. So something else is needed. 
    SeattleUser, I the stampName needs to be specified at all, since the script
    doesn't need to work for a specific stamp, but rather all stamps when not
    being placed.  How about this code?
    event.target.hidden = event.source.forReal;
    Thom Parker
    WindJack Solutions, Inc
    www.windjack.com
    www.pdfscripting.com

  • Adding a custom stamp  to a large number of files.

    I need to build a batch process to add a custom stamp to a large number of PDF files. I want to do this without displaying tne files. I'm not sure where to go to learn about how to do this. I've found some sample Jscript code for the for stamps but don't really understand how to invoke the code in a batch process. Thanks for th guidance. Bianca

    It should be noted the "Batch Processing" is only available with the Professional or better versions.
    See "JavaScript in Batch Processing" by Thom Parker, http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/batch_process/ , or "Intro to Acrobat 5 Batch Processing" by Dr. D. P. Story, http://www.planetpdf.com/developer/article.asp?ContentID=Intro+to+Acrobat+5+Batch+Process ing+&gid=6518 .
    You also should look at "Automating placement of annotations" by Thom Parker, http://www.acrobatusers.com/tutorials/2007/10/auto_placement_annotations/ .

  • Creating Custom Stamp

    Hello all.
    I am working on Adobe Acrobat 9 Standard. I am trying to create a custom stamp of my signature. When I import my signature , it shows up perfectly (reading horizontally, like I want it), but when I go to insert the stamp , it is rotating it 90 degrees clockwise for some reason (reading top to bottom). I know I can edit the stamp and make it horizontal again (reading left to right) but that is quite a hassle considering I use the stamp 6-10 times a day. I would really like to insert the stamp and just print the page. Does anyone have any ideas how to fix this or why the stamp is rotating.
    Thank you in advance.

    I figured it out!
    was having the same issue and it cost me half the morning at work.
    when i was creating the stamp, i needed some comments and markups added and to "flatten it" i was printing it to PDF and then croping the page to the size i wanted and then importing it as a stamp. anyway, when i was printing to pdf, in the print dialogue box, in the section "Page Handling", the option "Auto-Rotate and Center" was checked, this was forcing my stamp to be centered and the page orientation to be landscape. For kicks n giggles, I unchecked it, the page orientation changed to Portrait and my stamp image went to the upper left. I cropped my result as I normally would, and upon creating the new custom stamp, it was right as rain. hope this helps!

  • Custom stamp naming

    I've created some custom stamps in Acrobat Standard X. I then edit the pdf in my stamps folder which contains the stamp and add text fields and use javascript to create a custom colculation script when the stamp is used (to bring up a prompt so the user can type text which will be added to the stamp). The script references the template name for the stamp. The name, which is randomly generated by acrobat when I create the stamp initially, is cumbersome. I'd like to give the template some unique name that is easier to remember rather than the random string generated by acrobat. How do I accomplish this? If I open the pdf in a text editor I can find the string but if I change it and save the file it corrupts the file. Thanks in advance for your help on this!
    -Ariel

    I'm confused. Following the instructions above I open the stamp file from the stamps folder. I select Tools>Document Processing>Page Templates. I select the template, with the randomly generated name, that corresponds to the stamp. In the Name: field I edit the stamp's name (everything between the # and the = symbols). Upon changing the name all buttons but the Close and the Add... buttons gray out. I click Add... and it adds a new template but leaves the original random-name template in the list. Can I now point to the newly added template in the code I have attached to my stamp or do I need to still point to the old template? Also, assuming I can now point to the new template, can I delete the old template? In the alternative, can I somehow change the original randomly generated name template without adding a new template? Thanks for your help!

  • Sharing Custom Stamp Palette?

    Hello,
    I have created a Custom Stamp Palette, which is working great.  I now would like to share this stamp palette with other's in my office, without them having to recreate the stamp palette on each individual computer. Is there a way I can save my cusom stamp palette, and send it to my colleagues, and have them open it on their own computers and use it?  Or do they each have to go through the steps of creating the custom stamp palette like I did?  I have tried going to C:\Program Files\Adobe\Acrobat 10.0\Acrobat\plug_ins\Annotations\Stamps\ENU, and importing my custom stamps to the StandardBusiness.pdf document, but it doesn't seem to recognize my custom stamps.  I can delete the default stamps from that document, and when I do, those stamps that I deleted no longer show up.  I thought I might be able to add my own custom stamps to this location,and have them show up, but didn't work.  I'd be surprised if Adobe didn't think of this in the beginning, I'm sure they knew people would want to share their custom stamp palette's.  Any help would be greatly appreciated.

    Just add your custom stamp pdf file to the location, do not import your stamps into an existing stamp pdf file.

  • Custom Stamp File will not update.

    I have a pdf file that we recently updated, and placed in the Acrobat>plugins>annotations>enu directory to replace a custom file we had there.  When we ope acrpbat pro 8 the old stamps are in the pulldown. If you open the pdf is has the new stamps. I searched to see if there was another location the Acrobat was pulling information from but there is only the one location.
    The stamp file has 38 pages, one for each stamp.  The pulldown only shows 34 stamps, and contains the stamps form 1 to 36, the two new stamps do not show up. I deleted the stamp.pdf file and restarted the machine. Even without the stamp file there it still shows the stamps, which tells me the file is compiled someplace and for some reason is not being updated.
    Did a new install on a fresh computer and all the stamps show up. My assumption is something with the way Acrobat Pro 8 handles the stamp files.
    Can you assist. We use this file for stamped signoff on work.
    Thanks.
    Jim Cosier
    Acrobat Pro 8.

    Let me reword this, perhaps no one has ran it this issue before. We use a file that contains custom stamps, I recently updated this file with two more stamps, and replaced the original file in the location C:\program files\adobe\acrobar\plugins\annotations\stamps\ENU where the original stamp file was.
    When you go to the tools>Comments & Markups\stamps\mystamps the file shows only the original 36 stamps, not the two new ones that I created.
    Open the file (pdf) it contains all the files including the two new ones. All the stamps were created using a master template I have in Photoshop and saved as a pdf file, then the page is added to the mtstamps.pdf file.  We recently added 4 new computers with acrobat pro 8 and on these machines the file only displays the 36 stamps and not the 2 new stamps.
    Acrobat Pro 8
    Jim

  • Help with saving custom stamps to SOAP repository.

    In my attempt to create a custom SOAP based comment repository i've found that i can save and retrieve all lightweight annotations perfectly except for any custom stamps that I've created (default stamps work great).  When i retreive the annotations from a different computer, it just displays a black box with a black x in the middle instead of actually displaying the stamp image.  My guess here is that I need to read the custom stamp image to a stream and then save it to the server along with the annotation data.  The problem is that I can't seem to get acrobat JS to detect and get the image (this.icon.length only counts default stamps).  I do have an AP property for the stamp which is the named appearance according to the documentation.  I just need some help now as to how i can retreive the stamp image data from the named appearance.
    Any help would be greatly appreciated.
    Thanks!

    Can anyone help me out with this?  I have a requirement to enable saving custom stamps to a central server but i can't seem to be able to retrieve the image data for storage.  Any leads would be greatly appreciated.
    Thanks!

  • I just upgraded to Acrobat XI and found that my custom STAMPS are missing.

    I just upgraded to Acrobat XI and found that my custom STAMPS are missing. Anyone know how to pull them in from the last version?
    Macintosh.
    thanks

    i'm on a mac and when i search for any of those terms [Annotations, Stamps, ENU] it comes up empty. however, search on a mac is horrible....often doesn't search random folders....really bad.
    i've given up and just recreated them.
    of course i had an extra hour with nothing to do so that was time wisely spent
    thanks much for getting back to me.
    d

  • Can't find custom stamp, but it is available in pull down list.

    I am running Adobe Acrobat XI with Windows 7.  I have looked in all the regular places for stamps \Acrobat\plug_ins\Annotations\Stamps\ENU\ and also in the temporary directory, but the stamp files are not located there.  However when I use Acrobat to mark up a document there are custom stamps I copied from others here that are available in the list for use.  They are custom dynamic stamps that pull user identity and time stamp.  I even looked in the Adobe 9 folders but they are mostly empty since the update to XI.  Any help would be appreciated.

    If you mean that you pasted the artwork one track at a time, you don't have to do that! You can do a bunch of tracks at once in two ways:
    1) Select all the tracks. Make the artwork viewer (in the bottom left corner of the iTunes window) visible if it isn't already, and click on its title to make it say "Selected Item". Drag the album artwork to the artwork viewer, or Copy the artwork, right click (control-click) on the artwork viewer and select Paste.
    2) Select all the tracks. Open the multiple item info panel with Command-I or File->Get Info. Paste or drag the artwork to the Artwork field in the Info panel.

Maybe you are looking for

  • Robohelp X5 Problem

    When I delete files from robohelp and from the server where I publish my robohelp files too, they tend to reappear the next time that I publish.  So in essence, I am unable to remove any files...Please help...

  • Yet another error deploying BPEL process on SOA Suite 11g

    Hi All, I am getting the following error when trying to deploy a SOA composite from Jdev 11g (on XP) to SOA suite (on linux). Somehow the JDev is trying to create a connection to 3.3.3.27 which is the private IP of the soa server even though the conn

  • Error while coming out of MM06 without making any change.

    Hi I am trying to check-uncheck some flags for material deletion in transaction MM06 through LSMW. I am using the Batch Input recording method. When i am making any sort of change to the material it works fine. But when there is a material whose flag

  • Bar Code Scanning

    Hi,   I have a requirement in which i need to scan the barcode label. The barcode format is Code 39 Modulo 43 and the fields printed on the barcode are not standard one. Can you please tell me how to decode the Bar-Code or is there any standard funct

  • Where did my plug ins go!?

    I'm in the process of several upgrades. New Macbook Pro and then Yosemite. Everything was fine so far (PLAY worked fine), then I added some new sounds to my East/West SOL PLAY plug in folder and now PLAY has disappeared from my Audio Units drop down