B4J Question ESC/POS printer commands

elitevenkat

Active Member
Licensed User
Longtime User
i am creating a txt file with billing info. i use cmd command and redirect to local/network printer.
The document is printed but the printer ignores the esc/pos command for
emphasised mode
B4X:
bp.WriteLine(Chr(27) & Chr(29) & "I" & Chr(8) & Utils.CalignText(Main.cHotelName,40) & Chr(27) & Chr(29) & "I" & Chr(0))
   
'bp is the file object

paper cut
B4X:
bp.WriteLine(Chr(27) & Chr(29)  & "V" & Chr(65) & Chr(1)) '; ←Feed paper And cut
    bp.Close

the above control commands don't work.

the printer is epson tmu220

any help ?
 

Daestrum

Expert
Licensed User
Longtime User
Have you tried writing them as bytes instead of char, as it's probably sending the Unicode value?
 
Upvote 0

elitevenkat

Active Member
Licensed User
Longtime User
Have you tried writing them as bytes instead of char, as it's probably sending the Unicode value?

the following code works. added "@"
B4X:
bp.WriteLine(Chr(27) & "@" & Chr(29)  & "V" & Chr(65) & Chr(1)) '; ←Feed paper And cut

have to try for correct command for emphasised mode.
 
Upvote 0
Top