呵呵,我的建议是将这个字符串放在MEMO或RICHEDIT中显示出来,然后送去打印。这样能控制字体的很多特征。

解决方案 »

  1.   


    我也不记得,试一试
    priner.canvas.textout(S,x,y)
      

  2.   

    用TPrinter对象,通过Printer.Canvas可打印任何内容,对于用户,canvas的操作对于打印机或图像、窗口绘制等操作几乎相同,另,对于你的需求,更简单的方法,delphi的帮助中已有例子:
    Examples:procedure TForm1.Print1Click(Sender: TObject);
    var
      Line: Integer;
      PrintText: TextFile;   {declares a file variable}
    begin
      if PrintDialog1.Execute then
      begin
        AssignPrn(PrintText);   {assigns PrintText to the printer}
        Rewrite(PrintText);     {creates and opens the output file}
        Printer.Canvas.Font := Memo1.Font;  {assigns Font settings to the canvas}
        for Line := 0 to Memo1.Lines.Count - 1 do      Writeln(PrintText, Memo1.Lines[Line]); {writes the contents of the Memo1 to the printer object}
        CloseFile(PrintText); {Closes the printer variable}
      end;
    end