sfk
sfk

Reputation: 71

Printing in EPSON PRINTERS

I want to print a string with some format and at the end i want to pass the paper cut command. After a search i got this code

Convert.ToString((char)27) + "@" + Convert.ToString((char)29) + "V" + (char)1 

i added this to the string needs to be printed in the end. The command cuts the paper but not in the end, in the middle some where it cuts. If again i give another copy means the portion of the previous one is coming in this print.

Please help to overcome this.. and suggest the best way to pass printer command to these EPSON Printers.

Upvotes: 1

Views: 2191

Answers (1)

to StackOverflow
to StackOverflow

Reputation: 124686

Most receipt printers cut the paper at a position that's different from the current print position.

There are two possible approaches. First you need to count the number of lines between the receipt cut position and the last line printed.

Then do one of the following:

  • Before cutting the receipt, print the correct number of lines - which can either be blank, or, more usually, can be header text for the following receipt.

  • Execute the appropriate number of line feeds; cut the receipt, then execute the same number of reverse line feeds. This assumes the printer supports reverse line feeds (most do), and probably increases the risk of a paper jam.

Upvotes: 1

Related Questions