This commit is contained in:
2020-09-22 22:21:44 +00:00
parent 0af5bd7623
commit 1e3a7e7871

View File

@@ -572,6 +572,27 @@ namespace AyaNova.Biz
}
}
PdfOptions.Landscape = report.Landscape;
if (!string.IsNullOrWhiteSpace(report.MarginOptionsBottom))
PdfOptions.MarginOptions.Bottom = report.MarginOptionsBottom;
if (!string.IsNullOrWhiteSpace(report.MarginOptionsLeft))
PdfOptions.MarginOptions.Left = report.MarginOptionsLeft;
if (!string.IsNullOrWhiteSpace(report.MarginOptionsRight))
PdfOptions.MarginOptions.Right = report.MarginOptionsRight;
if (!string.IsNullOrWhiteSpace(report.MarginOptionsTop))
PdfOptions.MarginOptions.Top = report.MarginOptionsTop;
//holding this back until figure it out
//it's not really a report property, but a print time / render property
//PdfOptions.PageRanges=report.PageRanges;
PdfOptions.PreferCSSPageSize=report.PreferCSSPageSize;
PdfOptions.PrintBackground=report.PrintBackground;
PdfOptions.Scale=report.Scale;
//render to pdf and return
log.LogDebug($"Calling render page contents to PDF");
await page.PdfAsync(outputFullPath, PdfOptions);