Tamaño de pagina en canvas
Publicado por Daniel (1 intervención) el 01/08/2007 16:57:45
Estoy imprimiendo en una impresora de tickets, todo sale bien cuando la cantidad de lineas a imprmir son pocas, cuando supera cierta cantidad no las lista. Imprimo por medio del TCanvas.
este es el codigo. No se como especificar el tamaño de la pagina.
try
Printer.BeginDoc;
Imprimir;
Printer.EndDoc;
except
on E:Exception do
begin
Application.HandleException(Self);
Printer.Abort;
Exit;
end;
end;
procedure imprimir;
begin
with Printer do begin
qry.First ;
row:=100;
while not qry.Eof do
begin
texto:= trim(qry.fieldbyname('iduser').Asstring);
texto:= texto +' - ' + qry.fieldbyname('nombre').Asstring;
Canvas.TextOut(fx(0),fy(row +100),texto);
row:= row + 300;
qry,next;
end;
end;
este es el codigo. No se como especificar el tamaño de la pagina.
try
Printer.BeginDoc;
Imprimir;
Printer.EndDoc;
except
on E:Exception do
begin
Application.HandleException(Self);
Printer.Abort;
Exit;
end;
end;
procedure imprimir;
begin
with Printer do begin
qry.First ;
row:=100;
while not qry.Eof do
begin
texto:= trim(qry.fieldbyname('iduser').Asstring);
texto:= texto +' - ' + qry.fieldbyname('nombre').Asstring;
Canvas.TextOut(fx(0),fy(row +100),texto);
row:= row + 300;
qry,next;
end;
end;
Valora esta pregunta


0