Skip to main content
Participating Frequently
February 6, 2025
Question

save attachment in a specific name

  • February 6, 2025
  • 2 replies
  • 609 views

Goodmorning,
I have created a button with a script that saves the last page and send it as an attachment

 

var d = this.extractPages(this.pageNum);
d.mailDoc({cTo: "test@gmail.nl", cSubject: "Information" + (this.pageNum+1) + " from " + this.documentFileName, bUI: false});
d.closeDoc(true);

 

The only thing i can't figure out is how to save the attachment in a specific name.

Does anybody has an idea how i can add this ?

And is it possible to add textfields from within the pdf file to the file name ?

For example mut-Text15 


Thank you very much for youre help !

2 replies

JR Boulay
Community Expert
Community Expert
February 12, 2025

[MOVED TO THE ACROBAT DISCUSSIONS]

Acrobate du PDF, InDesigner et Photoshopographe
try67
Community Expert
Community Expert
February 6, 2025
Participating Frequently
February 6, 2025

thank you. Yes i have read this post but don't know how to fit this within my script. Can you help me ?

try67
Community Expert
Community Expert
February 6, 2025

First question is: Can you install a script file on the local computer of each user who will use this file?

If not, then you can't do it. The closest you can get is to request them to save the file under a specific name, and prevent the file from being submitted back to you if it doesn't have the correct name, but you can't force it to be saved under that name in your code.