Skip to main content
MRahnemun
Inspiring
December 22, 2023
Answered

Action wizard using a dynamic stamp with Date on it.

  • December 22, 2023
  • 3 replies
  • 2351 views

Hello,

 

In a pre defined dynamic stamp that uses todays date timestamp, I would like to use it in Action Wizard that applys to all the pdf in a folder. If I use that stamp manually for each document, timestamp date on it works with no problem on each and single document that apply that stamp on it. But when I use that Stamp on an Action Wizard using two step of WaterMarking and Save. the Back date Static date that already has been saved on the stamp at the time of creation would apply to all the PDF document without updateing the date in the folder. 

1.   I used all kinds of tricks that I could think of, Document Javascript to simulate the click using        document.getElementById("#MRSign").click(); didnot work;

2.  I tried to add JavaScrip step in front of WaterMarking step, funny, step is being added but does not let to add Java instruction to it.  Just a dummy step.

3.  I tried to use Add Header Footer notice it only is being used to inser a text not stamp.

4.  I don't know how many other tricks I tried to use to simulate the trick to update the date on the stamp I forgot, all I know for the last 10-12 hours I have struggling with that with no success. 

 

Could anyone give me a clue or instruction how this trick could be solve?

Regards,

Jeff P. 

 

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

There isn't a built in Action command for adding a stamp, or any kind of annotation, to a PDF. But this can be done with Acrobat JavaScript. 

this.addAnnot({type:"Stamp", AP:<stamp name>, page: <page num>, rect: <placment rectangle>});

 

Read this:

https://www.pdfscripting.com/public/All_About_PDF_Stamps.cfm

https://acrobatusers.com/tutorials/dynamic_stamp_secrets/

https://www.pdfscripting.com/public/PDF-Page-Coordinates.cfm

 

 

 

3 replies

Thom Parker
Community Expert
Thom ParkerCommunity ExpertCorrect answer
Community Expert
December 23, 2023

There isn't a built in Action command for adding a stamp, or any kind of annotation, to a PDF. But this can be done with Acrobat JavaScript. 

this.addAnnot({type:"Stamp", AP:<stamp name>, page: <page num>, rect: <placment rectangle>});

 

Read this:

https://www.pdfscripting.com/public/All_About_PDF_Stamps.cfm

https://acrobatusers.com/tutorials/dynamic_stamp_secrets/

https://www.pdfscripting.com/public/PDF-Page-Coordinates.cfm

 

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
MRahnemun
MRahnemunAuthor
Inspiring
December 23, 2023

Thank you for very comperihensive response... I was under impression that by simulating a click using Document JavaScripts, that can be done and update the static date of the date field on the stamp using Action Wisard.   But did not work, still the Static date was stamped on the documents.
Now I have to read carfully what you have proprosed to figure out what I need to do to make it to work.

Thanks for the guidance.

Regards,

Jeff P. 

Thom Parker
Community Expert
Community Expert
December 28, 2023

Clicks cannot be simulated in the Acrobat JavaScript Model.   

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Bernd Alheit
Community Expert
Community Expert
December 23, 2023

1. You can't use browser JavaScript in Acrobat.

MRahnemun
MRahnemunAuthor
Inspiring
December 23, 2023

thanks, but I am not using browser, using Adobe Acrobat Pro.  

Bernd Alheit
Community Expert
Community Expert
December 23, 2023

The function getElementById will only work in browsers.

MRahnemun
MRahnemunAuthor
Inspiring
December 22, 2023

I searched for duplicate and used and tried what I could use but nothing worked out... I am willing to pay for the solution, have better proposition to be more respectful?
Jeff P