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

Need help saving all open files to single folder in Adobe Acrobat DC

New Here ,
Nov 09, 2019 Nov 09, 2019

As stated in subject title, I am looking for a way to save all open files to one specific folder without needing to save and path each one manually. I've looked into this before posting, and found previously suggested solutions such as the one here (https://answers.acrobatusers.com/How-to-save-all-open-files-to-a-specific-folder-Adobe-Acrobate-XI-P...

 

I've attempted to run scripts such as the one in the link, and searching the error messages given by the console leads me to believe that those scripts no longer work with current versions. I have run out of suggestions from older posts and am unfortunately not very good at using javascript myself. Any help is greatly appreciated.

TOPICS
How to
10.0K
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 ,
Nov 10, 2019 Nov 10, 2019

What error messages does you get?

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
New Here ,
Nov 10, 2019 Nov 10, 2019

"
NotAllowedError: Security settings prevent access to this property or method.
App.beginPriv:9:Menu save all pdfs?:Exec"

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 ,
Nov 10, 2019 Nov 10, 2019

Saving a pdf from a script requires priviledge. Here's a couple articles that explain it all:

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

https://www.pdfscripting.com/public/Trust-and-Privilege-in-Acrobat-Scripts.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
New Here ,
Nov 10, 2019 Nov 10, 2019

That's good information, I can see why the given scripts fail, but I'm still failing to apply it. Struggling to create my own scripts.

 

Still, thank you for the info, it's progress

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 ,
Nov 10, 2019 Nov 10, 2019

Well first, can you repeat the script in the article for saving the current PDF?  If you can do that, then we can extend it to all open PDFs.

 

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
New Here ,
Nov 10, 2019 Nov 10, 2019

Working through the scripts on that page, the most complex one I could get to run was  

this.saveAs("/c/temp/temp.pdf");

 which seems to run perfectly. The rest give a variety of error messages, such as 

this.saveAs("/c/MyDocs/" + this.documentFileName);

giving the error 

UnsupportedValueError: Value is unsupported. ===> Parameter cPath.
Doc.saveAs:1:Console undefined:Exec

undefined

 

The above script is probably closest to what I need to do, but I show the errors given when the other scripts are run if necessary.

 

(On a side note, sorry for taking so much of your time. I was hoping this would be an easier fix, my apologies.)

 

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 ,
Nov 10, 2019 Nov 10, 2019

Does /c/MyDocs/ exists?

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
New Here ,
Nov 11, 2019 Nov 11, 2019

Yes, I created it after the first time it failed. Same issue. I also tried replacing that name with other pre-existing folders, which still failed.

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 ,
Nov 11, 2019 Nov 11, 2019

Do your file-names contain special characters, or a comma, by any chance?

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
New Here ,
Nov 11, 2019 Nov 11, 2019

One of them did, but I tried with several that did not.

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 ,
Nov 11, 2019 Nov 11, 2019
LATEST

Are you testing these scripts from the console window? This would help a great deal in your testing. 

 

This article shows how to make a trusted SaveAs function, which is what you need

https://www.pdfscripting.com/public/Using-Trusted-Functions.cfm

 

Once you have that function working properly, it can be modified to act on all the documents.

 

Here's a very simple script that will save the document back to itself. This is at the heart of the solution you need.

this.saveAs(this.path);

 

 

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 ,
Nov 10, 2019 Nov 10, 2019

The scripts at the link you provided crap. Please refer to my post above for the correct information.

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