I suspect that there are Cocoa frameworks that would let me import PDF and export JPEG, but I'd rather not go that way if I can help it.
Question:
What's the simplest way to solve this (ie, mechanically convert PDF files to JPEG (or GIF or ...) format?
--As for the rest, it is mine.
If you are using Panther, you can use Apple's 'sips' commandline program to do this. It is seriously under-documented, but it works well. (Though it doesn't handle transparencies. Not a problem if you are converting to JPEG, which doesn't support them.)
I've successfully used this line in a Perl script to convert images:
`sips -s format $ext $imagefile --out $imagedir 2>&1`
where $ext is the extension of the file type you want to convert to,
$imagefile is the name of the file to be converted, and $imagedir is the directory or output image name.
The only documentation available is from the commandline: type 'sips -h' for usage help and 'sips -H' for lists of properties that are supported.
Daniel T. Staal
(Note: if anyone wants to help *me* use the Cocoa frameworks to do this, I would be grateful. I need to be able to convert tiff/jpeg/gif/pdf/pict/png to a common file format (png or gif), preserving transparency and color balance. So far I've not had luck on Mac. I think I could convert pure Cocoa code to Perl...)
--------------------------------------------------------------- This email copyright the author. Unless otherwise noted, you are expressly allowed to retransmit, quote, or otherwise use the contents for non-commercial purposes. This copyright will expire 5 years after the author's death, or in 30 years, whichever is longer, unless such a period is in excess of local copyright law. ---------------------------------------------------------------