Help: combine odd & even page PDF into one PDF with all pages...

I have a one-sided sheet feed scanner that scans to a PDF file. When I have a two-sided original, I have to scan the odd pages into one PDF, then flip and scan the even pages into another PDF. How can I create an Automator workflow, or Apple Script, or any method at all like a Folder action or even a UNIX script, to combine the odd PDF and even PDF into a single PDF with the pages in the correct sequence? Thanks for your help.

PowerMacG3Desktop/SonnetG4/1GHz/768MB/DVR106D/ACARDRAID66/TangoUSBFW/ATI9200/OS9, Mac OS X (10.4.11), 2.16 GHz MacBook Core2Duo/3GB/Samsung204B/Airport Exreme Base Station

Posted on Dec 7, 2008 8:45 PM

Reply
6 replies

Dec 8, 2008 1:37 AM in response to Glen Doggett

Automator on Leopard (10.5) has an action named "Combine PDF Pages" that'll do that when you choose to combine documents by "Shuffling Pages". I don't know if Tiger (10.4) has this.

Dec 8, 2008 9:56 PM in response to Community User

Yes, Tiger has this, it works, just one minor detail to address. I need to modify the action so that the even pages are put in reverse order. When I scan the odd pages the PDF is in the correct ascending order. When I flip the stack to scan the even pages, they are in reverse order. I could possibly create an Apple Script or try to create another action to reverse the pages of the even page PDF, then it should work the way I want it. I am really surprised that the printer software bundle doesn't include something like this.

Many thanks.

Dec 8, 2008 10:06 PM in response to BDAqua

Thanks BD. That looks like a good alternative for short PDF's, I am looking for a scriptable capability so I don't have to drag and drop pages in the correct order. I came across a demo version of PDFpen, a fairly well AppleScript-able app, and their tech support e-mailed me an Apple Script which was basically equivalent to the shuffle pages option of the Automator workflow action. I was able to edit their Apple Script to reverse the pages of the even page PDF and it assembles the two PDF scanned files in the correct order. It just requires some manual work to open the file in the PDFpen app, then run the Apple Script, then select the even page PDF. I am still trying to get a more turn-key package wrapped around this so it's easy enough that a Caveman can do it.

http://www.smileonmymac.com/pdfpen

P.S. - Now some of the latest multi-function duplex printers have duplex sheet-feed scanner capability so this wouldn't be a common issue for those with the newer units, but some of the older models, I just got an older refurbished Brother MFC-8660DN from Staples.com since it has OS 9 and OS X drivers, and it can only scan one-sided even though it can duplex print, the new models only have OS X drivers.

Dec 10, 2008 11:45 PM in response to Glen Doggett

Update: I figured out a way to do this with some of the utilities built-in to 10.4, although the PDFpen folks seem to have a good third-party solution as well.
- perl driving ghostscript, well GNU software installed via fink.
- a combination of a Folder Action script, and a customized version of the Combine PDF Automator action, which basically is a python script driving the CoreGraphics framework, join.py
/System/Library/Automator/Combine PDF Pages.action/Contents/Resources/join.py
in the shuffle function I made a simple change to add the second PDF pages in reverse order.

My plan is to set this up as a Folder Action using the convert postscript to PDF script as a template. The script should do nothing when there is only one file in the folder, but when the second file is added, move them to a "Processed folder" to empty the watched folder, and generate the new PDF with the odd pages PDF shuffled with the even pages PDF in reverse order. I will assume the order by date will put the odd pages PDF first and the even pages PDF second, since you would scan the pages face up first, then flip them to scan face down. I'll post back the scripts when I finish it in case anyone else might be interested. This will be a handy turn-key solution for dual-sided scanning with a one-sided scanner. I am kind of surprised that this particular solution hasn't been posted somewhere already, or if it is I just couldn't find it.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Help: combine odd & even page PDF into one PDF with all pages...

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.