Here is the latest version of this script, compabible with Acrobat X. The functions have been moved into the "Edit" menu because there is no tools menu in Acrobat X. It still maintains compatibility with Acrobat 9. Unfortunately, you'll have to manually copy and paste this into a file because Adobe has disabled the file attachment feature on Jive Forums . // Complements: Planet PDF (http://www.planetpdf.com/) // Modified by Jeff Baitis for Acrobat 9 and Acrobat X compatibility // Improved Collate function with status bar. // Add a menu item to reverse all pages in the active document app.addMenuItem({ cName: "Reverse", cParent: "Edit", cExec: "trustedReversePages();", cEnable: "event.rc = (event.target != null);", nPos: 0 }); // Add a menu item to collate with another document on the filesystem app.addMenuItem({ cName: "Collate", cParent: "Edit", cExec: "trustedCollatePages();", cEnable: "event.rc = (event.target != null);", nPos: 0 }); trustedReversePages = app.trustedFunction(function() { app.beginPriv(); // Explicitly raise privileges var t = app.thermometer; t.duration = this.numPages; t.begin(); for (i = this.numPages - 1; i >= 0; i--) { t.value = (i-this.numPages)*-1; this.movePage(i); t.text = 'Moving page ' + (i + 1); } t.end(); app.endPriv(); }) // Collating pages /* Title: Collate Document Purpose: User is prompted to select document to insert/collate. Author: Sean Stewart, ARTS PDF, www.artspdf.com */ trustedCollatePages = app.trustedFunction(function() { app.beginPriv(); // Explicitly raise privileges // create an array to use as the rect parameter in the browse for field var arRect = new Array(); arRect[0] = 0; arRect[1] = 0; arRect[2] = 0; arRect[3] = 0; // create a non-visible form field to use as a browse for field var f = this.addField("txtFilename", "text", this.numPages - 1, arRect); f.delay = true; f.fileSelect = true; f.delay = false; // user prompted to select file to collate the open document with app.alert("Select the PDF file to merge with") // open the browse for dialog f.browseForFileToSubmit(); var evenDocPath = f.value; var q = this.numPages; var t = app.thermometer; t.duration = q; t.begin(); // insert pages from selected document into open document for (var i = 0; i < q; i++) { var j = i*2; this.insertPages(j, evenDocPath, i); t.value = i; t.text = 'Inserting page ' + (i+1); } t.end(); // remove unused field this.removeField("txtFilename"); app.endPriv(); })
... View more