Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: Use Automator to combine PDFs System 10.4
Tiger only hintThere have been numerous hints here about how to combine PDFs into a single document. Well, Automator now handles that task very nicely. You can select the documents that you want to combine in the Finder and then Control-click on them to bring up the contextual menu. Choose Automator -> Create Workflow. Once Automator opens, add three steps to your Untitled workflow:
  1. Finder: Get Selected Finder Items. Actually, this one is automatically added if you had the files selected in the Finder.
  2. PDF: Combine PDF Pages (I choose Appending pages).
  3. Finder: Open Finder Items (Open with Default Application).
This will combine everything, then open up a Preview document with all the PDF pages nicely laid out in one document. You can save the workflow if you do this on a regular basis. Then Control-clicking on a group of PDFs will give you a contextual menu with your workflow ready to go.
    •    
  • Currently 3.62 / 5
  You rated: 3 / 5 (13 votes cast)
 
[92,798 views]  

10.4: Use Automator to combine PDFs | 25 comments | Create New Account
Click here to return to the '10.4: Use Automator to combine PDFs' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Use Automator to combine PDFs
Authored by: mm2270 on Jun 16, '05 10:58:19AM

Nice hint. The only thing I can see that I don't like about it is that I can't specify the order I want the files to combine in. I tested it with a few PDFs, and it didn't seem to make a difference which order I selected the files in in the Finder. They always combined in a certain fashion- one which I didn't want them to.

Anyone know of a way to control that? If so, this will be very useful.



