VAR
Device: array [0..cchdevicename-1] of char;
Driver: array [0 .. (max_path-1)] of char;
Port: array [0..32] of char;
HDMODE: THANDLE;
PDMODE: PDEVMODE;
Begin
Printer.getPrinter (Device, Driver, Port, HDMode);
IF HDMODE <> 0 THEN
Begin
PDMODE: = Globalock (HDMODE);
IF pdmode <> nil kil
Begin
PDMode ^ .dmpapersize: =
DMPAPER_A5;
PDMODE ^ .dmfields: = pdmode ^ .dmfields or DM_PAPERSIZE;
GlobalUnlock (HDMODE);
END;
END;
END;