Advertisement
Guest User

Untitled

a guest
Aug 11th, 2013
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.93 KB | None | 0 0
  1. '// ============================================================================
  2. '// Issuing receipts
  3. '// ============================================================================
  4.  
  5. '// Initialize printer
  6. ESC "@"
  7.  
  8. '// --- Print stamp --->>>
  9. '// Set line spacing: For the TM-T20, 1.13 mm (18/406 inches)
  10. ESC "3" 18
  11. '// Set unidirectional print mode: Cancel unidirectional print mode (Unnecessary
  12. '// in the TM-T20, so it is comment out)
  13. '// For models equipped with the ESC U command, implementation is recommended.
  14. '// Designate unidirectional printing with the ESC U command to get a print
  15. '// result with equal upper and lower parts for the stamp frame symbol
  16. '// ESC "U" 1
  17. '// Select justification: Centering
  18. ESC "a" 1
  19.  
  20. '// Select character size: (horizontal (times 2) x vertical (times 2))
  21. GS "!" 0x11
  22. '// Print stamp data and line feed: quadruple-size character section, 1st line
  23. 0xC9 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xBB LF
  24. '// Print stamp data and line feed: quadruple-size character section, 2nd line
  25. 0xBA 0x20 0x20 0x20 0x45 0x50 0x53 0x4F 0x4E 0x20 0x20 0x20 0xBA LF
  26. '// Print stamp data and line feed: quadruple-size character section, 3rd line
  27. '// Left frame and empty space data
  28. 0xBA 0x20 0x20 0x20
  29. '// Select character size: Normal size
  30. GS "!" 0x00
  31. '// Character string data in the frame
  32. "Thank you "
  33. '// Select character size: horizontal (times 2) x vertical (times 1)
  34. GS "!" 0x11
  35. '// Empty space and right frame data, and print and line feed
  36. 0x20 0x20 0x20 0xBA LF
  37. '// Print stamp data and line feed: quadruple-size character section, 4th line
  38. 0xC8 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xCD 0xBC LF
  39.  
  40. '// Initializing line spacing
  41. ESC "2"
  42. '// Set unidirectional print mode: Cancel unidirectional print mode
  43. '// (Unnecessary in the TM-T20, so it is comment out)
  44. '// ESC "U" 0
  45. '// Select character size: Normal size
  46. GS "!" 0x00
  47. '// --- Print stamp ---<<<
  48.  
  49.  
  50. '// --- Print the date and time --->>>
  51. '// Print and feed paper: In case TM-T20, feeding amount = 0.250 mm (4/406 inches)
  52. ESC "J" 4
  53. "NOVEMBER 1, 2012 10:30"
  54. '// Print and feed n lines: Feed the paper three lines
  55. ESC "d" 3
  56. '// --- Print the date and time ---<<<
  57.  
  58.  
  59. '// --- Print details A --->>>
  60. '// Select justification: Left justification
  61. ESC "a" 0
  62. '// Details text data and print and line feed
  63. "TM-Uxxx 6.75" LF
  64. "TM-Hxxx 6.00" LF
  65. "PS-xxx 1.70" LF LF
  66. '// --- Print details A ---<<<
  67.  
  68.  
  69. '// --- Print details B --->>>
  70. '// Set unidirectional print mode: Set unidirectional print mode
  71. '// (Unnecessary in the TM-T20, so it is comment out)
  72. '// For models equipped with the ESC U command, implementation is recommended.
  73. '// Designate unidirectional printing with the ESC U command to get a print
  74. '// result with equal upper and lower parts for double-height characters
  75. '// ESC "U" 1
  76. '// Select character size: horizontal (times 1) x vertical (times 2)
  77. GS "!" 0x01
  78. '// Details text data and print and line feed
  79. "TOTAL 14.45" LF
  80. '// Set unidirectional print mode: Cancel unidirectional print mode
  81. '// (Unnecessary in the TM-T20, so it is comment out)
  82. '// ESC "U" 0
  83. '// Select character size: Normal size
  84. GS "!" 0x00
  85. '// Details characters data and print and line feed
  86. "---------------------------------------" LF
  87. "PAID 50.00" LF
  88. "CHANGE 35.55" LF
  89. '// --- Print details B ---<<<
  90.  
  91.  
  92. '// --- Issue receipt --->>>
  93. '// Operating the drawer
  94. '// Generate pulse: Drawer kick-out connector pin 2, 2 x 2 ms on, 20 x 2 ms off
  95. ESC "p" 0 2 20
  96.  
  97. '// Select cut mode and cut paper: [Function B] Feed paper to (cutting position
  98. '// + 0 mm) and executes a partial cut (one point left uncut).
  99. GS "V" 66 0
  100. '// --- Issue receipt ---<<<
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement