Quantcast
Channel: Ghostscript.NET
Viewing all articles
Browse latest Browse all 393

New Post: An error occured when call to 'gsapi_init_with_args' is made: -100

$
0
0
You can also use this code to trap Ghostscript errors:
        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 of
processor.StartProcessing(switches.ToArray(), null);
use
processor.StartProcessing(switches.ToArray(), new GsStdio());
Cheers,
Josip

Viewing all articles
Browse latest Browse all 393

Trending Articles