Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Save as button with file name

New Here ,
Jun 19, 2024 Jun 19, 2024

I have a PDF form and want to add a button to prompt "save as" and auto populate the file name based on 2 fields from my form. The user will then select the folder that the file will be saved. 
any help would be appreciated. 

TOPICS
How to , PDF forms
862
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 19, 2024 Jun 19, 2024

Unfortunately this type of functionality is not easily implemented with a PDF. 

Please read this article on how to save a PDF with a script:

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

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 19, 2024 Jun 19, 2024

You would have to use the app.browseForDoc method to simulate a "Save As" browse window (the file window says "Save As", allows a default file name that the user can change, and lets the user select the file location), then pull the path from the result and use doc.saveAs.  Unfortunately, browseForDoc and saveAs (silently) are privileged, so all users would need a trusted function in a document level script.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 19, 2024 Jun 19, 2024
LATEST
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines