使用TPrinter将内容画在Canvas上为打印,
使用Image将内容画在Canvas上为预览.

解决方案 »

  1.   

    var
      h : integer;
        with memo1.Lines,Image1.Picture.Bitmap.Canvas do
        begin
          h:=TextHeight('测试');
          for i:=0 to count-1 do
            TextOut(5,h*(i+1),memo1.lines[i]);
        end;
      

  2.   

    直接画在FORM上:
    var
      h : integer;
        with memo1.Lines,Canvas do
        begin
          h:=TextHeight('测试');
          for i:=0 to count-1 do
            TextOut(5,h*(i+1),memo1.lines[i]);
        end;