Example #1
0
        public static void Run(string host = Constants.DEFAULT_HOST, int port = Constants.DEFAULT_PORT)
        {
            // Instantiate the ExportConfig class and add the required configurations
            ExportConfig  exportConfig = new ExportConfig();
            List <string> results      = new List <string>();

            // Instantiate the ExportManager class
            using (ExportManager exportManager = new ExportManager())
            {
                exportConfig.Set("chartConfig", File.ReadAllText("./resources/dashboard_charts.json"));
                exportConfig.Set("templateFilePath", "./resources/template.html");
                exportConfig.Set("type", "pdf");
                //exportConfig.Set("templateFormat", "A4");

                // Call the Export() method with the export config
                //results.AddRange(exportManager.Export(exportConfig));
                Dictionary <string, Stream> files = exportManager.ExportAsStream(exportConfig);
            }

            foreach (string path in results)
            {
                Console.WriteLine(path);
            }

            Console.Read();
        }