• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

New Here ,
Feb 20, 2008 Feb 20, 2008

Copy link to clipboard

Copied

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
TOPICS
Acrobat SDK and JavaScript

Views

137.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 02, 2013 May 02, 2013

Copy link to clipboard

Copied

@Mark Cramer

Did you ever get the script to work?  I have been reading the trail of your efforts and need to do the same thing.  If you have any updates could you post? Or if Gkaiseril or Test Screen Name have additional comments or directions they would be appreciated, 

  Thank you

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 02, 2013 May 02, 2013

Copy link to clipboard

Copied

@krazykat10 - Unfortunately I was never able to get it to work. I tried all of the suggestions above and then monkeyed around with it a bit more before giving up.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 03, 2013 May 03, 2013

Copy link to clipboard

Copied

You can not just cut and paste the text for many reasons.

Like the old joke about the IBM repairman the walks to the computer. He runs his hand over the side of the computer. Pulls a hammer out of his tool box and taps the side of the computer.

The IS manager says, "I could have that!"

To which the repairman states "It is not in hitting the computer, it is knowing where to hit the computer!".

If the scripts are installed in the directory needed by your version and not necessarily the one in the article.

Also one cannot use Word for editing the text.

If you want more help more specific information is needed as to what exactly is not working, any pop up warnings, and any JavaScript errors.

One of the scripts adds a menu option, so you need to install that script in the "JavaScript" folder for the version of Acrobat that you are using.

These scripts can only work in Acrobat.

Look at PDFtk and the shuffle operation to collate pages. There are even more options than provided by the scripts/

If at 60+ and no computer training in college and not an IT professional, if I can figure this out, you should be able to resolve it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 03, 2013 May 03, 2013

Copy link to clipboard

Copied

@GKaiseril What version of Acrobat do you have? I have Acrobat 11 and I think that might be the issue. By the way, I hit my computer with a hammer and that did not help. Thank you for your continued assistance! I kind of gave up hope earlier, but I've got a 50-page document that needs collating so I'm willing to give it another try. (I'm still irritated that this isn't a standard feature, but hey...)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 03, 2013 May 03, 2013

Copy link to clipboard

Copied

Have systems with version 8, 9, X, and XI.

There are features that are far more needed than a collation tool.

For the project I needed this for, I ran it through the JavaScript console.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 03, 2013 May 03, 2013

Copy link to clipboard

Copied

@Gkaiseril - So with Acrobat XI, what happens when you get to the "Set document actions" button? Here is what I said previously when I got stuck. I have no idea how to go from there.

Mark Cramer wrote:

I found the JavaScript button which has a button "Set document actions". When I press it I get a box that says, "When this happens..." with options like "Document will close" and "Document will save." I opened up a couple of them and pasted in the JS and tried to run it, but nothing happened.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 03, 2013 May 03, 2013

Copy link to clipboard

Copied

Do not use the "Set Document" actions. These actions are for use when printing, opening, saving, or closing a PDF. They have nothing to do with combining PDFs and I do not see were they are appropriate.

If you get the scripts in the correct folder for your version of Acrobat, you should see the added buttons under the "Edit" menu option.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 03, 2013 May 03, 2013

Copy link to clipboard

Copied

Holy cow! I'm finding this a little hard to believe, but I got it to work. With Adobe XI the folder is C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\Javascripts. I just copied the script above, saved it as collate.js and voilà. Amazing. Thank you, GKaiseril, for all the help! I'll put my hammer away now.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 21, 2013 May 21, 2013

Copy link to clipboard

Copied

Hello, it sounds like the javascript solution will suit most people, but it is possible to do it yet another way!

For instance, you have scanned a book two pages per pdf page.

Create directories "odd" "even" and "output".

You crop all the odd pages and extract all pages to the odd directory as separate files.

Undo the crop, then crop all the even pages and extract all pages to the even directory as separate files.

The file prefix must be the same for the odd and even pages, which is why I use undo and recrop.

Select "Add Bates Numbering" under pages, edit page design.

Select the "odd" directory and output to the "output" directory. Add a zero to the original file name in output options.

Select the "even" directory and output to the "output" directory. Add a one to the original file name in output options.

You should have in the output directory pages in pairs like, mybook 10.pdf mybook 11.pdf, mybook 20.pdf mybook 21.pdf.

If you select "Combine Files" in Acrobat and select the "output" directory, they will appear in order.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 07, 2013 Jun 07, 2013

Copy link to clipboard

Copied

Thanks to misc_fruitbat for the great idea.....some of the steps got me messed up as I was unfamiliar with the command. I manged to experiment and was successful. Am adding these pictures as guides, so others may benefit from the bates processing method

I started out with a 75 pages A4 landscape, company instruction manual. The final PDF file is 150 pages with the odd and even pages correctly in sequence.

You may need to click on each picture to see the full image....

Extracting to single pages

http://i.imgur.com/isFeocw.png

