Exemple #1
0
        public async Task <IActionResult> GetFromEngine()
        {
            var data = new TestData
            {
                Text   = "This is a test",
                Number = 123456
            };

            if (!_generatePdf.ExistsView("notAView"))
            {
                var html = await System.IO.File.ReadAllTextAsync("Views/Test.cshtml");

                _generatePdf.AddView("notAView", html);
            }

            return(await _generatePdf.GetPdf("notAView", data));
        }