Printing Delphi

uses
Printers;
//yazı gönderme
var
MyFile: TextFile;
begin
AssignPrn(MyFile);
Rewrite(MyFile);
Writeln(MyFile, 'Print this text');
System.CloseFile(MyFile);
//resim gönderme
var
Bmp: TBitmap;
begin
Bmp := TBitmap.Create;
try
Bmp.LoadFromFile('MyBitmap.bmp');
with Printer do
begin
BeginDoc;
Canvas.Draw((PageWidth - Bmp.Width) div 2,
(PageHeight - Bmp.Height) div 2,
Bmp);
EndDoc;
end;
finally
Bmp.Free;
end;