diff --git a/CefSharp.Core/Internals/CefBrowserHostWrapper.cpp b/CefSharp.Core/Internals/CefBrowserHostWrapper.cpp index 0372eb7b2..81c0fa4f2 100644 --- a/CefSharp.Core/Internals/CefBrowserHostWrapper.cpp +++ b/CefSharp.Core/Internals/CefBrowserHostWrapper.cpp @@ -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(settings->MarginType); diff --git a/CefSharp/PdfPrintSettings.cs b/CefSharp/PdfPrintSettings.cs index 92c0127f6..6df84fae1 100644 --- a/CefSharp/PdfPrintSettings.cs +++ b/CefSharp/PdfPrintSettings.cs @@ -58,6 +58,11 @@ namespace CefSharp /// public CefPdfPrintMarginType MarginType { get; set; } + /// + /// Scale the PDF by the specified amount, defaults to 100%. + /// + public int ScaleFactor { get; set; } + /// /// Set to true to print headers and footers or false to not print /// headers and footers.