public override void Start(IWorkerParameters parameters)
        {
            if (parameters == null)
            {
                return;
            }

            var printParameters = new PrintParameters(parameters);

            if (string.IsNullOrEmpty(printParameters.FilePath))
            {
                return;
            }

            var pdfExecutablePath = FindExecutable(printParameters.FilePath);

            if (string.IsNullOrEmpty(pdfExecutablePath))
            {
                throw new Exception(Resources.ERR_UNABLE_FIND_SUITABLE_PDF_EXECUTABLE_PATH);
            }

            for (var i = 0; i < printParameters.DefaultNumberOfCopies; i++)
            {
                var proc = new Process
                {
                    StartInfo =
                    {
                        WindowStyle     = ProcessWindowStyle.Hidden,
                        Verb            = "Print",
                        FileName        = pdfExecutablePath,
                        UseShellExecute = false,
                        CreateNoWindow  = true,
                        Arguments       = GetStartupArguments(printParameters.FilePath, printParameters, pdfExecutablePath)
                    },
                    EnableRaisingEvents = true
                };

                proc.Start();

                if (printParameters.Timeout > 0)
                {
                    proc.WaitForExit(printParameters.Timeout * 1000);
                }
                if (printParameters.AutoClosePDFProgram && !printParameters.AlwaysAskForPrinter)
                {
                    proc.Close();
                    KillPDFViewer(Path.GetFileNameWithoutExtension(pdfExecutablePath));
                }
            }
        }
        private static string GetStartupArguments(string filePath, PrintParameters parameters, string pdfExecutablePath)
        {
            if (pdfExecutablePath != null && pdfExecutablePath.ToUpper().Contains("ADOBE"))
            {
                if (parameters.AlwaysAskForPrinter || string.IsNullOrEmpty(parameters.DefaultPrinterName))
                {
                    return($@"/p /n ""{filePath}""");
                }

                return($@"/t /n ""{filePath}"" ""{parameters.DefaultPrinterName}""");
            }

            if (parameters.AlwaysAskForPrinter || string.IsNullOrEmpty(parameters.DefaultPrinterName))
            {
                return($@"/p ""{filePath}""");
            }

            return($@"/t ""{filePath}"" ""{parameters.DefaultPrinterName}""");
        }