Ver Mensaje Individual
  #3  
Antiguo 09-01-2006
Javi2 Javi2 is offline
Miembro
 
Registrado: jun 2004
Posts: 152
Reputación: 23
Javi2 Va por buen camino
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
Responder Con Cita