Skip to main content
Participant
February 20, 2008
질문

Combining an even pages file and an odd pages file into one PDF achieving propper order

  • February 20, 2008
  • 12 답변들
  • 154345 조회

Hello all!

I have several documents that were scanned (in another application) using an autofeed scanner yielding one file for all frontpages (odds) and one file for all backpages (evens). I have these two files in PDF with comments on them. I would like to be able to combine the two files and achieve the right page ordering without doing it manually. Is there any way or script that may do this? I.e. insert page 1 from evens.pdf after page 1 from odds.pdf, page 2 from 2 (or 4 in real document) from evens.pdf after page 2 (3) in odds.pdf and so on?

Any advice on how to achieve this while retaining comments on both documents will be greatly appreciated.

Sincerly;

Santiago

12 답변

JR Boulay
Community Expert
Community Expert
September 30, 2025

[MOVED TO THE ACROBAT DISCUSSIONS]

Acrobate du PDF, InDesigner et Photoshopographe
Participant
January 21, 2017

Create Odd folder Save As (Export) Book.png. Create Even folder Save As (Export) Book.png. Copy the contents of the Odd folder into the Even folder. Copy, but keep both files. You will have Book_Page_001.png and Book_Page_001 (2).png (the Odd counterpart). Combine all the files in the directory into a single PDF and BAM there you have it.

Participant
November 12, 2015

Yes, Ideasmith gave the only true usable method, the other are talking greek. Well, the is a software called pdfsam it is free for mac or windows and it has a very simple option called "alternate mix", you do not have to split your file into single pages, you just take the two files and say: I want you to mix them, this is the odd and that is the even. Simple as apple pie. It astounds me why acrobat does not feature such a solution.

Participant
April 16, 2015

Got crazy by this problem but this is the answer, so simple.
Download program and run alternate mix. Done!

PDF Split and Merge | HowTo use the Alternate Mix

Participant
January 23, 2013

Not to knock on Adobe, but until they figure out that this function is needed (this thread has been around for 4 years, do they read these things), you can use this:

http://sourceforge.net/projects/pdfsam/files/pdfsam/2.2.2/pdfsam-x64-v2_2_2.msi/download

It does exactly what you are asking for, and it is free.  Once it is open, select "alternate mix".

There are many other functions too.

Adobe, if you are reading this, please compile your programs for Linux to please.

dbatrpazr
Participant
August 19, 2014

Took me about an hour of googling and trying different options. Honestly I don't really know what a java script is so the best option for me was a program that could do this. Just use alternate mix like he said. Cheers

Thank you LarrySmith1000

PDF Split and Merge | Free Business & Enterprise software downloads at SourceForge.net

http://sourceforge.net/projects/pdfsam/files/pdfsam/2.2.2/pdfsam-x64-v2_2_2.msi/download

Participant
August 7, 2011

OK, I JUST FIGURED OUT HOW TO DO THIS

Adobe Acrobat X Pro (may work with others also)

File

Create...

From Scanner...

Black and White (or another option)

Now scan the pages you have in order (pages 1,3,5,7.....)

when you are done it will give you three options

1. done

2. continue with more pages

3. continue with reverse sides

Select the third option to add the reverse sides of the pages.

Place the stack of papers to start from the last page first, and press scan again.

It will place the pages in the appropriate section of the document.

Hope this helps.  Good luck.

Participating Frequently
October 31, 2009

I've attached a script that adds two menu items into the "Tools" menu. "Collate" merges even and odd pages, and "Reverse" will as reverse the order of the pages in a PDF.

To install it, exit Acrobat. Save the script into Acrobat's Javascripts directory (e.g. C:\Program Files\Adobe\Acrobat 8.0\Acrobat\Javascripts ), and restart Acrobat.

I hope you find this script useful!

Participant
September 29, 2011
  1. CollatePages.js (1.9 K)

was downloaded and placed in the following folder:

C:\Program Files (x86)\Adobe\Acrobat 9.0\Acrobat\Javascripts

It worked as described by “JBAITIS”.

Had to open first  the PDF file having ODD pages, in Acrobat9.

Next from “TOOLS”  selected “COLLATE”.

After a brief error message,  the name of the second PDF file having all EVEN pages was selected.

Clicked OK and done!

NB: for “COLLATE” to work you have to open a PDF file first, preferably the odd-pages PDF file.

Thank you “JBAITIS” for a GREAT and essential time-saver program, and thank you all.

Dan

Rowan!
Known Participant
October 27, 2012

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();

})


Wowie wow! This is what I've been pulling my hair out over for ages! Thank you so much for this JavaScript script. It works wonderfully and since I just wrote up a file for myself on installing and using it on a Mac, I thought I'd just copy/paste it here for other Mac users who are using Acrobat Pro X and need to collate their files. Hope this helps other Mac users:

So, for Macintosh users, there are Two Big Steps:

Big Step 1:

The CollatePages.js file has to be placed in

~/Library/Application Support/Adobe/Acrobat/10.0/JavaScripts

folder. To create the file, you can simply copy the script above then paste it into Textedit (make it a plain text file). See important note 2 below for naming it.

Five Important Notes:

  1. If you can't see the Library folder, then in the Finder, use the Option Key to select the Go menu: the home Library folder appears, which will get you into the home library folder that is normally not visible.
  2. At least for Acrobat X Pro, it can be copied and pasted into a file unaltered and it works without a problem. It doesn't really matter what the file is called just be sure to name it as a .js file, not as a .txt file.
  3. Be aware that an upgrade may make the file go away or no longer be read from the 10.0 folder! You can tell it's gone when the Collate & Reverse commands are missing under the Edit menu:
  4. If installing after an upgrade, then it's likely the folder '10.0' will have changed. The important note is to get the file into the JavaScripts folder that Acrobat Pro reads on startup. I'm saying that here because Acrobat Pro XI is (soon to be) out so it's likely the folder will change.
  5. Last, be sure to enable JavaScripts in Acrobat Pro itself: Under Acrobat -> Preferences, scroll down in the left Categories column to JavaScript (click that). On the right side under JavaScript, be sure the first two items: "Enable Acrobat JavaScript" and "Enable menu items JavaScript execution privileges" are both checked.

Big Step 2:

In Acrobat Pro, you collate two files: The odd pages file needs to be already open and the even pages file is opened using the Collate command (now under Edit in the menubar as the picture in Note 3 above shows). The file that gets added (presumably the even pages) gets interweaved with the first (already open) file starting at the second page.

If you have separate files for each page (either because they were scanned in separately or they were extracted within Acrobat to separate files) then you first need to combine them into one file for odds and evens.

The Reverse command simply reverses the page order of the open file; possibly helpful if a source file has its pages in the opposite order before collating.

Last, you could, if you want to, click on Yes (this was helpful) below.

Participant
June 13, 2009

There is a simple application I wrote, which provide a solution for that
problem exactly. It is completly free, although you are more than

welcome to donate in the site :-)

Participant
February 20, 2008
Wow!!!!!!!

You guys are amazing!! Sweet deal, really appreciate it! would love to look into the BV scripting, but got a Master's thesis to finish.

Thank you guys so much!
Patrick_Leckey
Participating Frequently
February 20, 2008
Bernd's answer is certainly better for a scripting beginner.

Gotta love German efficiency.