procedure TForm1.Button1Click(Sender: TObject);
var
PText:TextFile;
i:integer;
begin
printer.Canvas.Font.Charset:=GB2312_CHARSET;
AssignPRN(PText);
Rewrite(PText);
Printer.Canvas.Font.Name:=黑體;
Printer.Canvas.Font.Size:=15;
writeln(Ptext,卡號:210008888888);
Printer.Canvas.Font.Size:=10;
writeln(Ptext,);
writeln(Ptext,密碼:111111);
writeln(Ptext,);
Printer.Canvas.Font.Size:=8;
writeln(Ptext,開卡時間+datetimetostr(now));
writeln(Ptext,);
CloseFile(Ptext);
end;