ReportMachine打印的走纸问题(100分)

  • 主题发起人 nathanlee
  • 开始时间
N

nathanlee

Unregistered / Unconfirmed
GUEST, unregistred user!
使用ReportMachine在非标准的纸上打印,打印完后我想控制打印机多走几行以便于用户
撕纸,这个动作在ReportMachine中怎么实现
另外,打印机是LQ-670K的好像没有“切纸”的按钮
 
看了一些提示可以用控制码来控制走纸,如何用Delphi向打印机输出控制码呢?
 
控制码可以象输出字符一样向打印机输送,参看Delphi的帮助关于TPrinter。
 
我刚做过一个类似的程序,是收银的
建议你直接写端口
多写几个writeln;
就可以换行了
 
打印不分页又如何实现呢?急!!
 
procedure TForm1.Button1Click(Sender: TObject);
var
f:TextFile;
begin
assignfile(f, ‘lpt1’);
rewrite(f);
try
  writeln(f,'要打印的语句');
...
finally
  closefile(f);
end;
end;
 
可是这样没有办法定位呀!
 
用空格,回车符
搞个数组确定空格和回车的数量
麻烦点,呵呵
有好办法的告诉我
 
可是这样打完了还是要分页的,自动就走纸了
 
你可以用控制码,打印机的说明书里有
Epson LQ-1600k, chr(12) is move to next page,
chr(27)+'@' is initial the printer and clear the printer buffers.
procedure TForm1.Button1Click(Sender: TObject);
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);
end;
 
多人接受答案了。
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
920
import
I
顶部