**Function:** Converts any images selected in the foremost Finder window into PDFs (requires [ImageMagick](http://www.imagemagick.org/script/index.php)).
**Author**: James Fisher, Denison University
**Notes**: This workflow builds around the ImageMagick convert utility, it can be installed via [Fink](http://fink.sourceforge.net/). Otherwise, the heavy lifting of the workflow is performed by an AppleScript, so be prepared for a wait depending on the number of images selected. Please be aware that the processing path cannot contain spaces, so a new folder called "ImagestoPDFs" is created on the desktop for the final documents to reside in. Comments, constructive only, are always welcome. Enjoy.
*(Note that a number of actions in this workflow have broken folder paths that require correcting- Steve)*
Hi James
this workflow doesnt seem to be working for me.
i have ImageMagick installed.
While running the apple script, i get an error saying it cannot find ‘/sw/sbin/convert’
i have been trying to find the appropriate file on my mac, but it is nowhere on my system. i don’t know what package this file is supposed to be part of.
Any help/suggestion would be greatly appreciated.
With best regards
Maarten
Comment by Maarten — May 30, 2005 @ 11:21 am
Maarten: you need to have ImageMagick installed via Fink. If you install ImageMagick some other way, you need to change the path in the Run Applescript action.
Comment by Matt Moriarity — June 5, 2005 @ 1:44 pm
hello, thanks for the workflow. i started changing the applescript as it would not handle filenames with spaces, and eventually just created a script to do the whole job. here it is.
tell application “Finder” to set the selected_pics to selection
repeat with i from 1 to the count of selected_pics
set pic_item to (item i of selected_pics) as alias
set in_pic to POSIX path of pic_item
set out_pic to (removeExtension(in_pic)) & “.pdf”
do shell script “/sw/bin/convert” & ” ” & quoted form of in_pic & ” ” & quoted form of out_pic
end repeat
return selected_pics
end run
— remove extension
on removeExtension(in_pic)
set out_pic to {}
set AppleScript’s text item delimiters to “.”
return first text item of in_pic
end removeExtension
Comment by tanner — December 2, 2005 @ 3:26 am
Matt,
I like the look of this workflow.
It looks like Fink doesn’t want to install on my OSX Tiger. In which case, how would I change the Run Applescript action to the Desktop, or somewhere.
Thanks,
AAron
Comment by AAron — January 6, 2006 @ 2:16 pm
Hi,
Preview.app already has the capacity to convert images into pdfs by doing a “print to pdf” of the image. Would it be possible to remove the dependency on fink’s imagemagick by writing an app that just used Preview?
Comment by algal — August 21, 2006 @ 4:01 am
Just realized that Apple provides an example of using CoreGraphics to convert an image to a pdf in
/Developer/Examples/Quartz/Python/image.py. This would probably be the place to start writing an Automator action that did so.
Comment by algal — August 21, 2006 @ 4:18 am