开发者

Reverse line feed or another solution for continuous feed out of sync (matrix)

I use continuous 5" form (p开发者_如何学Pythonreprinted) with my invoice application and it seems that many matrix printers do not support this 5" form length. Now the key problem is that while printing just one form, two other forms needs to be thrown out as well with linefeed to tear out, since the FF code causes continuous form to be out of sync. I need to keep form in sync so that next time software prints to correct positions.

I wonder if reverse linefeeding would solve this issue, e.g. if my software would LF the paper enough so that it can be tear out, and show a dialog, and then reverse line feed.

My question is, how to reverse linefeed with panasonic and epson printers, or is there any other recommended solution?

Notice that I use Raw (text out) printing .


If the application is a Windows one (accessing the printer from a Windows printer driver), your printer properties should allow you to define your paper format, including "user defined" ones (see Epson lx300+ documentation, for instance. That might change the effect of the form feed.

If your application runs the printer in text mode and uses ESC/P character mode sequences, then you can define the form length (in lines) using escape sequences. Looking at the ESC/P usage should help you sending the right sequence to the printer. ESC/P information can be found here.

More specifically, the sequences you might need are those:

27 67 n     ESC C n     Select page length in lines (n=1..127)
27 67 48 n  ESC C 0 n   Select page length in inches (n=1..22)

(but there are many more capabilities)


Working from some very old DOS/Foxpro era memories, you can either just keep track of the number of lines printed, then use correct number of LFs to move to the next page.

You may also be able to set the form length using ESC C n where n is number of lines. See Epson printer control codes here As the default lines per inch is 6, you want to send 6*5, i.e. 30

Something like

write(prt, $27'C', $30);

Should do the trick

The basic Panasonic control codes are similar to Epson ones. I also remember some Panasonic printers that could automatically eject paper to tear off, then rewind once the next print job started.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