Hello,
I added an Epson dot-matrix printer to my Ubuntu based system. The printer is connected via USB.
Code:
printf "Hello World!" | lpr
works fine, as well
Code:
echo -e "test" | lpr -o raw
But now I'd like to send some ESC/P commands to the printer. My preference would be to simply create a file with all ESC/P commands required and to just cat and pipe the file to lpr.
However, I got stuck on how those escape commands should look like. For test purposes I used the terminal and tried
Code:
echo -e "\x1B 3" | lpr -o raw
which clearly had an effect on space between characters. But when I try to reset the settings with
Code:
echo -e "\x1B @" | lpr -o raw
the space between characters on test printouts remains.
Would be great if someone has an example how he/she communicates with the printer via esc/p commands in Linux.
Thanks,
Ralf