例子:
var
F:TEXTFILE;
begin
ASSIGNFILE(F,'LPT1');
REWRITE(F);
WRITELN(F,chr(27) '@');
//initial the printer
WRITELN(F,'TEST1 FIRST LINE');
WRITELN(F,chr(12));
// move the paper to a new page
CLOSEFILE(F);
chr(27)中的27就是厂家提供的控制码?
我打印报表的代码:report1.printreport.是写在这些代码之前吗?比如:
var
F :TEXTFILE;
begin
report1.printreport;//写这里?
ASSIGNFILE(F,'LPT1');
REWRITE(F);
WRITELN(F,chr(27) '@');
//initial the printer
WRITELN(F,'TEST1 FIRST LINE');
WRITELN(F,chr(12));
// move the paper to a new page
CLOSEFILE(F);