Index: printing/print_settings_initializer_win.cc |
=================================================================== |
--- printing/print_settings_initializer_win.cc (revision 104741) |
+++ printing/print_settings_initializer_win.cc (working copy) |
@@ -49,6 +49,14 @@ |
GetDeviceCaps(hdc, HORZRES), |
GetDeviceCaps(hdc, VERTRES)); |
+ // Sanity check the printable_area: we've seen crashes caused by a printable |
+ // area rect of 0, 0, 0, 0, so it seems some drivers don't set it. |
+ if (printable_area_device_units.IsEmpty() || |
+ !gfx::Rect(physical_size_device_units).Contains( |
+ printable_area_device_units)) { |
+ printable_area_device_units = gfx::Rect(physical_size_device_units); |
+ } |
+ |
print_settings->SetPrinterPrintableArea(physical_size_device_units, |
printable_area_device_units, |
dpi); |