Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jpblevins

macrumors newbie
Original poster
Nov 3, 2013
1
0
I have 2000 jpeg images, each with its' own title. I want to batch convert them to pdf format while keeping each individual title. Is this possible with my iMac? I know how to convert an individual document in "Print" or "Save As" but it will take far too long with this many documents. Automator turns all images into one pdf with one title. Any assistance would be appreciated!

JB

iMac 2008
Snow Leopard OS
 
You can with Adobe's Acrobat Pro software. At $381 it is probably more than you wanted to spend. But if working with PDFs, it might make sense to own. I myself got pretty far with the free tools that are available, but ended up buying Acrobat Pro for max compatibility and efficiency.

http://www.adobe.com/products/acrobatpro.html


B



I have 2000 jpeg images, each with its' own title. I want to batch convert them to pdf format while keeping each individual title. Is this possible with my iMac? I know how to convert an individual document in "Print" or "Save As" but it will take far too long with this many documents. Automator turns all images into one pdf with one title. Any assistance would be appreciated!

JB

iMac 2008
Snow Leopard OS
 
Well it's probably not the fanciest thing ever but yeah I was able to write up a combination of a bash script and automator app that can process any number of pictures into individual pdfs.

Basically all it is a automator app that follows this workflow

1) Echo input
2) Save input as a variable FullFilePath
3) Get the file name without extension from that using basename
4) Save that as a variable FileName
5) Make new desktop folder for output
6) Get the FullFilePath variable
7) Convert that to a pdf
8) Save it with the name Converted.pdf on the Desktop
9) Rename that using the FileName variable to 'some file name'.pdf (obviously some file name is the name of the the original file minus the original extension and base path)
10) Move the renamed file to the desktop output folder

Next I made a shell script that takes a Folder as an argument and recursively runs the above application on every file in that folder and all it's sub folders.

Code:
#!/bin/bash

dive(){
	FILES="$1"
	for f in "$FILES"/*
	do
	  if [ -d "$f" ]; then 
	  	dive "$f"
	  else
	  	echo "Processing $f file..."
		open -a ~/Desktop/demo.app "$f"
	  fi
	done
}

dive "$1"

How to then run the process is something like this in terminal:

Code:
/Users/w0lf/Desktop/pdf.sh /Users/w0lf/Desktop/untitled\ folder

With output something like this:

Code:
Processing /Users/w0lf/Desktop/untitled folder/Screen Shot 2013-11-03 at 1.36.08 PM.png file...
Processing /Users/w0lf/Desktop/untitled folder/untitled folder/Screen Shot 2013-11-03 at 12.58.08 PM.png file...


Note1:
Doing this for 2,000 items might not work great. I'd start by testing with like, 10 then 100 then 1,000.

Note2:
You can also simply drag any number of images (has to be at the same time) onto the demo.app if you just want to merge them into one .pdf

Attached is a zip archive of the:
1) workflow
2) built app
3) shell script
 

Attachments

  • Archive.zip
    1.7 MB · Views: 113
Why not use preview? click in the thumbnail tray, choose Edit->Select All, then File->Print Selected Items. In the print dialog, choose the PDF button, then select the Save as PDF item. You'll be asked where to save the file, and you're done.

Can't guarantee it won't crash with 2000 images tho.
 
Why not use preview? click in the thumbnail tray, choose Edit->Select All, then File->Print Selected Items. In the print dialog, choose the PDF button, then select the Save as PDF item. You'll be asked where to save the file, and you're done.

Can't guarantee it won't crash with 2000 images tho.

Because he doesn't want them to be merged into one mega pdf.

I want to batch convert them to pdf format while keeping each individual title. Is this possible with my iMac?
 
GIMP has a batch image manipulation feature, but it doesn't seem to be able to convert to PDF. Weird because you can save to PDF normally.
 
Here's how I convert a batch of jpg files to a pdf with preview.

In Finder, select all the files you want to combine in a PDF.
Right click on any one of them and choose Open. All the files should open as a PDF in Preview.
In Edit, click on Select all to select all the files in the left-hand thumbnail window.
In File, click on Print and then choose Save as PDF in the PDF dropdown window.
In the pop-up, give your PDF a name and where to save it to (I save to desktop and then put it where I want it.)
Click on the Save button and that's it.

Works for me every time.
 
Just asking, but why would anyone want to convert a load of jpegs to pdf's? I can't imagine why anyone would want to do that?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.