In this video, I'm going to show how you can save your PDF form with the new filename of the PDF based on the text field data via Action button javascript.
PDF form, when a user saves the document can anybody share a javascript that would generate the filename of the document based on the data in a form field within the form and for this document to be saved in a separate directory from the original PDF.
Just paste and change text field name.
Button JavaScript:
var myFileName = this.getField("Name").value + this.getField("Text1").value + this.getField("Text2").value + ".pdf";
Folder Level Script:
mySaveAs = app.trustPropagatorFunction(function(doc,path) {app.beginPriv(); doc.saveAs(path); app.endPriv(); })
myTrustedSpecialTaskFunc = app.trustedFunction(function(doc,path) {app.beginPriv(); mySaveAs(doc,path); app.endPriv(); });
myFileName = "/c/temp/" + myFileName
myTrustedSpecialTaskFunc(this, myFileName);
NOTE:
After putting the javascript in SAVE button, restart your adobe acrobat.
Make sure you have created a new folder in drive C and name it "temp".
You can add multiple fields by adding this string in button javascript
this.getField("Nameyourfieldhere").value +
На этой странице сайта вы можете посмотреть видео онлайн Auto Rename PDF Form Based on text field data via Button | JavaScript | Adobe Acrobat pro dc 2022 длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь SAR Solutions 18 Август 2022, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 5,816 раз и оно понравилось 44 зрителям. Приятного просмотра!