Added support for PDF scaling

This commit is contained in:
GrabzIt
2017-04-08 10:48:43 +01:00
parent 9bbe75f287
commit 2526c818fc
2 changed files with 6 additions and 0 deletions
@@ -89,6 +89,7 @@ void CefBrowserHostWrapper::PrintToPdf(String^ path, PdfPrintSettings^ settings,
nativeSettings.margin_top = settings->MarginTop;
nativeSettings.margin_left = settings->MarginLeft;
nativeSettings.margin_right = settings->MarginRight;
nativeSettings.scale_factor = settings->ScaleFactor;
nativeSettings.page_height = settings->PageHeight;
nativeSettings.page_width = settings->PageWidth;
nativeSettings.margin_type = static_cast<cef_pdf_print_margin_type_t>(settings->MarginType);
+5
View File
@@ -58,6 +58,11 @@ namespace CefSharp
/// </summary>
public CefPdfPrintMarginType MarginType { get; set; }
/// <summary>
/// Scale the PDF by the specified amount, defaults to 100%.
/// </summary>
public int ScaleFactor { get; set; }
/// <summary>
/// Set to true to print headers and footers or false to not print
/// headers and footers.