Copy link to clipboard
Sure, that's possible.
You can use something like this to do it:
var newFileName = this.getField("Text1").valueAsString + "-" + this.getField("Text2").valueAsString + ".pdf;
This is probably a case of the carpenter blaming his tools, but I wondered has anything changed in Adobe since this answer.
When I run it I get "NotAllowedError: Security settings prevent access to this property or method...." in the console. In addition I have copied other scripts dealing with saving PDFs and have frequently gotten this message.
Thank you. Thank you. Thank you. I can stop butting my head against a tree
I have build a program (ExpungeKY.com) where users (total strangers or their lawyers) can get a form, fill it out, save it and later use it to expunge a criminal record. If I understand you correctly, there is no realistic way for me to have the file already be named, for example, "Jones-12345" when the user saves it.
A person usually needs several different forms. My biggest number has been 40, but 6-10 is not unusual. I just thought it would help the user keep things straight if the files automatically came with a unique name. Of course the user can name the file the old fshioned way-- retype it. No big deal. Just a convenience.
I do a fair number of these forms myself. I assume there is a way to put this feature in a separate set of forms just for use only on my own cmputer. Is that a big deal?
Again thanks and stay safe. If you need to charge me to answer this, let me know. Jwp@aye.net.