你可以用打印机的控制码控制打印机。如:
Supported Commands|Command Name Function
HT Horizontal tab Print position
LF Print and line feed Print
CR Print and carriage return Print
DLE EOT Real-time status transmission Status
DLE ENQ Real-time request to printer Miscellaneous function
ESC SP Set right-side character spacing Character
ESC ! Select print mode(s) Character
ESC % Select/cancel user-defined character set Character
ESC &
Define user-defined characters Character 1-9
ESC [ Select bit-image mode Bit image 1-21
ESC – Turn underline mode on/off Character 1-15
ESC 2 Select default line spacing Line spacing 1-7
ESC 3 Set line spacing Line spacing 1-7
ESC < Return home Mechanism control 1-30
ESC = Select peripheral device Miscellaneous function 1-33
ESC ? Cancel user-defined characters Character 1-9
ESC @ Initialize printer Miscellaneous function 1-31
ESC D Set horizontal tab positions Print position 1-20
ESC E Turn emphasized mode on/off Character 1-15
ESC G Turndo
uble-strike mode on/off Character 1-16
ESC J Print and feed paper Print 1-5
ESC K Print and reverse feed Print 1-5
ESC R Select an international character set Character 1-12
ESC U Turn unidirectional printing mode on/off Mechanism control 1-30
ESC a Select justification Print position 1-21
ESC c 3 Select paper sensor(s) to output paper-endsignals Paper sensor 1-18
ESC c 4 Select paper sensor(s) to stop printing Paper sensor 1-18
ESC c 5 Enable/disable panel buttons Panel button 1-17
ESC d Print and feed n lines Print 1-6
ESC e Print and reverse feed n lines Print 1-6
ESC p Generate pulse Miscellaneous function 1-33
ESC t Select character code table Character 1-13
ESC { Turn upside-down printing mode on/off Character 1-16
GS I Transmit printer ID Miscellaneous function 1-32
GS V Select cut mode and cut paper Mechanism control 1-30
GS a Enable/disable Automatic Status Back (ASB) Status 1-22
GS r Transmit status Status 1-26
GS z 0 On-line recovery wait time Miscellaneous function