2 Replies Latest reply on Feb 16, 2009 4:37 AM by (eric_mays)

    Extracting & Naming 2 pages at a time (odd pages)


      I have been using the below script which allows me to take a file, extract each page as a new file, and name that file in sequential order.

      We have now started DUPLEX scanning our documents, so my 500 page PDF is now actually 250 front/back copies. The front copies are odd pages, back copies are even, directly after the front copies.

      How would I modify the below code to now EXTRACT 2 pages at a time, but continue to number them sequentially by 1.

      Example: Page 1 + Page 2 extracted as 2008092001.pdf
      Page 3 + Page 4 extracted as 2008092002.pdf

      Thank you!


      var startNum = 2008092001;
      for ( var i = 0; i < this.numPages; i++ ) { var fileName = (startNum + i).toString(); this.extractPages ({ nStart: i, cPath: "/Z/EVRRS/ImageTesting/"+ fileName +".pdf"}); }