Add box, rule and kv blocks, text folding and receipt preview
Phase 1 of docs/plans/formatters.md: single and double CP437 boxes from
one /print element, and a way to see a receipt without using paper.
- receipt: box, rule and kv elements, laid out when the job renders from
the printer profile, size and font (never fixed widths). Boxes take a
title (inline or capped), a footer, padding, fit and columns, and a
body of text or children (text, feed, kv, and rules as dividers joined
to the borders). Glyphs a code page lacks fall back per set: double-h
and double-v to double, then single, then ascii; a missing junction
switches line weight first.
- Validation names nested elements (elements[0].children[3] (qr)),
checks fields per block type, allows one level of children and counts
them toward the 500-element limit. Block fields on the older types are
problems, as they were unknown fields before.
- Text is composed to NFC and characters the code page lacks fold to
look-alikes (curly quotes, dashes, ellipsis, arrows, check marks, euro,
trademark), as the owner approved on 2026-11-29. An emoji sequence
prints as one '?'. Encodable text is untouched.
- escpos: CodePage.CanEncode and Decode, and Interpret, which reads a
command stream back as the printer would print it. It takes the
profile so that it can follow the printer's own wrapping and
alignment; raw spans stay opaque.
- POST /api/v1/preview and `uberbringer preview` show the lines a job
prints, as text or JSON with styles, without fetching images.
- Config: [format] max_lines (default 2000), refused with 422
too_many_lines on preview; printer.box_line_spacing (default 0).
Byte compatibility: testdata/compat fixtures were rendered by 9b91109
before the renderer changed, and still match it and the new renderer.
examples/blocks.json was printed on the TM-T88IV; the owner judged the
border gaps at the default spacing fine (2026-11-30), so
box_line_spacing stays 0, and TestPaperReceipts pins its bytes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9fdea32b4f
commit
4562f0cebb
109 files changed
+6383
-487
No files matched your search
@@ -0,0 +1,8 @@
|
||||
1b401b74101b61001b4d001d21001b45001b2d001d420093536d617274207175
|
||||
6f7465739420616e64209173696e676c6592209620656e206461736820972065
|
||||
6d0a64617368208520656c6c697073697320952062756c6c65740a1b45001b2d
|
||||
001d42001d21001b4d001b61001b4d001d21001b45001b2d001d42008020392c
|
||||
3939209920d720f720a920ae20b020b120b520bc20bd20be209c208a209e209f
|
||||
0a1b45001b2d001d42001d21001b4d001b61001b4d001d21001b45001b2d001d
|
||||
42004d697373696e6720686572653a203f203f203f203f203f203f0a1b45001b
|
||||
2d001d42001d21001b4d001d564200
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"options": {"codepage": "cp1252"},
|
||||
"job": {
|
||||
"elements": [
|
||||
{"type": "text", "text": "“Smart quotes” and ‘single’ – en dash — em dash … ellipsis • bullet"},
|
||||
{"type": "text", "text": "€ 9,99 ™ × ÷ © ® ° ± µ ¼ ½ ¾ œ Š ž Ÿ"},
|
||||
{"type": "text", "text": "Missing here: ─ │ ░ √ 🎉 Ω"}
|
||||
]
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
1b401b74001b61001b4d001d21001b45001b2d001d4200b2b2b2b2b2b2b2b2b2
|
||||
b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2
|
||||
b20a1b45001b2d001d42001d21001b4d001b61011b4d001d21001b45001b2d00
|
||||
1d4200dac4c4c4c4c4c4c4c4c4c4c4c4c4c4c4c4c4c4c4c4c4bf0ab320202021
|
||||
21212041434854554e4720212121202020b30ac0c4c4c4c4c4c4c4c4c4c4c4c4
|
||||
c4c4c4c4c4c4c4c4c4d90a1b45001b2d001d42001d21001b4d001b61001b4d00
|
||||
1d21001b45001b2d001d4200c9cdbb20d6c4b720d5cdb820b0b1b2db20dcdfdd
|
||||
de20fe20faf9fb20f8f1fd20e620abac0ae0e1e2e3e4e50a1b45001b2d001d42
|
||||
001d21001b4d001b61001b4d001d21001b45001b2d001d42009c31322e353020
|
||||
9a6265726272696e6765722063616682206e618b7665208020a420a8ad209d20
|
||||
9b0a1b45001b2d001d42001d21001b4d001b61001b4d001d21001b45001b2d00
|
||||
1d42004d697373696e673a203f203f203f2c2070726573656e743a20ea0a1b45
|
||||
001b2d001d42001d21001b4d001b61001b4d001d21001b45001b2d001d420043
|
||||
6f6e74726f6c732073747269707065640a62656c6c20676f6e654020616e6420
|
||||
45534320746f6f0a1b45001b2d001d42001d21001b4d001b61001b4d001d2100
|
||||
1b45001b2d001d42004e6fff627265616b2073706163650a1b45001b2d001d42
|
||||
001d21001b4d001d564200
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"job": {
|
||||
"elements": [
|
||||
{"type": "text", "text": "▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓"},
|
||||
{"type": "text", "text": "┌─────────────────────┐\n│ !!! ACHTUNG !!! │\n└─────────────────────┘", "align": "center"},
|
||||
{"type": "text", "text": "╔═╗ ╓─╖ ╒═╕ ░▒▓█ ▄▀▌▐ ■ ·∙√ °±² µ ½¼ αßΓπΣσ"},
|
||||
{"type": "text", "text": "£12.50 Überbringer café naïve Ç ñ ¿¡ ¥ ¢"},
|
||||
{"type": "text", "text": "Missing: 🎉 漢 ¤, present: Ω"},
|
||||
{"type": "text", "text": "Controls\u0007 stripped\r\nbell gone\u001b@ and ESC too\u0000"},
|
||||
{"type": "text", "text": "No\u00A0break space"}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
1b401b74021b61001b4d001d21001b45001b2d001d4200c9cdbbbac8bc20dac4
|
||||
bfb3c0d920c3b420ccb920b0b1b2db20cf20b820a9209d209b209e0a1b45001b
|
||||
2d001d42001d21001b4d001b61001b4d001d21001b45001b2d001d42009a6265
|
||||
72677294e165209c352085828ce48120b790d7e59a0a1b45001b2d001d42001d
|
||||
21001b4d001b61001b4d001d21001b45001b2d001d42004d697373696e672068
|
||||
6572653a203f203f203f203f0a1b45001b2d001d42001d21001b4d001d564200
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"options": {"codepage": "cp850"},
|
||||
"job": {
|
||||
"elements": [
|
||||
{"type": "text", "text": "╔═╗║╚╝ ┌─┐│└┘ ├┤ ╠╣ ░▒▓█ ¤ © ® Ø ø ×"},
|
||||
{"type": "text", "text": "Übergröße £5 àéîõü ÀÉÎÕÜ"},
|
||||
{"type": "text", "text": "Missing here: √ ╒ ╟ Ω"}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
1b401b74131b61001b4d001d21001b45001b2d001d420050726963653a203132
|
||||
2c353020d5202863703835382068617320746865206575726f207369676e290a
|
||||
1b45001b2d001d42001d21001b4d001b61001b4d001d21001b45001b2d001d42
|
||||
00c9cdbb20b0b1b2209c20e10a1b45001b2d001d42001d21001b4d001d564200
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"options": {"codepage": "cp858"},
|
||||
"job": {
|
||||
"elements": [
|
||||
{"type": "text", "text": "Price: 12,50 € (cp858 has the euro sign)"},
|
||||
{"type": "text", "text": "╔═╗ ░▒▓ £ ß"}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
1b401b74001b61001b4d001d21001b45001b2d001d42004265666f7265207468
|
||||
6520636f6465730a1b45001b2d001d42001d21001b4d001b64031b64011b6101
|
||||
1d286b0400314132001d286b03003143061d286b03003145311d286b16003150
|
||||
3068747470733a2f2f6578616d706c652e636f6d1d286b03003151301b61021d
|
||||
286b0400314132001d286b03003143031d286b03003145331d286b1c00315030
|
||||
536d616c6c2051522c206869676820636f7272656374696f6e1d286b03003151
|
||||
301b61001d286b0400314132001d286b03003143101d286b03003145321d286b
|
||||
1800315030515220617420746865206c656674207769746820511d286b030031
|
||||
51301b61001d68501d77031d48021d6b490a7b424142432d7b7b317d1b61011d
|
||||
683c1d77021d48031d6b430d343030363338313333333933311b61001d68501d
|
||||
77031d48001d6b4407393633383530371b61021d68501d77031d48011d6b410b
|
||||
30333630303032393134351b61001d68ff1d77061d48021d6b42083031323334
|
||||
3536351b61001d68501d77031d48021d6b450c434f44452033392d242f2b251b
|
||||
61001b4d001d21001b45001b2d001d4200696e6c696e65206265666f72652072
|
||||
6177201b45001b2d001d42001d21001b4d001b61011b61001b4d001d21001b45
|
||||
001b2d001d42006166746572207261770a1b45001b2d001d42001d21001b4d00
|
||||
1d5641001b61001b4d001d21001b45001b2d001d420041667465722061206675
|
||||
6c6c206375740a1b45001b2d001d42001d21001b4d001d5642001b61001b4d00
|
||||
1d21001b45001b2d001d42004265666f72652074686520636f6465730a1b4500
|
||||
1b2d001d42001d21001b4d001b64031b64011b61011d286b0400314132001d28
|
||||
6b03003143061d286b03003145311d286b160031503068747470733a2f2f6578
|
||||
616d706c652e636f6d1d286b03003151301b61021d286b0400314132001d286b
|
||||
03003143031d286b03003145331d286b1c00315030536d616c6c2051522c2068
|
||||
69676820636f7272656374696f6e1d286b03003151301b61001d286b04003141
|
||||
32001d286b03003143101d286b03003145321d286b1800315030515220617420
|
||||
746865206c656674207769746820511d286b03003151301b61001d68501d7703
|
||||
1d48021d6b490a7b424142432d7b7b317d1b61011d683c1d77021d48031d6b43
|
||||
0d343030363338313333333933311b61001d68501d77031d48001d6b44073936
|
||||
33383530371b61021d68501d77031d48011d6b410b3033363030303239313435
|
||||
1b61001d68ff1d77061d48021d6b420830313233343536351b61001d68501d77
|
||||
031d48021d6b450c434f44452033392d242f2b251b61001b4d001d21001b4500
|
||||
1b2d001d4200696e6c696e65206265666f726520726177201b45001b2d001d42
|
||||
001d21001b4d001b61011b61001b4d001d21001b45001b2d001d420061667465
|
||||
72207261770a1b45001b2d001d42001d21001b4d001d5641001b61001b4d001d
|
||||
21001b45001b2d001d4200416674657220612066756c6c206375740a1b45001b
|
||||
2d001d42001d21001b4d001d564200
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"job": {
|
||||
"copies": 2,
|
||||
"elements": [
|
||||
{"type": "text", "text": "Before the codes"},
|
||||
{"type": "feed", "lines": 3},
|
||||
{"type": "feed"},
|
||||
{"type": "qr", "data": "https://example.com", "align": "center"},
|
||||
{"type": "qr", "data": "Small QR, high correction", "size": 3, "correction": "H", "align": "right"},
|
||||
{"type": "qr", "data": "QR at the left with Q", "size": 16, "correction": "q"},
|
||||
{"type": "barcode", "symbology": "code128", "data": "ABC-{1}"},
|
||||
{"type": "barcode", "symbology": "ean13", "data": "4006381333931", "height": 60, "width": 2, "hri": "both", "align": "center"},
|
||||
{"type": "barcode", "symbology": "ean8", "data": "9638507", "hri": "none"},
|
||||
{"type": "barcode", "symbology": "upca", "data": "03600029145", "hri": "above", "align": "right"},
|
||||
{"type": "barcode", "symbology": "upce", "data": "01234565", "width": 6, "height": 255},
|
||||
{"type": "barcode", "symbology": "code39", "data": "CODE 39-$/+%"},
|
||||
{"type": "text", "text": "inline before raw ", "newline": false},
|
||||
{"type": "raw", "hex": "1B 61 01"},
|
||||
{"type": "text", "text": "after raw"},
|
||||
{"type": "cut", "mode": "full"},
|
||||
{"type": "text", "text": "After a full cut"},
|
||||
{"type": "cut"}
|
||||
]
|
||||
}
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
1b401b74001b61001d76300040000600ff548000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
00000000000000000000000000000000eaa20f00000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
00000000000000000000000000000000b4907f00000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000009203f500000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
00000000000000000000000000000000403faa00000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000011fd5400000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000001b61001d76300040000c000000000000
|
||||
000000000000000000000000000000000000000000000000fffedaa900000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000000000ff6b6aa4a9200000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000000000fbb5aa4800ff0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000000000dd5a490221ff0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000000000eb6aa4503eed0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000000000554910007ff70000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000000000b524400fdf5a0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000000000aa910a9ff5aa0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
00000000000000000000000000000000000000000000000044440fef6ed50000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
00000000000000000000000000000000000000000000000029009fbbb5540000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000008007edfd552a0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000002403ff55aa900000
|
||||
0000000000000000000000000000000000000000000000000000001b61001b4d
|
||||
001d21001b45001b2d001d42006265747765656e1b45001b2d001d42001d2100
|
||||
1b4d000a1b61001d763000400003000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000001e820000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
00000000000000000000000000105f0000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000005f41d564200
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"job": {
|
||||
"elements": [
|
||||
{"type": "image", "base64": "iVBORw0KGgoAAAANSUhEUgAAABgAAAAGCAAAAAD8wAHPAAAAJElEQVR4nGJh4MYOWFRhLGIkVLFKqGLVgeCxqGIR5Obm5gYMAArvByihTpiMAAAAAElFTkSuQmCC"},
|
||||
{"type": "image", "base64": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAGCAAAAAD8wAHPAAAAJElEQVR4nGJh4MYOWFRhLGIkVLFKqGLVgeCxqGIR5Obm5gYMAArvByihTpiMAAAAAElFTkSuQmCC", "align": "center", "width": 48},
|
||||
{"type": "text", "text": "between", "newline": false},
|
||||
{"type": "image", "base64": "iVBORw0KGgoAAAANSUhEUgAAABgAAAAGCAAAAAD8wAHPAAAAJElEQVR4nGJh4MYOWFRhLGIkVLFKqGLVgeCxqGIR5Obm5gYMAArvByihTpiMAAAAAElFTkSuQmCC", "align": "right", "width": 13}
|
||||
]
|
||||
}
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
1b401b74001b61001b4d001d21001b45001b2d001d4200546f74616c3a201b45
|
||||
001b2d001d42001d21001b4d001b61001b4d001d21001b45011b2d001d420031
|
||||
322e35300a1b45001b2d001d42001d21001b4d001b61001b4d001d21001b4500
|
||||
1b2d001d42007878787878787878787878787878787878787878787878787878
|
||||
78787878787878787878787878781b45001b2d001d42001d21001b4d001b6100
|
||||
1b4d001d21111b45001b2d001d42000a4249474f4e450a1b45001b2d001d4200
|
||||
1d21001b4d001b61001b4d001d21001b45001b2d001d42004d69786564201b45
|
||||
001b2d001d42001d21001b4d001b61001b4d001d21111b45001b2d001d420053
|
||||
495a4553201b45001b2d001d42001d21001b4d001b61001b4d001d21001b4500
|
||||
1b2d001d42006f6e206f6e65206c696e652074686174206b656570730a676f69
|
||||
6e6720756e74696c2069742068617320746f20777261701b45001b2d001d4200
|
||||
1d21001b4d001b61001b4d001d21001b45001b2d001d420020616e6420656e64
|
||||
7320686572652e0a1b45001b2d001d42001d21001b4d001b61001b4d001d2100
|
||||
1b45001b2d001d42004974656d20202020517479202020202050726963650a1b
|
||||
45001b2d001d42001d21001b4d001b61001b4d001d21001b45001b2d001d4200
|
||||
54656120202020203220202020202020332e30300a1b45001b2d001d42001d21
|
||||
001b4d001b61001b4d001d21001b45001b2d001d42006162631b45001b2d001d
|
||||
42001d21001b4d001b61001b4d001d21001b45001b2d001d4200202020202061
|
||||
667465722061207461620a20202020202020206e657874206c696e650a1b4500
|
||||
1b2d001d42001d21001b4d001b61001b4d001d21001b45001b2d001d42006e6f
|
||||
206e65776c696e652061742074686520656e641b45001b2d001d42001d21001b
|
||||
4d000a1d564200
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"job": {
|
||||
"elements": [
|
||||
{"type": "text", "text": "Total: ", "newline": false},
|
||||
{"type": "text", "text": "12.50", "bold": true},
|
||||
{"type": "text", "text": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "newline": false},
|
||||
{"type": "text", "text": "BIGONE", "size": 2},
|
||||
{"type": "text", "text": "Mixed ", "newline": false},
|
||||
{"type": "text", "text": "SIZES ", "size": 2, "newline": false},
|
||||
{"type": "text", "text": "on one line that keeps going until it has to wrap", "newline": false},
|
||||
{"type": "text", "text": " and ends here."},
|
||||
{"type": "text", "text": "Item\tQty\tPrice"},
|
||||
{"type": "text", "text": "Tea\t2\t3.00"},
|
||||
{"type": "text", "text": "abc", "newline": false},
|
||||
{"type": "text", "text": "\tafter a tab\n\tnext line"},
|
||||
{"type": "text", "text": "no newline at the end", "newline": false}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
1b401b74001b61001b4d001d21001b45001b2d001d420054686972747920636f
|
||||
6c756d6e73206f6620466f6e7420412066726f6d0a74686520636f6c756d6e73
|
||||
206f766572726964652c206f6e20612035380a6d6d2070726f66696c652e0a1b
|
||||
45001b2d001d42001d21001b4d001b61001b4d011d21001b45001b2d001d4200
|
||||
466f6e7420422075736573207468652073616d65206c696e6520776964746820
|
||||
696e20646f74732c0a736f206974206669747320666f72747920636861726163
|
||||
7465727320686572652e0a1b45001b2d001d42001d21001b4d001b61011b4d00
|
||||
1d21111b45001b2d001d420054696e790a1b45001b2d001d42001d21001b4d00
|
||||
1d564200
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"options": {"model": "generic-58mm", "columns": 30},
|
||||
"job": {
|
||||
"elements": [
|
||||
{"type": "text", "text": "Thirty columns of Font A from the columns override, on a 58 mm profile."},
|
||||
{"type": "text", "text": "Font B uses the same line width in dots, so it fits forty characters here.", "font": "b"},
|
||||
{"type": "text", "text": "Tiny", "size": 2, "align": "center"}
|
||||
]
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
1b401b74001b61001b4d001d21001b45001b2d001d4200797979797979797979
|
||||
7979797979797979797979797979797979797979797979797979797979797979
|
||||
797979797979797979797979797979797979790a1b45001b2d001d42001d2100
|
||||
1b4d001b61001b4d001d21001b45001b2d001d4200556e777261707065640a77
|
||||
6974682061206e65776c696e6509616e642061207461620a1b45001b2d001d42
|
||||
001d21001b4d001b61001b4d001d21001b45001b2d001d4200696e6c696e6520
|
||||
756e77726170706564201b45001b2d001d42001d21001b4d001b61001b4d001d
|
||||
21001b45001b2d001d42007468656e2077726170706564207465787420746861
|
||||
740a636f6e74696e756573206f6e207468652073616d65206c696e6520616e64
|
||||
2077726170730a1b45001b2d001d42001d21001b4d001b61001b4d001d21001b
|
||||
45001b2d001d4200b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2
|
||||
b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b20a1b45001b2d001d42001d21001b
|
||||
4d001d564200
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"job": {
|
||||
"elements": [
|
||||
{"type": "text", "text": "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy", "wrap": false},
|
||||
{"type": "text", "text": "Unwrapped\nwith a newline\tand a tab", "wrap": false},
|
||||
{"type": "text", "text": "inline unwrapped ", "wrap": false, "newline": false},
|
||||
{"type": "text", "text": "then wrapped text that continues on the same line and wraps"},
|
||||
{"type": "text", "text": "▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓", "wrap": false}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
1b401b74001b61001b4d001d21001b45001b2d001d4200506c61696e20746578
|
||||
740a1b45001b2d001d42001d21001b4d001b61001b4d001d21001b45011b2d00
|
||||
1d4200426f6c640a1b45001b2d001d42001d21001b4d001b61001b4d001d2100
|
||||
1b45001b2d011d42005468696e20756e6465726c696e650a1b45001b2d001d42
|
||||
001d21001b4d001b61001b4d001d21001b45001b2d021d4200546869636b2075
|
||||
6e6465726c696e650a1b45001b2d001d42001d21001b4d001b61001b4d001d21
|
||||
001b45001b2d001d4201496e7665727465640a1b45001b2d001d42001d21001b
|
||||
4d001b61001b4d011d21001b45001b2d001d4200466f6e742042206973206e61
|
||||
72726f7765720a1b45001b2d001d42001d21001b4d001b61011b4d001d21001b
|
||||
45001b2d001d420043656e747265640a1b45001b2d001d42001d21001b4d001b
|
||||
61021b4d001d21001b45001b2d001d420052696768740a1b45001b2d001d4200
|
||||
1d21001b4d001b61001b4d001d21111b45001b2d001d420053697a6520320a1b
|
||||
45001b2d001d42001d21001b4d001b61011b4d001d21221b45011b2d001d4200
|
||||
53697a65203320626f6c640a63656e747265640a1b45001b2d001d42001d2100
|
||||
1b4d001b61001b4d001d21101b45001b2d001d4200576964650a1b45001b2d00
|
||||
1d42001d21001b4d001b61001b4d001d21021b45001b2d001d420054616c6c0a
|
||||
1b45001b2d001d42001d21001b4d001b61001b4d001d21771b45001b2d001d42
|
||||
0045696768740a1b45001b2d001d42001d21001b4d001b61021b4d011d21101b
|
||||
45011b2d021d420145766572797468696e670a1b45001b2d001d42001d21001b
|
||||
4d001d564200
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"job": {
|
||||
"elements": [
|
||||
{"type": "text", "text": "Plain text"},
|
||||
{"type": "text", "text": "Bold", "bold": true},
|
||||
{"type": "text", "text": "Thin underline", "underline": 1},
|
||||
{"type": "text", "text": "Thick underline", "underline": 2},
|
||||
{"type": "text", "text": "Inverted", "invert": true},
|
||||
{"type": "text", "text": "Font B is narrower", "font": "b"},
|
||||
{"type": "text", "text": "Centred", "align": "center"},
|
||||
{"type": "text", "text": "Right", "align": "right"},
|
||||
{"type": "text", "text": "Size 2", "size": 2},
|
||||
{"type": "text", "text": "Size 3 bold centred", "size": 3, "bold": true, "align": "centre"},
|
||||
{"type": "text", "text": "Wide", "width": 2},
|
||||
{"type": "text", "text": "Tall", "height": 3},
|
||||
{"type": "text", "text": "Eight", "size": 8},
|
||||
{"type": "text", "text": "Everything", "bold": true, "underline": 2, "invert": true, "font": "B", "align": "RIGHT", "width": 2, "height": 1}
|
||||
]
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
1b401b74001b61001b4d001d21001b45001b2d001d420054686520544d2d5432
|
||||
302070726f66696c65206861732035373620646f74732c20736f20466f6e7420
|
||||
412077726170730a617420666f7274792d656967687420636f6c756d6e732069
|
||||
6e7374656164206f6620666f7274792d74776f2e0a1b45001b2d001d42001d21
|
||||
001b4d001b61001b4d011d21001b45001b2d001d4200466f6e74204220676574
|
||||
732073697874792d666f757220636f6c756d6e73206f6e20746861742070726f
|
||||
66696c652c207768696368206d616b657320746869730a73656e74656e636520
|
||||
77726170206d756368206c617465722e0a1b45001b2d001d42001d21001b4d00
|
||||
1b61001b4d001d21111b45001b2d001d420053697a652074776f3a207477656e
|
||||
74792d666f75720a636f6c756d6e7320706572206c696e6520686572652e0a1b
|
||||
45001b2d001d42001d21001b4d001d564200
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"options": {"model": "tm-t20"},
|
||||
"job": {
|
||||
"elements": [
|
||||
{"type": "text", "text": "The TM-T20 profile has 576 dots, so Font A wraps at forty-eight columns instead of forty-two."},
|
||||
{"type": "text", "text": "Font B gets sixty-four columns on that profile, which makes this sentence wrap much later.", "font": "b"},
|
||||
{"type": "text", "text": "Size two: twenty-four columns per line here.", "size": 2}
|
||||
]
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
1b401b74001b61001b4d001d21001b45001b2d001d42004c6f6e672070617261
|
||||
677261706873207772617020617420776f726420626f756e6461726965730a66
|
||||
6f72207468652070617065722077696474682c20736f206120776f7264206973
|
||||
206e657665720a73706c6974206163726f73732074776f206c696e65732e2054
|
||||
686579206b656570207772617070696e670a666f72206173206c6f6e67206173
|
||||
207468657265206973207465787420746f207072696e742e0a1b45001b2d001d
|
||||
42001d21001b4d001b61001b4d001d21111b45001b2d001d420053697a652074
|
||||
776f2077726170732061740a68616c662074686520636f6c756d6e73206f660a
|
||||
73697a65206f6e652c2077686963682069730a7477656e74792d6f6e65206865
|
||||
72652e0a1b45001b2d001d42001d21001b4d001b61001b4d001d21221b45001b
|
||||
2d001d420053697a652074687265650a77726170732061740a666f7572746565
|
||||
6e0a636f6c756d6e732e0a1b45001b2d001d42001d21001b4d001b61001b4d01
|
||||
1d21001b45001b2d001d4200466f6e74204220676574732066696674792d7369
|
||||
7820636f6c756d6e73206f6e206120544d2d5438382c20736f20746869730a6c
|
||||
6f6e676572206c696e65206f662074657874207772617073206c617465722074
|
||||
68616e20466f6e74204120776f756c642e0a1b45001b2d001d42001d21001b4d
|
||||
001b61001b4d001d21001b45001b2d001d420046697273742070617261677261
|
||||
70682e0a5365636f6e64207061726167726170682061667465722061206e6577
|
||||
6c696e652e0a0a20202020496e64656e74656420706172616772617068206166
|
||||
746572206120626c616e6b206c696e650a6b656570732069747320696e64656e
|
||||
746174696f6e207768656e206974207772617073206f6e746f0a6d6f7265206c
|
||||
696e65732e0a1b45001b2d001d42001d21001b4d001b61001b4d001d21001b45
|
||||
001b2d001d42007365650a68747470733a2f2f6578616d706c652e636f6d2f61
|
||||
2f766572792f6c6f6e672f706174682f746861742f0a69732f6c6f6e6765722f
|
||||
7468616e2f6f6e652f77686f6c652f6c696e652f6f662f7468652f7265636569
|
||||
0a7074206f6b0a1b45001b2d001d42001d21001b4d001b61001b4d001d21001b
|
||||
45001b2d001d4200616161612020202062626262202020747261696c696e6720
|
||||
737061636573206174206120627265616b0a6172652064726f70706564202020
|
||||
2020202020202020202020202020202020656e642020200a1b45001b2d001d42
|
||||
001d21001b4d001b61011b4d001d21001b45001b2d001d420043656e74726564
|
||||
207465787420616c736f20777261707320617420776f726420626f756e646172
|
||||
6965730a616e642065616368206c696e652069732063656e7472656420627920
|
||||
746865207072696e7465722e0a1b45001b2d001d42001d21001b4d001d564200
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"job": {
|
||||
"elements": [
|
||||
{"type": "text", "text": "Long paragraphs wrap at word boundaries for the paper width, so a word is never split across two lines. They keep wrapping for as long as there is text to print."},
|
||||
{"type": "text", "text": "Size two wraps at half the columns of size one, which is twenty-one here.", "size": 2},
|
||||
{"type": "text", "text": "Size three wraps at fourteen columns.", "size": 3},
|
||||
{"type": "text", "text": "Font B gets fifty-six columns on a TM-T88, so this longer line of text wraps later than Font A would.", "font": "b"},
|
||||
{"type": "text", "text": "First paragraph.\nSecond paragraph after a newline.\n\n Indented paragraph after a blank line keeps its indentation when it wraps onto more lines."},
|
||||
{"type": "text", "text": "see https://example.com/a/very/long/path/that/is/longer/than/one/whole/line/of/the/receipt ok"},
|
||||
{"type": "text", "text": "aaaa bbbb trailing spaces at a break are dropped end "},
|
||||
{"type": "text", "text": "Centred text also wraps at word boundaries and each line is centred by the printer.", "align": "center"}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user