10.4: Use Automator to combine PDFs | 25 comments | Create New Account
Mac automator combine images If you have a Mac, you can use Automator to consolidate two or more PDF files into a single PDF file. Consolidating files.Use Automator to combine your research photos into one PDF. July 4, 2012 July 4, 2012 Miriam History. If you have a Mac, you own a robot! First, you need a way to feed Automator the files you want it to alter.
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.
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.
Anyone know of a way to control that? If so, this will be very useful.
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.
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--
So you workflow would be:
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--
Beautiful. That worked like a charm.
My first use of Automator and I'm amazed at how easy it is...
My first use of Automator and I'm amazed at how easy it is...
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
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
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.'
Works fine within Automator, but I can't get the saved workflow appear in the contextual menu...
Any hint ?
Any hint ?
I believe you have to Save As... Plugin
Save As in workflow format, and store it in ~/Library/Workflows/Applications/Finder/ and it should show up :)
It works !
Thanks
Thanks
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.
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.
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?
What's up with this?
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
---
--
osxpounder
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.
It's fixed now.
-rob.
Rob, you are swell.
---
--
osxpounder
---
--
osxpounder
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!
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!
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?
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?
![Text Text](/uploads/1/2/5/2/125228100/402129645.png)
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!
Even a spotlight search reveals no combined document anywhere on my mac.
Help appreciated!
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.
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.
With all the talk about combining PDF's - does anyone have any ideas of how to extract the pages from a multi-page PDF.
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.
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.
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.
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.
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.
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.