-1

Why i need to use it is because for some printers using TPrinter prints some weird hieroglyph at the beginning of the printable area.

My problem is that if i send some commands, nothing happens.

ESC E (#27 #69) - Sending this escape sequence didn't work as i expected. It removed first letter and rest of the string made bold. eg. Hello -> ello. After i changed it to ESC E ESC (#27 #69 #27), it worked fine. This example i managed to figure out, but...

trying to select character table "ESC t n" (#27 #116 n), to make "õäöü" work. This command just doesn't work. Nothing happens! And this command is supported by esc/p, esc/p 2 and 9-pin esc/p, so it should work just fine.

Manual can be found here.

If anyone has ever needed to use esc/p commands then maybe one can shed some light how to work with them!

Thanks in advance!

EDIT:

In my previous post i asked more or less the same question though answers were about how did i send commands to the printer. (I'll change my question there according to what was the answers!)

I accepted Ken's answer, because he claimed that the way i transferred the commands wasn't the best and i got it to work with Escape command. The problem was that after trying to use my program with another printer, it didn't work as expected, because it uses TPrinter.Begindoc and EndDoc.

So actually i must use the other solution that Rob Kennedy helped me with!

EDIT 2:

As it turned out, i used wrong manual, where commands are little different (though still supporting esc/p as it proclaims). Thank you all for your help!

PS! I still have a question: I need a character table where

245 = õ
228 = ä
246 = ö
252 = ü

which is iso 8859. But in manual there is no such character table or any similar to it. Should i do some string manipulation and replace eg 228 to 132 or does anyone know any better approuch?

I keep it unanswered for a while, and then accept stukelly's answer.

Community
  • 1
  • 1
Peacelyk
  • 1,126
  • 4
  • 24
  • 48
  • Possible duplicate ()[http://stackoverflow.com/questions/5936511/printing-with-esc-p-commands]! – user422039 May 10 '11 at 20:49
  • 3
    I don't think it's a duplicate. It's just more of the same. Raw printer coding is so horrid that this series of questions is likely to run and run and run. Why don't you just install some up-to-date drivers or buy another printer? – David Heffernan May 10 '11 at 21:30
  • @David: I'd probably disagree; this is a dupe in the same way a question `How do I print 'b' to the console?` would be to `How do I print '1' to the console?`. Also, @Peacelyk is printing to a receipt printer (from the previous question). Another driver or printer is probably not an option. – Ken White May 10 '11 at 21:43
  • Peacelyk, since you accepted [Ken's answer](http://stackoverflow.com/questions/5936511/printing-with-esc-p-commands/5937427#5937427) to the previous question, we should assume that you have changed your code to call `Escape` where you had previously been calling something else. Please show the new version of your code. (If you haven't changed your code, or if Ken's answer didn't really help, then you shouldn't have accepted an answer to the other question and this question contains no new information, so it is indeed a duplicate.) – Rob Kennedy May 10 '11 at 21:54
  • If you do decide to use ESC/POS commands and you need some help, come back and edit the question again. I have some production Delphi code that does various things to Epson T20/T88 etc. – robsoft May 11 '11 at 12:18

1 Answers1

2

Based on your previous question, I think you are using the wrong commands to control the EPSON TM-T70 receipt printer. After some research I found the product brochure and POSMicro both mention ESC/POS.

The ESC/POS command for turning bold on and off requires has a third value, as follows.

ASCII    ESC  E   n
Hex      1B   45  n
Decimal  27   69  n

Where n is 0 or 1, turning bold off or on.

Here is a detailed ESC/POS reference.

Community
  • 1
  • 1
stukelly
  • 4,257
  • 3
  • 37
  • 44