用form.print 打印出来的效果太差,有什么办法提高?

解决方案 »

  1.   

    屏幕抓图Ctrl+Print Screen键。
      

  2.   

    var
      Image:TImage;
      strect:Trect;
      Graph:array[1..2] of TGraphic;
    然后做一张大图片,把窗体上的东东贴在图片上,用ImgForm.Canvas.TextOut(x,y,字符串)
    Image.Canvas.StretchDraw(strect,Graph[1]);//贴图
    然后用一个QuickRep,QrImage贴上就可以了。
    我做的一个例子,希望对你又帮助:
    做图片的:
    Image:=Timage.Create(self);
    Image.Width:=1200;
    Image.Height:=1500;
    Image.Canvas.Font.Style:=LabelID1.Font.Style;
    Image.Canvas.Font.Size:=32;
    if LabelID1.Visible=True
    then begin
            Image.Canvas.TextOut(460,100,LabelName1.Caption);
            Image.Canvas.TextOut(690,100,LblName1.Caption);
            Image.Canvas.TextOut(460,170,LabelSex1.Caption);
            Image.Canvas.TextOut(690,170,LblSex1.Caption);        Image.Canvas.TextOut(460,240,LabelNation1.Caption);
            Image.Canvas.TextOut(690,240,LblNation1.Caption);
            Image.Canvas.TextOut(460,310,LabelPer1.Caption);
            Image.Canvas.TextOut(690,310,LblPer1.Caption);        Image.Canvas.TextOut(460,380,Labelbirthday1.Caption);
            Image.Canvas.TextOut(690,380,LblBirthday1.Caption);        Image.Canvas.TextOut(460,450,LabelDate1.Caption);
            Image.Canvas.TextOut(690,450,LblDate1.Caption);        Image.Canvas.TextOut(150,520,LabelID1.Caption);
            Image.Canvas.TextOut(440,520,LblID1.Caption);        Image.Canvas.TextOut(150,590,LabelAddress1.Caption);
            Image.Canvas.TextOut(440,590,LblAddress1.Caption);
    end;
    if Image1.Visible=True
    then begin
            Graph[1]:=Image1.Picture.Graphic;
            strect.Left:=100;
            strect.Right:=382;
            strect.Top:=100;
            strect.Bottom:=476;
            Image.Canvas.StretchDraw(strect,Graph[1]);
    end;
    然后打印
    self.QRImage1.Picture:=Image.Picture;
    self.QuickRep1.Print;
    Image.Destroy;
      

  3.   

    建产一个打印函数,接收画布作为参数,当传送窗体画布时,在窗体上打印,当传递打印机画布时,在打印机上打印.在此函数中取出画布设备句柄,建产映射模式,用API直接打印,这样两者打印出的效果就一样了.