0 Replies Latest reply on Nov 11, 2013 7:13 AM by MPDTrainee

    Edit multiple password-protected PDFs using Photoshop CS5 Javascript scripting.

    MPDTrainee

      Good Evening,

       

      Situation: I have a huge stack of PDF files and I'm using Photoshop CS5 to slice out previews and other things automatically, using a self-built javascript. Some (100+) of these PDFs are password-protected. I have the password to these files.

       

      Problem: Every time the script tries to open one of the protected PDFs it will open a popup, stop the whole process and wait for the user to input the password.

       

      Question: Is there a way to add the password to the open command of the app.open(...) function? Or more simply put, can this be fully automated?

       

      What I looked at so far: "PDFOpenOptions", "app.open(...)", the javascript reference("photoshop_cs5_javascript_ref.pdf") in general.

       

      Basic Example code:

      var f = new File("path to some password protected PDF");

      var d = app.open(f); //this will trigger the password popup

      doSomethingWithMyDocument(d);

      d.close(SaveOptions.DONOTSAVECHANGES);

       

       

      Any help would be greatly appreciated. I have access to Photoshop CS6 as well, if that somehow solves the problem.

      If I'm looking at a dead-end, feel free to tell me too.