Otra manera que funciona bien con 2k (sacado de mi web de la demo del TListView y probado
)
Código:
procedure TForm1.ImprimirCanvasClick(Sender: TObject);
var y, i, j : integer;
temp : string;
begin
Printer.BeginDoc;
With Printer.canvas do
Begin
Printer.Title := 'El titulo del documento que quiero';
Font.Name := 'MS Sans Serif';
Font.Color := ClBlack;
Pen.Color := ClBlack;
Font.Size := 12;
Font.Name := 'Times New Roman';
Font.Size := 12;
// imprimimos ListView
temp := 'Titulo que sale escrito en el papel';
y := 100;
TextOut(10, y, temp);
for i := 0 to ListView1.Items.Count - 1 do
begin
inc(y, 20);
temp := ListView1.Items[i].Caption;
for j := 0 to ListView1.Items[i].SubItems.Count - 1 do
temp := temp + ' ' + ListView1.Items[i].SubItems[j];
TextOut(10, y, temp);
end;
end;
Printer.EndDoc;
end;