Skip to main content
Participant
November 3, 2021
Answered

Stamping Multiple Pdf files at once - Acrobat XI pro

  • November 3, 2021
  • 2 replies
  • 2457 views

Needing to stamp mutiple files at once in the right top hand corner. If someone can write a JavaScript code for that for me.

 

Or is there a way to stamp batches in XI

 

whatever works TIA

This topic has been closed for replies.
Correct answer Thom Parker

I am getting this error:

SyntaxError: syntax error
1:Console:Exec
undefined


Missing Closing curly brace.

 

this.addAnnot({type:"Stamp", page:0, AP:"#DbN0yA0FJHMzRGruq212tA", rect:[560,740,560,740]});

2 replies

try67
Community Expert
Community Expert
November 3, 2021

You can do it using the addAnnot method as a part of an Action.

If you want help with the code you'll need to provide additional information such as the exact coordinates for the stamp, and on which pages it should appear.

Participant
November 3, 2021

Hello, My stamp name is #DbN0yA0FJHMzRGruq212tA and I would like it in the top right hand corner. I am trying to get the stamp on multiple PDF files all at once. So, just the first page stamped of eachfile on the top right hand corner.

Thom Parker
Community Expert
Community Expert
November 4, 2021

I'm aware of that, but the script can't know what's the size of the stamp. It applies it at whatever size you tell it to.

So if you tell me what size it is I could help you write the code to add it using that size. Otherwise I can't help you.


If you apply the stamp to a point, rather than a rectangle, then it takes on it's natural size. So you can just pick a point near the top right corner.

 

this.addAnnot({type:"Stamp", page:0, AP:"#DbN0yA0FJHMzRGruq212tA", rect:[560,740,560,740]|);

 

 

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Participant
November 3, 2021

My stamp name is #DbN0yA0FJHMzRGruq212tA