You can also use this code to trap Ghostscript errors:
Josip
public class GsStdio : GhostscriptStdIO
{
public GsStdio() : base(true, true, true) { }
public override void StdIn(out string input, int count)
{
input = string.Empty;
}
public override void StdOut(string output)
{
System.Diagnostics.Debug.WriteLine("GS out: " + output);
}
public override void StdError(string error)
{
System.Diagnostics.Debug.WriteLine("GS err: " + error);
}
}
and then instead ofprocessor.StartProcessing(switches.ToArray(), null);
useprocessor.StartProcessing(switches.ToArray(), new GsStdio());
Cheers,Josip