예제 #1
0
        public async Task <IActionResult> ImageReport(int id)
        {
            HttpContext
            .JsReportFeature()
            .Recipe(Recipe.ChromePdf)
            .OnAfterRender(r =>
                           HttpContext.Response.Headers["Content-Disposition"] = "attachment; filename=\"report.pdf\"");
            var image = await _database.GetPictureById(id);

            var viewModel = new ImageReportViewModel(image);

            return(View(viewModel));
        }