echo "Hello DevTerm" > /tmp/DEVTERM_PRINTER_IN
echo -e "Hello DevTerm\n\n\n\n\n\n" > /tmp/DEVTERM_PRINTER_IN
cat file.txt > /tmp/DEVTERM_PRINTER_IN
ncal -hb | tee > /tmp/DEVTERM_PRINTER_IN
set printer font index,n:0-4
echo -en "\x1d\x21\x0" > /tmp/DEVTERM_PRINTER_IN
echo -en "\x1d\x21\x1" > /tmp/DEVTERM_PRINTER_IN
echo -en "\x1d\x21\x2" > /tmp/DEVTERM_PRINTER_IN
echo -en "\x1d\x21\x3" > /tmp/DEVTERM_PRINTER_IN
echo -en "\x1d\x21\x4" > /tmp/DEVTERM_PRINTER_IN
n:0-F, set printer printing density
echo -en "\x12\x23\x0" > /tmp/DEVTERM_PRINTER_IN
echo -en "\x12\x23\x1" > /tmp/DEVTERM_PRINTER_IN
echo -en "\x12\x23\x2" > /tmp/DEVTERM_PRINTER_IN
echo -en "\x12\x23\x3" > /tmp/DEVTERM_PRINTER_IN
echo -en "\x12\x23\x4" > /tmp/DEVTERM_PRINTER_IN
echo -en "\x12\x23\x5" > /tmp/DEVTERM_PRINTER_IN
echo -en "\x12\x23\x6" > /tmp/DEVTERM_PRINTER_IN
echo -en "\x12\x23\x7" > /tmp/DEVTERM_PRINTER_IN
echo -en "\x12\x23\x8" > /tmp/DEVTERM_PRINTER_IN
echo -en "\x12\x23\x9" > /tmp/DEVTERM_PRINTER_IN
echo -en "\x12\x23\xa" > /tmp/DEVTERM_PRINTER_IN
echo -en "\x12\x23\xb" > /tmp/DEVTERM_PRINTER_IN
echo -en "\x12\x23\xc" > /tmp/DEVTERM_PRINTER_IN
echo -en "\x12\x23\xd" > /tmp/DEVTERM_PRINTER_IN
echo -en "\x12\x23\xe" > /tmp/DEVTERM_PRINTER_IN
echo -en "\x12\x23\xf" > /tmp/DEVTERM_PRINTER_IN
default density is 6
print the test page
echo -en "\x12\x54" > /tmp/DEVTERM_PRINTER_IN
Edit /usr/local/etc/devterm-printer
,point to an existed ttf file,eg:
TTF=/usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc
then restart devterm-printer.service with
sudo systemctl restart devterm-printer
devterm-printer daemon will auto detect the ttf font file
echo -en "\x1b\x21\x1" > /tmp/DEVTERM_PRINTER_IN
echo -en "\x1b\x21\x0" > /tmp/DEVTERM_PRINTER_IN
then
echo "日月火水木金土 ΕΙΝΑΙ Ο ΘΕΟΣ ΓΕΩΜΕΤΡΗΣ" > /tmp/DEVTERM_PRINTER_IN
to print unicode characters
echo -en "\x1b\x56\x0" >/tmp/DEVTERM_PRINTER_IN
disable rotation
echo -en "\x1b\x56\x1" >/tmp/DEVTERM_PRINTER_IN
90 degree
echo -en "\x1b\x56\x2" >/tmp/DEVTERM_PRINTER_IN
180 degree
echo -en "\x1b\x56\x3" >/tmp/DEVTERM_PRINTER_IN
270 degree