AlarmWorkflow.AlarmSource.Fax.FaxAlarmSource.ProcessNewPdf C# (CSharp) Метод

ProcessNewPdf() приватный Метод

private ProcessNewPdf ( FileInfo file ) : void
file System.IO.FileInfo
Результат void
        private void ProcessNewPdf(FileInfo file)
        {
            string tiffFilePath = Path.Combine(file.DirectoryName, "convert.tif");
            Logger.Instance.LogFormat(LogType.Trace, this, Properties.Resources.GhostscriptConvert, file.FullName);

            try
            {
                GhostscriptImageDevice dev = new GhostscriptImageDevice();
                dev.Device = "tiffgray";
                dev.GraphicsAlphaBits = GhostscriptImageDeviceAlphaBits.V_4;
                dev.TextAlphaBits = GhostscriptImageDeviceAlphaBits.V_4;
                dev.Resolution = 300;
                dev.InputFiles.Add(file.FullName);
                dev.OutputPath = tiffFilePath;
                dev.Process();

                ProcessNewImage(new FileInfo(tiffFilePath));

                file.Delete();
            }
            catch (GhostscriptException ex)
            {
                Logger.Instance.LogFormat(LogType.Error, this, Properties.Resources.GhostscriptConvertError);
                Logger.Instance.LogException(this, ex);

                string archivedFilePath = Path.Combine(_archivePath.FullName, file.Name);
                MoveFileTo(file, archivedFilePath);
            }
        }