title: Failed to process GhostScript command error with some PDF file
body: <p>I am using GhostScript with C# and it is working fine but Don't know why with some specific PDF files it is not working. And I looked in GhostScript api and I found that only issue occurring with the last page of this PDF file Click here to <a href="https://drive.google.com/open?id=0B42_k98prWKIRC1ubGc4a1J2czg" rel="nofollow noreferrer">Download</a>. </p>
  
  <blockquote>
    <p>GhostScript Runtime Version : v4.0.30319</p>
    
    <p>GhostScript Version : 1.2.0.0</p>
  </blockquote>
  
  <p>Error point in Ghostscript API as below lines.</p>
  
  <pre><code>public int Execute(string[] args)
  {
      //Some Coding lines here
  
      // call ghostscript
      try
      {
          //This is the Error line on ghostscript api call
          result = NativeMethods.gsapi_init_with_args(_ghostScriptInstance, args.Length, _argumentPointersHandle.AddrOfPinnedObject());
      }
      finally
      {
          this.FreeHandles();
      }
  
      if (result &lt; (int)ErrorCode.Success)            // TODO: often if GhostScript fails because you've passed the wrong combination of params etc, it still returns zero... unhelpful
          throw new GhostScriptException(result, args);
  
      return result;
  }
  </code></pre>
  
  <p>Always getting -100 as error code. And Error Image as follow.</p>
  
  <p><a href="https://i.stack.imgur.com/LMVdJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LMVdJ.png" alt="enter image description here"></a></p>