ansi-escapeposposprinter

Dot matrix printer printing reverse feeding (upward vertically )


I have TVS Dotmtrix printer 9 pin, using in receipt printing on (paper roll) . with Python I want printer moves 4 line upward vertically and start printing when print file send to printer

i used some escape code like "\x1b\x28\x76\2\0\2\4" and "\x1b\x65\4"

BUT both work first time when printer switch ON and after that start plain print (without moving upward or without pulling paper downward ).

please suggest some working solutions . I m new in Python , programming


Solution

  • To pull page roll downward (reverse print)

    This code working well for me both in TVS as well as Epson Dot Matrix Printer

    '\x1Bj2'

    Some useful codes are given here

    I put '\x1Bj2' code at the top of my printing file and then write other texts.

    So, when printer start print it first pull paper downward(reverse) one line and then start printing.