[ Reply to This | # ]
10.4: Use Automator to combine PDFs
Authored by: rpcr on Jun 16, '05 11:52:10AM

Have you tried renaming them so that they begin with a number? I would imagine that they are passed in alphabetical order from the Finder.



[ Reply to This | # ]
10.4: Use Automator to combine PDFs
Authored by: drewk on Jun 16, '05 11:52:46AM
Insert the Automator action "Finder / Sort Finder Items" and select the criteria to sort on. You can sort by name, time, keyword, label, etc.

So you workflow would be:
  • Finder / Get Selected Finder Items
  • [Inserted Step] Finder / Sort Items (Set the 'By' and ascending/descending appropriate to your files to combine)
  • PDF: Combine PDF Pages (Option: Append)
  • Finder / Open Finder Items

    This assumes that some form of sorting of your files delivers what you want your final PDF order to be. If not -- check into the Automator Finder Rename route.

    --drewk--

    [ Reply to This | # ]
  • 10.4: Use Automator to combine PDFs
    Authored by: legacyb4 on Jul 05, '05 11:32:36PM

    Beautiful. That worked like a charm.

    My first use of Automator and I'm amazed at how easy it is...



    [ Reply to This | # ]
    10.4: Use Automator to combine PDFs
    Authored by: Nimitz on Jun 16, '05 07:07:05PM

    Actually, in my case, alphabetical order works.

    For a customer, I changed his FileMaker Pro application: in addition to printing an offer, he can now generate pdf's of the singlepage offercover, multiple page offercontent and accompagnying single page orderform. After combining these pages, he can mail this PDF to his customer.

    And all that in Automator!
    1) in Filemaker, preset "Print to PDF" for the different parts you want to print (even if not in the same database-file) (use the scripter wisely)
    2) still in the FMP scripter, put the output in a folder like "Current Offer", and take care that each printeable part is called "A.pdf", "B.pdf", ...
    3) Add a folder-automation script to that "Current Offer"-folder which combines the pdfs, renames it and makes a mail with that file in attachment.

    If your customer sees you creating something like that in less than 15 minutes, you'll get a lot of respect.

    ---
    -----------
    The Nimitz



    [ Reply to This | # ]
    10.4: Use Automator to combine PDFs
    Authored by: gytorom on Aug 02, '05 08:10:03PM

    You an get some some control over arranging the pdfs as you would like by adding the finder action "sort finder items" between "Get specified finder actions" and "Combine PDF pages."



    [ Reply to This | # ]
    10.4: Use Automator to combine PDFs
    Authored by: christian.v on Jun 16, '05 11:05:12AM

    Works fine within Automator, but I can't get the saved workflow appear in the contextual menu...
    Any hint ?



    [ Reply to This | # ]
    10.4: Use Automator to combine PDFs
    Authored by: gaudior on Jun 16, '05 12:21:56PM

    I believe you have to Save As... Plugin



    [ Reply to This | # ]
    10.4: Use Automator to combine PDFs
    Authored by: dlong on Jun 16, '05 12:24:33PM

    Save As in workflow format, and store it in ~/Library/Workflows/Applications/Finder/ and it should show up :)



    [ Reply to This | # ]
    10.4: Use Automator to combine PDFs
    Authored by: christian.v on Jun 16, '05 12:49:44PM

    It works !
    Thanks



    [ Reply to This | # ]
    10.4: Use Automator to combine PDFs
    Authored by: tciuro on Jul 31, '05 07:44:51PM

    Yes, if saved to ~/Library/Workflows/Applications/Finder it definitely works. However, I wish it could be also stored in /Library/Workflows/Applications/Finder. This way all users could benefit from the Workflow and it would be way easier to administer.



    [ Reply to This | # ]
    PDFLab will do the same thing
    Authored by: Tulse on Jun 16, '05 12:33:35PM
    The donationware PDFLab will combine PDFs into a single document, and allow some other manipulation as well. And you can specify the order the files are to be joined, just by dragging them into the file list. Automator is way cool, and I had no idea it could do this, but there are better tools around for this specific task.

    [ Reply to This | # ]
    Members only?
    Authored by: aixccapt99 on Jun 16, '05 08:19:00PM

    This hint appears to be members-only for some reason. It did not appear on the main page while I was not logged in, and though it did appear in the RSS feed, when I followed that link I got a "members-only" message.

    What's up with this?



    [ Reply to This | # ]
    Members only?
    Authored by: osxpounder on Jun 21, '05 04:11:15AM

    I'd like to know, too. I use the site's email feature to send links to good hints here often, several times a week [at least]. It'd be a drag to find they can't see a hint without joining. Seems like you'd rather have the traffic than not. I'm guessing this is a bug ....

    ---
    --
    osxpounder



    [ Reply to This | # ]
    Members only?
    Authored by: robg on Jun 21, '05 11:14:12PM

    Sorry about that; sometimes, it seems, Geeklog arbitrarily drops the Anonymous access on stories. I try to catch them all, but I sometimes miss.

    It's fixed now.

    -rob.



    [ Reply to This | # ]
    Members only?
    Authored by: osxpounder on Jun 23, '05 09:49:25PM

    Rob, you are swell.

    ---
    --
    osxpounder



    [ Reply to This | # ]
    10.4: Use Automator to combine PDFs
    Authored by: tciuro on Jul 24, '05 11:06:31AM

    Combining pages creates a document in /tmp. Is it possible to retrieve (or better yet, set) the name of the document?

    I'd like to combine several PDF documents and send them using Cocoa. The problem is that I need the path, and the name is always set randomly.

    Thanks!



    [ Reply to This | # ]
    10.4: Use Automator to combine PDFs
    Authored by: ptsii on Aug 10, '05 10:00:47PM

    I don't know what Automator you all are using, but this hint doesn't work for me at all.

    First problem:

    The step "Finder: Open Finder Items (Open with Default Application)." refuses to connect to the output of the previous step ("Combine PDF pages"). The help file says to 'choose "Use results from Previous Action" from the pop-up menubar'. The popup menubar does not give that as a possible option. It only allows for moving it to a different position (e.g., "Move before Get Selected Finder Items"), disable, rename, or delete. Sorry, but no "use results from Previous Action". What is up?

    Second problem:
    I tried replacing 'Open Finder Items..." with "Launch Application" (for which I selected Preview). This connects automatically with the output of the "combine..." step, but when I run the workflow, it executes with no errors, opens preview, but displays nothing. No file appears to be created on the disk (as far as I can tell).

    Any thoughts about what I'm doing wrong?



    [ Reply to This | # ]
    10.4: Use Automator to combine PDFs
    Authored by: arnski on Aug 11, '05 07:23:12AM

    I have the exact same Problems - the output of "combine pdf" does not fit the input of "open finder items".. so i won´t get a new pdf-document!
    Even a spotlight search reveals no combined document anywhere on my mac.

    Help appreciated!



    [ Reply to This | # ]
    10.4: Use Automator to combine PDFs
    Authored by: después on Oct 16, '05 04:53:32AM
    Yes, the "Open Finder Items" doesn't seem to accept the combined pdf output, in Automator. But when I run the workflow, it does what it's supposed to do and passes the combined file to Preview which is a PDF in a temporary folder with a temporary name. I can then save it within Preview with another name or copy it with Finder to where I want to have it.
    Maybe there could be other, more automatic ways of doing things but for me that's enough, I'm not doing it every day;)
    Spotlight doesn't reveal the temporary PDF because it is in a hidden folder, in which Spotlight doesn't index at all.
    If it really doesn't work for you, you could watch the /tmp folder while you're combining the PDFs. That's a hidden folder, but you can easily step inside with the Finder, Go > Go to Folder... and just write there /tmp.

    [ Reply to This | # ]
    10.4: Use Automator to combine PDFs
    Authored by: meirw on Apr 03, '06 01:32:11PM

    With all the talk about combining PDF's - does anyone have any ideas of how to extract the pages from a multi-page PDF.



    [ Reply to This | # ]
    10.4: Use Automator to combine PDFs
    Authored by: alexclst on Sep 19, '07 06:23:09PM

    Yes, there is. From what I can tell do the same as these instructions, just use the "Extract Odd & Even Pages" PDF action instead of the "Combine PDFs" action.



    [ Reply to This | # ]
    10.4: Use Automator to combine PDFs
    Authored by: SMITEE on Feb 14, '10 02:57:57PM

    Here's a great solutions too http://www.apple.com/downloads/macosx/automator/combinepdfs.html

    I set-up the Automator solution right after I upgraded to Snow Leopard. It was working great but just today magically disappeared as an option in the control + click menu. Now trying to set it up again according to this tutorial I don't have a /Workflow folder in my ~/Library. Given I don't know how I got it to work the 1st time and I can't set it up right this time I'm just sticking with the downloaded solution from the above link.



    [ Reply to This | # ]
    10.4: Use Automator to combine PDFs
    Authored by: billpenn on Jan 15, '13 10:28:58PM

    Here is something a little more robust that is completely automatic and places the resulting combined pdf in the containing directory of the file or folder you pass into automator via a service in the right click contextual menu in the finder:

    1. Create a new service in Automator
    2. Set the Service to receive files and folders in Finder.app
    3. Set Value of Variable: Input
    4. Run AppleScript

    on run {input}
    tell application "Finder"
    set theFilePath to (container of (first item of input)) as alias
    end tell
    return theFilePath
    end run

    5. Set Value of Variable: Path
    6. Get Value of Variable: Input (set the option to ignore input)
    7. Get Folder Contents
    8. Sort Finder Items by name in ascending order
    9. Combine PDF Pages: Apending pages
    10. Move Finder Items: to Path
    11. Rename Finder Items: Name Single Item Name Basename only to _Combined



    This packs together all the selected pdfs in finder or all the pdfs in a folder selected in the finder and places the result in the folder enclosing the selected finder item(s) with the name "_Combined.pdf" The files are combined in alphabetical order by their file name.

    Once saved, the service will show up at the bottom of the contextual menu in Finder.



    [ Reply to This | # ]
    10.4: Use Automator to combine PDFs
    Authored by: ophello on Jul 18, '13 10:30:11AM

    I was not able to get this to work. Could you please post a screenshot of your workflow? I copied this exactly and I keep getting the PDF to output to the desktop.



    [ Reply to This | # ]