Beispiel #1
0
        static void Main(string[] args)
        {
            try
            {
                //  Read names of input and output files.
                HtmlToPdfConverter htmlToPdfConverter = ParseArguments(args);
                try
                {
                    // Configure the logging.
                    htmlToPdfConverter.ConfigureLogging();

                    // Read HTML, convert and write PDF.
                    htmlToPdfConverter.ConvertFileToPdf();
                }
                finally
                {
                    htmlToPdfConverter.CleanUp();
                }

                Environment.ExitCode = 0;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);

                Environment.ExitCode = 1;
            }
        }