Skip to main content
lgiacc
Participant
March 31, 2021
Question

Set pdf form name before mailing

  • March 31, 2021
  • 5 replies
  • 1135 views
 

First time setting up PDF form.  Pleased it was very easy.  I have a submit button using the SUBMIT FORM

MAILTO:xxxxx  Exporting the whole PDF document.  

 

I can't find the answer to this question, it seems like it would be a common requirement.  If I send the form out to multiple people, when they return it, it comes back with the same PDF name. Instead a pile of docs with the same name, is there a way I can grab the filled in NAME field + filled in DATE field and use that as the PDF's file name when they hit the submit button prior to the mailto?  The return attachment would be "JOHN SMITH 03/04/21". 

 

I really don't need the user to save the form at all, much less under any particular name.

 
This topic has been closed for replies.

5 replies

try67
Community Expert
Community Expert
April 1, 2021

All of these solutions require installing a script on the local machine of the users. Can you do that?

Thom Parker
Community Expert
Community Expert
April 1, 2021

I've solved this issue in the past by saving the PDF to a new name.  In one case the customer did not want the emailed PDF name to be kept. It was just for the email. In this case the script saved to a temporary folder, emailed the PDF, then closing the file and reopened the original. 

You can get the temporary folder with the app.getPath() function.   

Here's an article that shows how to save a PDF from a script.

https://www.pdfscripting.com/public/How-to-Save-a-PDF-2.cfm?sd=40

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Bernd Alheit
Community Expert
Community Expert
April 1, 2021

Acrobat can't change file names. It can only save the file with a new name.

ls_rbls
Community Expert
Community Expert
April 1, 2021

Thank you for clarifying Bernd.

Amal.
Legend
April 1, 2021

Hi there

 

++ Adding to the discussion

 

For more information about using JavaScript please check out the help article https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/js_api_reference.pdf

 

You may also check out the similar discussion https://community.adobe.com/t5/acrobat/saving-a-flat-pdf-w-field-filename-current-date-time-in-new-location/m-p/9228841#M61800 and see if that helps you in right direction.

 

Regards

Amal

ls_rbls
Community Expert
Community Expert
April 1, 2021

This may be achieved with JavaScript.