Estoy intentando redefinir la altura de la página mediante el siguiente código, tal y como indica el libro "Guía de Desarrollo Delphi 5"
Código Delphi
[-]
procedure TPrintDocument.SetPrinterSize;
var
Device : array[0..255] of char;
Driver : array[0..255] of char;
Port : array[0..255] of char;
hDMode : THandle;
PDMode : PDEVMODE;
begin
Printer.GetPrinter(Device, Driver, Port, hDMode);
if hDMode <> 0 then begin
pDMode := GlobalLock(hDMode);
if pDMode <> nil then begin
pDMode^.dmFields := pDMode^.dmFields or dm_PaperSize;
pDMode^.dmPaperLength := 50;
end;
GlobalUnlock(hDMode);
end;
end;
....
Printer.BeginDoc
Printer.EndDoc;
Pero sigue sin hacerme caso, es decir, sigue haciendo líneas en blanco después de imprimir.
¿Estoy haciendo algo mal?
Muchas gracias