Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more