1 Reply Latest reply on Jul 20, 2009 5:53 PM by SBMSBM

    Simple Extract & Merge Javascript


      I have created the following simple javascript which Extracts only the first page from multiple PDF files.

      /* Extract 1st Page Only As PDF */
      // regular expression acquire the base name of file
      var re = /.*\/|\.pdf$/ig;
      // filename is the base name of the file Acrobat is working on
      var filename = this.path.replace(re,"");
      try {
      nStart: i,
      cPath: "/C/Documents and Settings/netid/Desktop/ExtractFolder/Cover/"+"Cover_Page" + "_"+filename+".pdf"
      } catch (e) {

      console.println("Aborted: "+e)


      This script creates separate PDF files with one page in each. Unfortunately, I need to create one PDF file. Is there a simple way to combine these separate PDF files using javascript code?

      Thanks in advance for your assistance.