Skip to main content
Dmitriy K.
Known Participant
July 15, 2020
Answered

Word Search Using Dynamic Stamp

  • July 15, 2020
  • 1 reply
  • 998 views

Hello! Is it possible to use javascript dynamic stamp to search for a word?
I tried adding this code to the Actions of the dynamic stamp template text field

Actions/Mouse Up/Run a JavaScript

 

search.query("Test", "ActiveDoc");

 

But when inserting the Stamp into the document, the script does not work!

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

The short answer it NO.  

However, there is a way to search the PDF being stamped. It is complicated. Do you have programming skills?

What exactly are you trying to do?  

 

1 reply

Thom Parker
Community Expert
Thom ParkerCommunity ExpertCorrect answer
Community Expert
July 15, 2020

The short answer it NO.  

However, there is a way to search the PDF being stamped. It is complicated. Do you have programming skills?

What exactly are you trying to do?  

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Dmitriy K.
Known Participant
July 16, 2020

in the dynamic stamp my signature, I try to find my last name in the document using the code, increase this place and put the signature. The surname appears many times in the document, i.e. it should be an iteration cycle.
1. I select a signature in a dynamic stamp - the search for the surname in the document is in progress
2. I put my signature next to the surname
3. I choose the signature again ... and so on in a loop

 

Do you have programming skills? - little experience on vbs, vba and java

Thom Parker
Community Expert
Community Expert
July 16, 2020

The Acrobat JavaScript function for finding text on a page is "doc.getPageNthWord()". 

Here's the reference entry:

https://help.adobe.com/en_US/acrobat/acrobat_dc_sdk/2015/HTMLHelp/#t=Acro12_MasterBook%2FJS_API_AcroJS%2FDoc_methods.htm%23TOC_getPageNthWordbc-54&rhtocid=_6_1_8_23_1_53

 

Have you seen the info on creating stamp scripts here:

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

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often