Print paper type with program

zhaozj2021-02-08  205

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;

转载请注明原文地址:https://www.9cbs.com/read-3366.html

New Post(0)