This commit is contained in:
2020-09-22 21:33:01 +00:00
parent 8b3abaa9b8
commit 80d9fa88d6
2 changed files with 8 additions and 2 deletions

View File

@@ -521,9 +521,15 @@ namespace AyaNova.Biz
string outputFileName = StringUtil.ReplaceLastOccurrence(FileUtil.NewRandomFileName, ".", "") + ".pdf";
string outputFullPath = System.IO.Path.Combine(FileUtil.TemporaryFilesFolder, outputFileName);
//Set PDF options
log.LogDebug($"Resolving PDF Options from report settings");
var PdfOptions = new PdfOptions() { };
PdfOptions.DisplayHeaderFooter = report.DisplayHeaderFooter;
//render to pdf and return
log.LogDebug($"Calling render page contents to PDF");
await page.PdfAsync(outputFullPath);
await page.PdfAsync(outputFullPath, PdfOptions);
//close the browser
// log.LogDebug($"Closing browser");