
Once that is working, well, its not terribly hard to have viewjpeg operate on multiple files. I rather felt that the problem was that you couldn't get viewJPEG to work. Since that is gibberish in PostScript, you get an error.įrom the header of viewjpeg.ps: % Usage example:Ĭ:\Temp>gswin64c -sDEVICE=pdfwrite -o cafb0173-f4be-47a8-a39e-f479ca0a4d09.pdf viewjpeg.ps -c "(5c520934-461a-44f3-9f00-9fdc9fe666c1.jpg) viewJPEG" -f So Ghostscript then tries to parse "5c52.jpg" as PostScript operations. I get a blank pdf file as well as an error saying "Unrecoverable error, exit code 1"įollowing viewjpeg.ps you have put "-c" This switch means 'treat the following command line as PostScript, up until a -f is encountered".

String outp = p.StandardOutput.ReadToEnd() P.StartInfo.RedirectStandardOutput = true P.StartInfo.Arguments = " -sDEVICE=pdfwrite -o " + guid + ".pdf " + "\""+Program.viewJPEGLoc+"\"" +" -c " + String.Join(" ", pictures.ToArray()) P.StartInfo.WorkingDirectory = Program.ghostScriptLocation I've tried using the full path to viewjpeg.ps, and I've tried putting viewJPEG showpage at the end, and that didn't help either. GPL Ghostscript 9.10: Unrecoverable error, exit code 1 Nostringval-nostringval-nostringval- 2 %stopped_push -nostringval. H -nostringval-nostringval-nostringval- false 1 %stopped_push. runexec2 -nostringval-nostringval-nostringval- 2 %stopped_pus This software comes with NO WARRANTY: see the file PUBLIC for details.Įrror: /undefined in 5c520934-461a-44f3-9f00-9fdc9fe666c1.jpg Here is what I get: GPL Ghostscript 9.10 ()Ĭopyright (C) 2013 Artifex Software, Inc. Using Ghostscript to convert JPEG to PDF but I'm getting errors. I'd like to take a list of jpgs and turn them into a single pdf file where each image has its own page.
