A simple script to quickly save pdfs to your harddrive.

Uncategorized

If you work with lots of PDFs and find having to save them to a specific spot each time very painful then you might find this script useful. It’s very basic and if you have not used JavaScript in Acrobat before you’ll be able to change the location of the folder to save the PDFs to with no problems.


var QuickSave = app.trustedFunction(function()
{
app.beginPriv();
//to save to older of your choice change /QuickSave/ to the path you want ie C:\docs\pdfs
this.saveAs("/QuickSavePDFs/"+this.documentFileName);
this.closeDoc(true); // close the doc, no notification
app.endPriv();
});

//add a line above the menu entry
app.addMenuItem({cName:"-", cParent:"Tools", cExec:" "});
//add and entry to the menu to call the QuickSave function
app.addMenuItem({cName:"Quick Save", cParent:"Tools", cExec:"QuickSave();"});

The only part of this script that you need to change if the following line:

this.saveAs(“/QuickSavePDFs/“+this.documentFileName);

Change “/QuickSavePDFs/” to a path on your local or network drive and the script will save the pdf you have open (active) to the path specified. If you are on a PC you can use something like /c/mysavedpdfs/ or C:\mypdfs or if you are on a network \\servername\foldername\mypdfs\.

To get the script to load in Acrobat open the JavaScript folder under the Acrobat application folder.

Once you’ve copied the file into the folder and restarted the application go the the preferences and tick on the option:

Enable menu items JavaScript execution privileges.

Once you have done this open a pdf to test the script. Go to the Tools menu and then select Quick Save. The pdf will close and if you check the folder you specified the pdf should be in there.

Hope you find this useful. You can copy the code above or download the script from this Link to file.

Leave a Reply

Powered by WordPress | Theme by Kordas.Industrial.Design Entries RSS Comments RSS