Bates Numbering process - adding all the pdf in a folder

http://i.imgur.com/AE69ZsH.png

Odd pages bates numbering processing

http://i.imgur.com/3bhEdmJ.png

http://i.imgur.com/zjugDSr.png

Even pages processing

http://i.imgur.com/SvH1Cmz.png

Combining the output folder with correct arrangement of the odd and even pages

http://i.imgur.com/kN9aRep.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 05, 2013 Aug 05, 2013

Copy link to clipboard

Copied

@ Ideasmiths: Thanks a lot for the imaging instruction. It helps a lot!

However, my Acrobat 9 Pro does not turn out to be a correct arrangement of the file names, whenever the names end with pure numeric numbers like B1, B2, B3…B12.  I mean, no matter in window “Combine Files” or “Bates Numbering”, my files are automatically listed in a wrong order like B1, B10, B11, B12, B2, B3, … , rather than B1, B2, B3,…, B12 as shown in your images. I clicked the Name column tab trying to sort them, but useless. You know, one cannot move EACH up & down manually into a correct order, if the total files are up to hundreds or thousands. It's so frustrating.

Could you or any other expert give me some solutions to fix this please?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 05, 2013 Aug 05, 2013

Copy link to clipboard

Copied

You didn't mention your windows operating system so I guess it's XP or vista? Because from your description it sounds like  the sequence of the files are 'wrong' when viewed in window explorer either using list or detail views. Normally this should be A1, A2....A10, but you are seeing A1, A10, A11.....A2, A21...etc

This then may not be the issue with Acrobat 9 but the windows operating system?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 05, 2013 Aug 05, 2013

Copy link to clipboard

Copied

Thanks for your reply.

My operating system is Windows 7.  And the sequence of these numeric-named files are in right order when they are in a file folder on my computer. I guess the problem is still from my Acrobat 9 Pro.  But I don't know how to fix it. Appreciate if you could help.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 05, 2013 Aug 05, 2013

Copy link to clipboard

Copied

Most software will see files in the order you state (B1, B10, B11, B2). This is simple alphabetical order.

Some software uses more sophisticated ordering, splitting up the files into mixes of strings and numbers. This includes Windows when it shows files, but that doesn't mean the files are actually in that order only that Windows shows them in that order.

For reliable processing, use numbers of the same length throughout: B01, B02, B10, B11 where the highest number is 99, B0001, B0002, B0010, B0011 where the highest number is 9999 etc.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 06, 2013 Aug 06, 2013

Copy link to clipboard

Copied

Thank you for the response.

However, it'd be too much laboring work for one to manually change each file name as you stated -- especially when the total files are up to thousands. And I guess it's not what the Acrobat 9 Pro software means to.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 15, 2016 Aug 15, 2016

Copy link to clipboard

Copied

Thanks! It worked for me but can we make this permanent??

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 15, 2016 Aug 15, 2016

Copy link to clipboard

Copied

One  needs to place the code in one of 2 very specific folders that varies by Operating System, product, and version. This information has been provided in some of the above post or the linked pages.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 02, 2015 Nov 02, 2015

Copy link to clipboard

Copied

Do you have an updated script for Acrobat 2015?

Thanks in advance

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 03, 2015 Nov 03, 2015

Copy link to clipboard

Copied

At the beginning use this:

  app.addToolButton({ cName: "Reverse", cLabel: "Reverse", cExec: "PPReversePages();", cEnable: "event.rc = (event.target != null);"});

  app.addToolButton({ cName: "Collate", cLabel: "Collate", cExec: "trustedCollatePages();", cEnable: "event.rc = (event.target != null);"});

In Acrobat use Tools > Add-on Tools

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 30, 2017 Nov 30, 2017

Copy link to clipboard

Copied

LATEST

Bernd, you rock! This worked perfectly in my Acrobat DC and saved HOURS of time! Thank you!!!!!!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 31, 2011 Oct 31, 2011

Copy link to clipboard

Copied

jbaitis's js file is an Excellent job, if I may!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 21, 2013 Jan 21, 2013

Copy link to clipboard

Copied

jbaitis, your script is exactly what I've been looking for.  Do you have paypal as I'm feeling the need to make a small monetary contribution.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 21, 2013 Jan 21, 2013

Copy link to clipboard

Copied

Hi Earthmag!

Thank you for offering to contribute. May I request that you contribute to some of my favorite software-related organizations:

  • Software in the Public Interest ( spi-inc.org )
  • Free Software Foundation ( fsf.org )
  • FreeBSD Project ( freebsd.org )

or any allied academic institution? That would be the best way of saying "thanks" with $$$ that I can think of! 🙂

Please note that I am not the original author of either of the scripts -- I merely made them a little easier to install and to use.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 07, 2017 Oct 07, 2017

Copy link to clipboard

Copied

My hero. Worked perfectly.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 06, 2011 Aug 06, 2011

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines