curl http://example.com/cgi/print{"online": true, "paper_empty": false, "paper_low": false}curl http://example.com/cgi/print -d 'Hello World'curl http://example.com/cgi/print -d '{b}Hello{} World'will print "Hello World"
("Hello" will be bold. "World" will be regular.)
curl http://example.com/cgi/print -d '{b}Hello {b,u}World'will print "Hello World"
("Hello" will be bold. "World" will be bold and underlined.)
Text formatting tags:
| tag | description |
|---|---|
c |
align center |
r |
align right |
l |
align left |
b |
bold |
u |
underline |
i |
invert |
f |
flip (upside-down) |
w |
width (e. g. w=3) |
h |
height (e. g. h=4) |
ft |
font (e. g. ft=a) |
ln |
linefeed |
curl http://example.com/cgi/print -d '{bc}978020137962'will print the EAN-13 Barcode 978020137962
Barcode formatting tags:
| tag | description |
|---|---|
t |
type (EAN13, UPC, etc.) |
w |
width (1-255) |
h |
height (1-255) |
p |
position of the text (above, below, both, off) |
ft |
font |
c |
align center |
l |
align left |
curl http://example.com/cgi/print -d '{qr}https://example.com/'will print the QR Code for https://example.com/
QR Code formatting tags:
| tag | description |
|---|---|
c |
align center |
s |
size (1-16) |
ec |
error correction (L, M, Q, H) |
curl http://example.com/cgi/print -d '{im}https://example.com/image.png'will print the image at https://example.com/image.png
curl http://example.com/cgi/print -d "{im}$(cat image.png | base64)"will print the image image.png
Image formatting tags:
| tag | description |
|---|---|
c |
align center |
| tag | description |
|---|---|
cut |
cut the paper |
cd |
kick the cash drawer (d=2 and d=5 supported for pin 2 and 5) |
?cut=0disables automatic cutting after each request?feed=0disables automatic linefeed after each request