Пример #1
0
        public void Print(Job job)
        {
            var gsVersion = _ghostscriptDiscovery.GetGhostscriptInstance();

            if (gsVersion == null)
            {
                _logger.Error("No valid Ghostscript version found.");
                throw new InvalidOperationException("No valid Ghostscript version found.");
            }
            _logger.Debug("Ghostscript Version: " + gsVersion.Version + " loaded from " + gsVersion.ExePath);
            var ghostscript = new GhostScript(gsVersion);

            OutputDevice printingDevice = new PrintingDevice(job);

            ghostscript.Run(printingDevice, job.JobTempFolder);
        }