Issuing Receipts
Print Sample
![]() |
shows the paper cut position.
|

Programming Example
'// ============================================================================
'// Issuing receipts
'// ============================================================================
'// Initialize printer
ESC "@"
'// --- Print stamp --->>>
'// Set line spacing: For the TM-T20, 1.13 mm (18/406 inches)
ESC "3" 18
'// Set unidirectional print mode: Cancel unidirectional print mode (Unnecessary
'// in the TM-T20, so it is comment out)
'// For models equipped with the ESC U command, implementation is recommended.
'// Designate unidirectional printing with the ESC U command to get a print
'// result with equal upper and lower parts for the stamp frame symbol
'// ESC "U" 1
'// Select justification: Centering
ESC "a" 1
'// Select character size: (horizontal (times 2) x vertical (times 2))
GS "!" 0x11
'// Print stamp data and line feed: quadruple-size character section, 1st line
0xC9 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xBB LF
'// Print stamp data and line feed: quadruple-size character section, 2nd line
0xBA 0x20 0x20 0x20 0x45 0x50 0x53 0x4F 0x4E 0x20 0x20 0x20 0xBA LF
'// Print stamp data and line feed: quadruple-size character section, 3rd line
'// Left frame and empty space data
0xBA 0x20 0x20 0x20
'// Select character size: Normal size
GS "!" 0x00
'// Character string data in the frame
"Thank you "
'// Select character size: horizontal (times 2) x vertical (times 1)
GS "!" 0x11
'// Empty space and right frame data, and print and line feed
0x20 0x20 0x20 0xBA LF
'// Print stamp data and line feed: quadruple-size character section, 4th line
0xC8 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xBC LF
'// Initializing line spacing
ESC "2"
'// Set unidirectional print mode: Cancel unidirectional print mode
'// (Unnecessary in the TM-T20, so it is comment out)
'// ESC "U" 0
'// Select character size: Normal size
GS "!" 0x00
'// --- Print stamp ---<<<
'// --- Print the date and time --->>>
'// Print and feed paper: In case TM-T20, feeding amount = 0.250 mm (4/406 inches)
ESC "J" 4
"NOVEMBER 1, 2012 10:30"
'// Print and feed n lines: Feed the paper three lines
ESC "d" 3
'// --- Print the date and time ---<<<
'// --- Print details A --->>>
'// Select justification: Left justification
ESC "a" 0
'// Details text data and print and line feed
"TM-Uxxx 6.75" LF
"TM-Hxxx 6.00" LF
"PS-xxx 1.70" LF LF
'// --- Print details A ---<<<
'// --- Print details B --->>>
'// Set unidirectional print mode: Set unidirectional print mode
'// (Unnecessary in the TM-T20, so it is comment out)
'// For models equipped with the ESC U command, implementation is recommended.
'// Designate unidirectional printing with the ESC U command to get a print
'// result with equal upper and lower parts for double-height characters
'// ESC "U" 1
'// Select character size: horizontal (times 1) x vertical (times 2)
GS "!" 0x01
'// Details text data and print and line feed
"TOTAL 14.45" LF
'// Set unidirectional print mode: Cancel unidirectional print mode
'// (Unnecessary in the TM-T20, so it is comment out)
'// ESC "U" 0
'// Select character size: Normal size
GS "!" 0x00
'// Details characters data and print and line feed
"---------------------------------------" LF
"PAID 50.00" LF
"CHANGE 35.55" LF
'// --- Print details B ---<<<
'// --- Issue receipt --->>>
'// Operating the drawer
'// Generate pulse: Drawer kick-out connector pin 2, 2 x 2 ms on, 20 x 2 ms off
ESC "p" 0 2 20
'// Select cut mode and cut paper: [Function B] Feed paper to (cutting position
'// + 0 mm) and executes a partial cut (one point left uncut).
GS "V" 66 0
'// --- Issue receipt ---<<<
'// ============================================================================
'// Issuing receipts
'// ============================================================================
'// Initialize printer
ESC "@"
'// --- Print stamp --->>>
'// Set line spacing: For the TM-T20, 1.13 mm (18/406 inches)
ESC "3" 18
'// Set unidirectional print mode: Cancel unidirectional print mode (Unnecessary
'// in the TM-T20, so it is comment out)
'// For models equipped with the ESC U command, implementation is recommended.
'// Designate unidirectional printing with the ESC U command to get a print
'// result with equal upper and lower parts for the stamp frame symbol
'// ESC "U" 1
'// Select justification: Centering
ESC "a" 1
'// Select character size: (horizontal (times 2) x vertical (times 2))
GS "!" 0x11
'// Print stamp data and line feed: quadruple-size character section, 1st line
0xC9 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xBB LF
'// Print stamp data and line feed: quadruple-size character section, 2nd line
0xBA 0x20 0x20 0x20 0x45 0x50 0x53 0x4F 0x4E 0x20 0x20 0x20 0xBA LF
'// Print stamp data and line feed: quadruple-size character section, 3rd line
'// Left frame and empty space data
0xBA 0x20 0x20 0x20
'// Select character size: Normal size
GS "!" 0x00
'// Character string data in the frame
"Thank you "
'// Select character size: horizontal (times 2) x vertical (times 1)
GS "!" 0x11
'// Empty space and right frame data, and print and line feed
0x20 0x20 0x20 0xBA LF
'// Print stamp data and line feed: quadruple-size character section, 4th line
0xC8 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xBC LF
'// Initializing line spacing
ESC "2"
'// Set unidirectional print mode: Cancel unidirectional print mode
'// (Unnecessary in the TM-T20, so it is comment out)
'// ESC "U" 0
'// Select character size: Normal size
GS "!" 0x00
'// --- Print stamp ---<<<
'// --- Print the date and time --->>>
'// Print and feed paper: In case TM-T20, feeding amount = 0.250 mm (4/406 inches)
ESC "J" 4
"NOVEMBER 1, 2012 10:30"
'// Print and feed n lines: Feed the paper three lines
ESC "d" 3
'// --- Print the date and time ---<<<
'// --- Print details A --->>>
'// Select justification: Left justification
ESC "a" 0
'// Details text data and print and line feed
"TM-Uxxx 6.75" LF
"TM-Hxxx 6.00" LF
"PS-xxx 1.70" LF LF
'// --- Print details A ---<<<
'// --- Print details B --->>>
'// Set unidirectional print mode: Set unidirectional print mode
'// (Unnecessary in the TM-T20, so it is comment out)
'// For models equipped with the ESC U command, implementation is recommended.
'// Designate unidirectional printing with the ESC U command to get a print
'// result with equal upper and lower parts for double-height characters
'// ESC "U" 1
'// Select character size: horizontal (times 1) x vertical (times 2)
GS "!" 0x01
'// Details text data and print and line feed
"TOTAL 14.45" LF
'// Set unidirectional print mode: Cancel unidirectional print mode
'// (Unnecessary in the TM-T20, so it is comment out)
'// ESC "U" 0
'// Select character size: Normal size
GS "!" 0x00
'// Details characters data and print and line feed
"---------------------------------------" LF
"PAID 50.00" LF
"CHANGE 35.55" LF
'// --- Print details B ---<<<
'// --- Issue receipt --->>>
'// Operating the drawer
'// Generate pulse: Drawer kick-out connector pin 2, 2 x 2 ms on, 20 x 2 ms off
ESC "p" 0 2 20
'// Select cut mode and cut paper: [Function B] Feed paper to (cutting position
'// + 0 mm) and executes a partial cut (one point left uncut).
GS "V" 66 0
'// --- Issue receipt ---<<<
|
Quick Access
- [Name]
- [Format]
- [Range]
- [Description]
- [Notes]
ESC/POS® includes patented or patent pending commands. The contents must not be disclosed
to third parties.
- Introduction
- Command Lists
- Commands in Code Order
- Applicable printers
- Command List by Model
- EU-m30
- TM-J2000, TM-J2100
- TM-L90
- TM-L90 LFC
- TM-L100
- TM-m10
- TM-m30
- TM-m30II
- TM-m30II-H
- TM-m30II-NT
- TM-m30II-S
- TM-m30II-SL
- TM-m30III
- TM-m30III-H
- TM-m50
- TM-m50II
- TM-m50II-H
- TM-P20
- TM-P20II
- TM-P60
- TM-P60II
- TM-P80
- TM-P80II
- TM-T100
- TM-T20
- TM-T20II
- TM-T20III
- TM-T20IIIL
- TM-T20IV
- TM-T20IV-L
- TM-T20IV-SP
- TM-T20X
- TM-T20X-II
- TM-T70
- TM-T70II
- TM-T81III
- TM-T82II
- TM-T82III
- TM-T82IIIL
- TM-T82IV
- TM-T82IV-L
- TM-T82X
- TM-T82X-II
- TM-T83III
- TM-T83IV
- TM-T88IV
- TM-T88V
- TM-T88VI
- TM-T88VII
- TM-T90
- TM-U220
- TM-U220II
- TM-U230
- Obsolete Commands
- Commands Arranged by Function
- Print Commands
- Line Spacing Commands
- Character Commands
- Printing Paper Commands
- Label and black mark control
- Print Position Commands
- Paper Sensor Commands
- Mechanism Control Commands
- Bit Image Commands
- Bit Image
- GS ( L / GS 8 L
- GS D
- Graphics
- NV Graphics
- Download Graphics
- Panel Button Commands
- Status Commands
- Barcode Commands
- Two-dimensional Code Commands
- GS ( k
- PDF417
- QR Code
- MaxiCode
- 2-dimensional GS1 DataBar
- Composite Symbology
- Aztec Code
- DataMatrix
- Macro Function Commands
- Kanji Commands
- Miscellaneous Commands
- DLE ENQ
- DLE DC4 <fn=1>
- DLE DC4 <fn=2>
- DLE DC4 <fn=3>
- DLE DC4 <fn=7>
- DLE DC4 <fn=8>
- ESC ( Y
- ESC =
- ESC @
- ESC L
- ESC S
- ESC p
- GS ( A
- GS ( D
- GS I
- GS P
- GS g 0
- GS g 2
- GS z 0
- Response or status transmission
- Print control methods
- Beeper tone control
- Graphics drawing
- Receipt enhancement control
- Page mode control
- Customize Commands
- User setup
- GS ( E
- GS ( E <fn=1>
- GS ( E <fn=2>
- GS ( E <fn=3>
- GS ( E <fn=4>
- GS ( E <fn=5>
- GS ( E <fn=6>
- GS ( E <fn=7>
- GS ( E <fn=8>
- GS ( E <fn=9>
- GS ( E <fn=10>
- GS ( E <fn=11>
- GS ( E <fn=12>
- GS ( E <fn=13>
- GS ( E <fn=14>
- GS ( E <fn=15>
- GS ( E <fn=16>
- GS ( E <fn=48>
- GS ( E <fn=49>
- GS ( E <fn=50>
- GS ( E <fn=51>
- GS ( E <fn=52>
- GS ( E <fn=99>
- GS ( E <fn=100>
- Printer customization
- NV user memory
- User setup
- Counter Printing Commands
- Programming Examples
- Appendixes


