+static void
+set_hard_margins (GtkPrintOperation *op)
+{
+ double top, bottom, left, right;
+ GtkPrintOperationWin32 *op_win32 = op->priv->platform_data;
+
+ top = GetDeviceCaps (op_win32->hdc, PHYSICALOFFSETY);
+ bottom = GetDeviceCaps (op_win32->hdc, PHYSICALHEIGHT)
+ - GetDeviceCaps (op_win32->hdc, VERTRES) - top;
+ left = GetDeviceCaps (op_win32->hdc, PHYSICALOFFSETX);
+ right = GetDeviceCaps (op_win32->hdc, PHYSICALWIDTH)
+ - GetDeviceCaps (op_win32->hdc, HORZRES) - left;
+
+ _gtk_print_context_set_hard_margins (op->priv->print_context, top, bottom, left, right);
+}
+