Skip navigation
Currently Being Moderated

How can I merge even and odd pages of a PDF?

May 9, 2011 6:01 AM

I've got a document scanner that only scans one side

 

This is a problem when I have 2 sided documents

 

Let's say I have 20 pages - all double sided

 

I can scan all odd pages first in one go - I get one pdf generated pages 1, 3, 5, 7, 9, 11, 13, 15, 17, 19

Then I can scan all even pages 2, 4, 6, 8, 10, 12, 14, 16, 18, 20

 

Is there any quick way I can merge both pdfs to give me 1, 2, 3, 4, 5, 6, 7, 8, 9, 10... 20?

 

Thanks a lot

 

 

Micro

 
Replies
  • Currently Being Moderated
    May 9, 2011 6:33 AM   in reply to microsd-210

    I've created a tool that does just that. Have a look here:

    http://try67.blogspot.com/2008/12/acrobat-combine-even-odd-pages.html

     
    |
    Mark as:
  • Currently Being Moderated
    May 9, 2011 7:50 AM   in reply to microsd-210

    In the scan dialog of Acrobat you can specify double sided scanning.

     
    |
    Mark as:
  • Currently Being Moderated
    May 12, 2011 4:40 AM   in reply to microsd-210
    i just think adobe are silly not to provide it as standard??

    You can scan double sided pages with Adobe Acrobat.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 11, 2011 2:32 AM   in reply to microsd-210

    Exit Acrobat, and put the following in a file in your Javascripts path somewhere, e.g. C:\Program Files\Adobe\Acrobat 9.0\Acrobat\Javascripts\CollatePages.js

     

    // Complements: Planet PDF (http://www.planetpdf.com/)

    // Modified by Jeff Baitis for Acrobat 9 compatibility

    // Improved Collate function with status bar.


    // Add a menu item to reverse all pages in the active document

    app.addMenuItem({  cName: "Reverse", cParent: "Document", cExec: "trustedReversePages();",  cEnable: "event.rc = (event.target != null);", nPos: 0 });

    app.addMenuItem({  cName: "Collate", cParent: "Document", cExec: "trustedCollatePages();",  cEnable: "event.rc = (event.target != null);", nPos: 0 });


    trustedReversePages = app.trustedFunction(function()

    {

      app.beginPriv(); // Explicitly raise privileges

      var t = app.thermometer;

      t.duration = this.numPages;

      t.begin();

      for (i = this.numPages - 1; i >= 0; i--)

      {

        t.value = (i-this.numPages)*-1;

        this.movePage(i);

        t.text = 'Moving page ' + (i + 1);

      }

      t.end();

      app.endPriv();

    })


    // Collating pages

    /*

      Title: Collate Document

      Purpose: User is prompted to select document to insert/collate.

      Author: Sean Stewart, ARTS PDF, www.artspdf.com

    */


    trustedCollatePages = app.trustedFunction(function()

    {

      app.beginPriv(); // Explicitly raise privileges

      // create an array to use as the rect parameter in the browse for field


      var arRect = new Array();

      arRect[0] = 0;

      arRect[1] = 0;

      arRect[2] = 0;

      arRect[3] = 0;


      // create a non-visible form field to use as a browse for field


      var f = this.addField("txtFilename", "text", this.numPages - 1, arRect);


      f.delay = true;

      f.fileSelect = true;

      f.delay = false;


      // user prompted to select file to collate the open document with


      app.alert("Select the PDF file to merge with")


      // open the browse for dialog


      f.browseForFileToSubmit();

      var evenDocPath = f.value;


      var q = this.numPages;


      var t = app.thermometer;

      t.duration = q;

      t.begin();


      // insert pages from selected document into open document


      for (var i = 0; i < q; i++) {

          var j = i*2;

          this.insertPages(j, evenDocPath, i);

          t.value = i;

          t.text = 'Inserting page ' + (i+1);

      }

      t.end();


      // remove unused field


      this.removeField("txtFilename");

      app.endPriv();

    })

     

    For those looking to apply this script in Adobe Acrobat X. Replace two instances of "Document" with "Edit". They are in the top lines that start with app.addMenuItem.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 30, 2011 9:27 AM   in reply to jbaitis

    I have a similar problem, except I cannot scan my doc.  I had to create it for book printing in MSWord with image/watermark.  I am under deadline and working on less than ideal software. What I have is -- Odd and even pages = different image background w/text flowing over them.

     

    It looks like my options are either pay $50 for the script --and although I agree with previous post that someone should be paid for their script, 50 bucks is a bit much, don't you think? My opinions aside, I can't afford it.

     

    or Learn scripting. The instructions above kindly provided are gibberish to me. The software files on this pc are locked anyway.

     

    or break up one of them and insert the 20 pages, one at a time.

     

    Are these really all the options?

     

    M.Maher

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 30, 2011 10:06 AM   in reply to Miranda M

    Collating PDFs using JavaScript by Sean Stewart.

     

    You will still need to run the script through the Acrobat JS console.

     

    This assumes you  have a full version of Acrobat and not just Reader.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 29, 2011 10:48 AM   in reply to jbaitis

    Here is the latest version of this script, compabible with Acrobat X. The functions have been moved into the "Edit" menu because there is no tools menu in Acrobat X. It still maintains compatibility with Acrobat 9. Unfortunately, you'll have to manually copy and paste this into a file because Adobe has disabled the file attachment feature on Jive Forums .

    // Complements: Planet PDF (http://www.planetpdf.com/)

    // Modified by Jeff Baitis for Acrobat 9 and Acrobat X compatibility

    // Improved Collate function with status bar.

     

    // Add a menu item to reverse all pages in the active document

    app.addMenuItem({  cName: "Reverse", cParent: "Edit", cExec: "trustedReversePages();",  cEnable: "event.rc = (event.target != null);", nPos: 0 });

    // Add a menu item to collate with another document on the filesystem

    app.addMenuItem({  cName: "Collate", cParent: "Edit", cExec: "trustedCollatePages();",  cEnable: "event.rc = (event.target != null);", nPos: 0 });

     

    trustedReversePages = app.trustedFunction(function()

    {

      app.beginPriv(); // Explicitly raise privileges

      var t = app.thermometer;

      t.duration = this.numPages;

      t.begin();

      for (i = this.numPages - 1; i >= 0; i--)

      {

        t.value = (i-this.numPages)*-1;

        this.movePage(i);

        t.text = 'Moving page ' + (i + 1);

      }

      t.end();

      app.endPriv();

    })

     

    // Collating pages

    /*

      Title: Collate Document

      Purpose: User is prompted to select document to insert/collate.

      Author: Sean Stewart, ARTS PDF, www.artspdf.com

    */

     

    trustedCollatePages = app.trustedFunction(function()

    {

      app.beginPriv(); // Explicitly raise privileges

      // create an array to use as the rect parameter in the browse for field

     

      var arRect = new Array();

      arRect[0] = 0;

      arRect[1] = 0;

      arRect[2] = 0;

      arRect[3] = 0;

     

      // create a non-visible form field to use as a browse for field

     

      var f = this.addField("txtFilename", "text", this.numPages - 1, arRect);

     

      f.delay = true;

      f.fileSelect = true;

      f.delay = false;

     

      // user prompted to select file to collate the open document with

     

      app.alert("Select the PDF file to merge with")

     

      // open the browse for dialog

     

      f.browseForFileToSubmit();

      var evenDocPath = f.value;

     

      var q = this.numPages;

     

      var t = app.thermometer;

      t.duration = q;

      t.begin();

     

      // insert pages from selected document into open document

     

      for (var i = 0; i < q; i++) {

          var j = i*2;

          this.insertPages(j, evenDocPath, i);

          t.value = i;

          t.text = 'Inserting page ' + (i+1);

      }

      t.end();

     

      // remove unused field

     

      this.removeField("txtFilename");

      app.endPriv();

    })

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 16, 2011 9:52 AM   in reply to jbaitis

    Thank you so much.  I love this solution on my PC.  Does it also work with Adobe on the Mac?  If so, how?

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points