+ HDC hdc = DEVICE_MSPRINTER_HDC (device);
+ int logpixelsx = GetDeviceCaps (hdc, LOGPIXELSX);
+ int logpixelsy = GetDeviceCaps (hdc, LOGPIXELSY);
+ int physicaloffsetx = GetDeviceCaps (hdc, PHYSICALOFFSETX);
+ int physicaloffsety = GetDeviceCaps (hdc, PHYSICALOFFSETY);
+ int physicalheight = GetDeviceCaps (hdc, PHYSICALHEIGHT);
+ int physicalwidth = GetDeviceCaps (hdc, PHYSICALWIDTH);
+
+ /* Compute geometry properties.
+ Conversion is from TWIPS -> inches -> pixels. */
+ frame_left = MulDiv (logpixelsx, FRAME_MSPRINTER_LEFT_MARGIN(f), 1440)
+ - physicaloffsetx;