PDF Merge for Adobe Acrobat Pro 7

Upload Photoshop Scripts, download Photoshop Scripts, Discussion and Support of Photoshop Scripts

Moderators: Tom, Kukurykus

Andrew

PDF Merge for Adobe Acrobat Pro 7

Post by Andrew »

Hi guys (and gals)

I don't understand pdfs well at all (or Acrobat Prof 7, which I have). What I would like to be able to do is to scan say 10 pages of document to pdf, then scan the reverse sides of the pages to pdf, then merge the two to end up with a single pdf which I can then convert to text in the pdf via OCR. Any suggestions for a way this might be done? I saw a PDF processor which looks like it would come close.

Andrew
niunn

PDF Merge for Adobe Acrobat Pro 7

Post by niunn »

Andrew wrote:Hi guys (and gals)

What I would like to be able to do is to scan say 10 pages of document to pdf, then scan the reverse sides of the pages to pdf, then merge the two to end up with a single pdf which I can then convert to text in the pdf via OCR. Any suggestions for a way this might be done? I saw a PDF processor which looks like it would come close.

Andrew

I have a same problem either!
Andrew

PDF Merge for Adobe Acrobat Pro 7

Post by Andrew »

Well, it's off topic since it involves Adobe Acrobat Pro (v7) but I have done it. This script for Adobe Acrobat Pro 7 will merge two PDF files which consist of a front-side scan of a multi-page document and a back-side scan of the same document, giving you a single new document with both sides printed and pages in order.

The following script is entered as a batch process, and under Select Commands: Edit Sequence you double click execute javascript, then double click the javascript line that appears on the right hand side. Then enter this code:

Code: Select all/* Merge PDF On Top First */

function mergePDF() {
   var d = app.activeDocs;
   var path1 = this.path;
   var doc1P = this.numPages;
   if (d.length > 2) {
      return;
   }

   for (var i=0; i < d.length; i++) {
      if (d.path == path1) continue;
      var path2 = d.path;
      var doc2P = d.numPages;
   }   
   var newDoc = app.newDoc();
   for (var i = 0; i < doc1P; i++) {
      newDoc.insertPages({
         nPage: newDoc.numPages -1,
         cPath: path1,
         nStart: i,
      });   
      if (i == 0) newDoc.deletePages({nStart: 0});
      if (i > doc2P -1) return;
      newDoc.insertPages({
         nPage: newDoc.numPages -1,
         cPath: path2,
         nStart: i,
      });
   }
}
mergePDF()




To use it you open the two documents to be merged (no other pdfs open) and you have the document you want the first page to be taken from on top. Then run the batch script and it will create a new merged document.

Andrew