public void RunPSFile(string path) { int exit_code; int rc_run = _gs.gsapi_run_file(_gs_instance, path, 0, out exit_code); if (ierrors.IsFatal(rc_run)) { throw new GhostscriptAPICallException("gsapi_run_file", rc_run); } }
/// <summary> /// Runs a PostScript file. /// </summary> public void RunFile(string path) { if (!File.Exists(path)) { throw new FileNotFoundException("Couldn't find input file.", path); } int exit_code; // GSAPI: tell a Ghostscript to run a file int rc_run = _gs.gsapi_run_file(_gs_instance, path, 0, out exit_code); if (ierrors.IsFatal(rc_run)) { throw new GhostscriptAPICallException("gsapi_run_file", rc_run); } }
/// <summary> /// Runs a PostScript file. /// </summary> public void RunFile(string path) { if (String.IsNullOrWhiteSpace(path)) { throw new FileNotFoundException("Input file is NULL.", path); } path = Path.GetFullPath(path).Replace("\\", "/"); if (!File.Exists(path)) { throw new FileNotFoundException("Couldn't find input file.", path); } int exit_code; // GSAPI: tell a Ghostscript to run a file int rc_run = _gs.gsapi_run_file(_gs_instance, path, 0, out exit_code); if (ierrors.IsFatal(rc_run)) { throw new GhostscriptAPICallException("gsapi_run_file", rc_run, _stdIO); } }