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, 'SwissDelphiCenter');
TextOut(250, - 180, 'http://www.swissdelphicenter.ch');
MoveTo(250, - 240);
//Draw a line of 7,5 cm
LineTo(1000, - 240);
end;
printer.EndDoc;
end;
|