Mega Code Archive

 
Categories / Delphi / Printing
 

Yazıcıdan milimetrik yazı yazdırmak

uses printers; procedure TForm1.Button1Click(Sender: TObject); begin printer.BeginDoc; //Each logical unit is mapped to 0.1 millimeter. //Positive x is to the right; positive y is up. SetMapMode(printer.Canvas.Handle, MM_LOMETRIC); with printer.Canvas do begin //font 5 mm height Font.Height := 50; Font.Name := 'Verdana'; TextOut(250, - 110, 'Merhaba'); TextOut(250, - 180, 'www.DelphiTurk.com'); MoveTo(250, - 240); //Draw a line of 7,5 cm LineTo(1000, - 240); end; printer.EndDoc; end;