Hola anubis.
Habria que hacer pruebas sobre la ticadora para estar seguro...
Así a simple vista, estas dibujando un rectángulo determinado por el total del alto de la página,
Código Delphi
[-]
R:= Rect(200,200,(Pagewidth - 200),(PageHeight - 200));
me parece que por ahí viene el asunto.
Yo intentaría ir sumando las sucesivas alturas de las líneas para ajustar el alto del rectángulo a ese valor; algo similar a:
Código Delphi
[-]
...
var
R: TRect;
i: Integer;
TotHeight: Integer;
begin
with Printer do
begin
BeginDoc;
TotHeight:= 0;
for i := 0 to IMPRIMIR.Count -1 do
begin
TotHeight:= Canvas.TextHeight(IMPRIMIR.Strings[i]) * i;
Canvas.TextOut(200, 200 + TotHeight, IMPRIMIR.Strings[i]);
Inc(TotHeight, TotHeight);
end;
R:= Rect(200, 200, (Pagewidth - 200), (TotHeight - 200));
Canvas.Brush.Style := bsClear;
Canvas.Brush.Color := clBlack;
Canvas.FrameRect(R);
EndDoc;
end;
...
No probé el código por que desconozco algunos datos, pero creo que en líneas generales tendría que funcionar.
Saludos