I had twenty 2500x3300 TIFFs I wanted to turn into a single PDF, one image per page. I didn't want to load them one-by-one into a Word document. Trying the straightforward fink-installed ImageMagick command "convert *.tiff output.pdf", my 1.5 GB RAM machine immediately began swapping and 10 minutes later it still hadn't finished. I wrestled with Preview, but I couldn't figure out how to get it to print multiple images at once. I even looked at CL-PDF, but it didn't seem to support TIFF images.
I was reminded that Apple ships a Python CoreImage wrapper, with some example scripts that convert images to PDFs and turn collections of text documents into multi-page PDFs, so I combined a couple examples. The script took 9 seconds and gave me a beautiful PDF.
The final script, docs2pdf.py, should run on any later version of OS X, and will create a PDF from a sequence of text, HTML, RTF, .doc, and image files, one per page.Posted by jjwiseman at December 13, 2005 10:35 AM