This question came from a friend. In an effort to archive old photography journals he cut their back of and then scanned them; odd pages first followed by the even. So once everything was scanned, he was left with two pdfs one containing the odd pages (1, 3, 5, ...), and one the even pages (2, 4, 6, ...). He wanted know to merge the pdfs in a way that the the resulting will be 1, 2, 3, ... Of course you can do drag and drop in preview and with some copy past you are done. However his magazines were too big and doing this for 150 pages, was time consuming and worst of all he had to make it for many many magazines. He asked me how and immediately I thought of Automator, the very lightly used utility that sits around in you Application folder. Yeah, the one with the robot. So that thing can be used to automate processes either by recording your steps or by programming. So let 's see how it is used here. We need to be able to select the files, and then combined them by taking one page of each, putting them in order to make a new file, that will be moved on the desktop and named as final Document.
Start
Automator and you will be greeted by the nice screen that ask you what would this be. In this case I just select Custom.

Once done find the finder icon that has all the files and folders commands and the one on the top is for "
Ask for finder items". We will need two of those, one for odd (item 1) and one for even (item 2).

Once that is done we can continue with the
pdf merging. Form the Library panel select
pdf and then "
Combine PDF pages". Notice there an option Append and Shuffle. Append will add the second document to the end of the first. Shuffle will take the first page of the first document, add the first page of the second document, and continue with the second page of the first document etc... just like a casino dealer shuffles card.

Notice here that the various elements of the work flow are interconnecting. That means that the initial elements of each step are results of the previous one. Once this is done we need to take the file from the temporary place that is stored and move if to the Desktop (or anywhere you wish to) and rename it to Final Document (or any other name). For that we need to more functions from the the library the Move and Rename and we add them. Not really in any particular order.

Now click run and you are done! Well almost. Once you open the document in Preview you will see that it is rotated by 180 degrees (upside-down) . That is a common bug in the
Automator work flow easily fixed by the tools menu of Preview by consequently rotate the document.

No comments:
Post a Comment