nmm,
you can force it via:
function SetPrinterColorMode(InColo
var
Device : array[0..MAX_PATH] of char;
Driver : array[0..MAX_PATH] of char;
Port : array[0..MAX_PATH] of char;
hDMode : THandle;
PDMode : PDEVMODE;
begin
result := FALSE;
Printer.GetPrinter(Device,
if hDMode <> 0 then begin
pDMode := GlobalLock(hDMode);
if pDMode <> nil then begin
if (pDMode^.dmFields AND dm_Color) = dm_Color then begin
if (InColor) then begin
pDMode^.dmColor := DMCOLOR_COLOR;
end else begin
pDMode^.dmColor := DMCOLOR_MONOCHROME;
end;
result := TRUE;
end;
GlobalUnlock(hDMode);
end;
end;
end;
regards
Jens
Main Topics
Browse All Topics





by: epasquierPosted on 2009-10-16 at 04:00:07ID: 25588316
Some printers do not retains their default parameters as set via windows when accessed through the Delphi TPrinter object. This annoys me also in some of my programs, because I have to constantly open a TPrinterDialog, go in the Driver properties and change what needs to be changed.
I have not yet taken the time to see where that comes from and how to correct it, but you should try the same just to be sure we have the same pb: put a TPrinterDialog and display it before printing. I believe that FreePDF and Zebra drivers have different parameters through this than when you display their properties through printers config panel.