mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-04 10:22:55 +00:00
Added support for PDF scaling
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user