Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

JavaScript Needed for Dynamic Stamp

Community Beginner ,
Oct 20, 2021 Oct 20, 2021

Been working on trying to create a dynamic stamp to prompt the user for three piece of information, this is where I have gotten stuck taking a single prompt to build the three:

if ((event.source.forReal)&&(event.source.stampName =="#ID_Test"))
{
this.getField("User Name").value = app.response("ID_UserName:");
this.getField("Date").value = app.response("ID_Date:");
this.getField("UserID").value = app.response("ID_UserID:");

}

 

Thus far, I have struck an impass and unable to finish building the stamp.

 

TOPICS
Create PDFs , JavaScript , PDF forms , Scan documents and OCR
1.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 29, 2021 Dec 29, 2021
LATEST

To create a "single prompt" to ask for multiple pieces of information requires that you create a dialog. This is where creating a stamp gets a bit more complex. Unfortuntely, there is no easy way to build a dialog with the tools you get from Adobe. Your best bet is to look at this page from the API documentation: https://opensource.adobe.com/dc-acrobat-sdk-docs/acrobatsdk/html2015/index.html#t=Acro12_MasterBook%...

 

I would recommend that you create a simple document with one button on it. Use one example script at a time as the button "Run a JavaScript" action. Then start to modify the dialog scripts to get some experience with how they work. 

 

I said that there is no easy way to create dialogs with what you get from Adobe, but there is a simple dialog editor from a third party: PDFScripting.com has a dialog editor: https://www.pdfscripting.com/public/ACRODIALOGS-OVERVIEW.cfm

It does require a subscription to use it.  

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines