Paul James of Life-Cycle Technologies, Inc. has a print2pdf program that uses an API ShellExecute to convert postscript files to PDF with ghostscript. With some minor tweeking, you can probably use his GSConvertFile function to create jpg files from pdfs.