Copy link to clipboard
Copied
Hello community,
for my office I wanted to create some stamps that has some variables in it. I saw a method where when you put the stamp a question for the input text comes up and you have to enter the variables. This seems fine for me. So I looked up a video: https://youtu.be/OjK5NbjOZCI
Here the guy shows how this is done with some code working (new to me). He refers to another tutorial in the web in his description,
My problem is that I can follow the whole video and do what he does but when it comes to using the stamp and the input textfield, my entered text does not show up. As if it is invisible.
I once had similar problem. Some years ago I wanted to add some text in a document and tried it with the tool "edit document" and "add text" (translating here from my language, it my be different). There was also the problem. I saw the cursor moving but the letters were invisible (and not colored white). I had to use the comment tool where there is also a function to add text.
Can someone help me?
Adobe Acrobat DC Pro 2020 and Win 10.
Chris
Thank you both for your help. I located the problem. The above mentioned video told to use this code
var cAsk = "Enter One of: Approved, Rejected, or In Process"; var cTitle = "Document State For Stamp"; if(event.source.forReal && (event.source.stampName == "PLACEHOLDER")) { event.value = app.response(cAsk, cTitle); }
when I actually was supposed to use
var cAsk = "Enter One of: Approved, Rejected, or In Process"; var cTitle = "Document State For Stamp"; if(event.source.forReal && (...
Copy link to clipboard
Copied
You doesn't set the value of the fields.
Copy link to clipboard
Copied
Thank you for your answer. How and where do I set the value of these fields? Do you mean the category "Validation" in the attributes of the text field (again, I am translating here from my German surface, I do not know how the buttons are named in English versions)? If so, what do I need to enter in there?
Copy link to clipboard
Copied
See this:
https://www.pdfscripting.com/public/All_About_PDF_Stamps.cfm
Copy link to clipboard
Copied
You're stamp script gets data from the user, but does not put the data into the form fields.
See this:
https://www.pdfscripting.com/public/All_About_PDF_Stamps.cfm
And this article:
https://acrobatusers.com/tutorials/dynamic_stamp_secrets/
Copy link to clipboard
Copied
Thank you for your answer. The first link unfortunately does not help. It redirects to a members area which fee I am hesitating to pay for obvious reasons.
The second link is the one that is also mentioned in my above mentioned video. The video executes this tutorial in a way that non-professional users like me understand. The tutorial itself does not indicate my problem.
"You're stamp script gets data from the user, but does not put the data into the form fields." - How can I fix this?
Copy link to clipboard
Copied
Look at the sample file of the second link.
Copy link to clipboard
Copied
So, dynamic stamps are basically forms. You put data into a field on a stamp the same way you put data into a form field using a calculation script. This is clearly pointed out in the tutorial, the articles and the sample.
for exmaple:
event.value = "Hello";
This calculation script places the text "Hello" into the field that contains the calculation.
BTW: you would be well served to get a membership. It's cheap and provides a world of stamp samples and tutorials, as well as much more.
Copy link to clipboard
Copied
Thank you both for your help. I located the problem. The above mentioned video told to use this code
var cAsk = "Enter One of: Approved, Rejected, or In Process"; var cTitle = "Document State For Stamp"; if(event.source.forReal && (event.source.stampName == "PLACEHOLDER")) { event.value = app.response(cAsk, cTitle); }
when I actually was supposed to use
var cAsk = "Enter One of: Approved, Rejected, or In Process"; var cTitle = "Document State For Stamp"; if(event.source.forReal && (event.source.stampName == "PLACEHOLDER")) { var cMsg = app.response(cAsk, cTitle);cMsg += " : " + util.printd("mm/dd/yyyy", new Date());event.value = cMsg; event.source.source.info.DocumentState = cMsg;
}
like in the tutorial which author I now realise being member of this discussion and which both of you probably meant when saying that I doesn't set the value of the fields. Since I didn't need the display of the date I deleted that line and it worked fine for me.
The membership costs 149$ a year. Since I do not need anything deeper in pdf scripting than this dynamic stamp it would have been a bad purchase. I would have studied several things to even get close to my problem and in order to understand the issue I am having. And after that the learned things would have been useless in my regular office work. I'd rather pay someone 50$ to fix my stamp issue and then the case is closed.
Thank you for your time and help.
Chris