Shorten default barcode height -- printer default (~162 dots) prints noticeably tall
deploy / deploy (push) Successful in 10s
deploy / deploy (push) Successful in 10s
This commit is contained in:
1 parent
d2900361b3
commit
f8857384fd
1 file changed
+4
-2
@@ -87,8 +87,10 @@ class ReceiptBuilder
|
|||||||
self
|
self
|
||||||
end
|
end
|
||||||
|
|
||||||
# Native ESC/POS EAN-13
|
# Native ESC/POS EAN-13. height is in dots (GS h) -- the printer's default
|
||||||
def ean13(code)
|
# (~162 dots) prints noticeably tall; 50 is a shorter, still-scannable size.
|
||||||
|
def ean13(code, height: 50)
|
||||||
|
@buffer << "\x1D\x68" << height.chr # GS h n -- set barcode height
|
||||||
@buffer << "\x1D\x6B\x02" << code.b << "\x00"
|
@buffer << "\x1D\x6B\x02" << code.b << "\x00"
|
||||||
self
|
self
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in new issue
Block a user