3 Replies Latest reply on May 25, 2017 2:39 PM by try67

    Extract Pages from Batch of PDF's... a "simple" JS Question?


      So I already have some code that I found in these forums that works. Just trying to make it a bit better if possible.

      I just want to extract a certain number of pages (in my script below I am extracting the first three) from a batch of PDF's, and have them saved as "Extracted OriginalFileName.pdf". So far so good. So here is that code:

      var oldDoc = this;  
      var newDoc = oldDoc.extractPages(0,2);  
      newDoc.saveAs(oldDoc.path.replace(oldDoc.documentFileName, "Extracted " + oldDoc.documentFileName));


      What I would really like it to do is go through the entire batch without any user interaction. Right now the Javascript editor window pops up and you have to click "Ok" for each document in the batch.


      I did some searching, trying to find other simple scripts that behaved the same way, or other extraction scripts that might give me a clue as to what I might need to fix this relatively small issue and I have come up empty.


      If someone could point me in the right direction I would appreciate it.