mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-01-05 22:48:06 +01:00
Add PDF print scale factor setting (issue #2106)
This commit is contained in:
parent
3abfa07bee
commit
4dd897f977
@ -2395,6 +2395,13 @@ typedef struct _cef_pdf_print_settings_t {
|
||||
int page_width;
|
||||
int page_height;
|
||||
|
||||
///
|
||||
// The percentage to scale the PDF by before printing (e.g. 50 is 50%).
|
||||
// If this value is less than or equal to zero the default value of 100
|
||||
// will be used.
|
||||
///
|
||||
int scale_factor;
|
||||
|
||||
///
|
||||
// Margins in millimeters. Only used if |margin_type| is set to
|
||||
// PDF_PRINT_MARGIN_CUSTOM.
|
||||
|
@ -937,6 +937,8 @@ struct CefPdfPrintSettingsTraits {
|
||||
target->page_width = src->page_width;
|
||||
target->page_height = src->page_height;
|
||||
|
||||
target->scale_factor = src->scale_factor;
|
||||
|
||||
target->margin_top = src->margin_top;
|
||||
target->margin_right = src->margin_right;
|
||||
target->margin_bottom = src->margin_bottom;
|
||||
|
@ -47,7 +47,8 @@ void FillInDictionaryFromPdfPrintSettings(
|
||||
print_settings.SetInteger(kSettingCopies, 1);
|
||||
print_settings.SetBoolean(kSettingCollate, false);
|
||||
print_settings.SetString(kSettingDeviceName, "");
|
||||
print_settings.SetInteger(kSettingScaleFactor, 100);
|
||||
print_settings.SetInteger(kSettingScaleFactor,
|
||||
pdf_settings.scale_factor > 0 ? pdf_settings.scale_factor : 100);
|
||||
print_settings.SetBoolean(kSettingGenerateDraftData, false);
|
||||
print_settings.SetBoolean(kSettingPreviewModifiable, false);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user