thiennguyenenv / jzebra

Automatically exported from code.google.com/p/jzebra
0 stars 1 forks source link

print with tis-620 #229

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.I can't print with ascii code
2.
3.

What is the expected output? What do you see instead?
i want show thai language. but out put show ???? maybe some language I can't 
read.

What version of the product are you using? On what operating system?
1.8.0

Please provide any additional information below.
Sorry, for my english. I use printer EPSON LQ-300+ /II ESC/P2.
I want it show thailanguage(TIS-620) but I don't know what to do.

Original issue reported on code.google.com by T.phongp...@gmail.com on 5 Dec 2014 at 3:38

GoogleCodeExporter commented 9 years ago
This should work, but you will need to know the codepage (encoding) commands 
for your printer.

This usually requires determining the commands from a chart on the EPSON ESC/P 
programming manual.

Original comment by tres.fin...@gmail.com on 5 Dec 2014 at 5:27

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Thank you for your reply.
I found some thing.

Format
ASCII ESC ( t nL nH d1 d2 d3
Hex 1B 28 74 nL nH d1 d2 d3
Decimal 27 40 116 nL nH d1 d2 d3

d2 d3 Table name
20 0 TIS18 (GENERAL Thai)

but i don't know. What does it mean.
please tell me. what can i do next.
I find another Issue. but I don't know how to use function with jzebra.
I try qz.appendHex("1B2874nLnHd1200"); but It doesn't work.

Original comment by T.phongp...@gmail.com on 5 Dec 2014 at 6:10

GoogleCodeExporter commented 9 years ago
The ESC/P manual can be very confusing.

This part is correct syntax:
x1Bx28x74

This part needs to be determined:
nL nH ---> usually represents a Low Bit and a High Bit, i.e. x00x00 to xFFxFF, 
unsure the context, sorry

This part 
 d1 d2 d3 --> x??x20x00 (I do not know what d1 represents in this context, sorry)

You are getting closer...

Original comment by tres.fin...@gmail.com on 5 Dec 2014 at 6:16

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Thank you very much for your quick response.

I found something about d1.

Assigns the d2 registered character table to the d1 character table according 
to the following values(the d1 character table is one of the four tables 
selectable with the ESC t command):

I don't know ESC t command mean.

but now I try something like this.

qz.appendHex("x1Bx28x74xFFxFFx0x20x00");
qz.append('ทดสอบ');
qz.print();

Printer has not printing.

Original comment by T.phongp...@gmail.com on 5 Dec 2014 at 6:47

GoogleCodeExporter commented 9 years ago
> xFFxFF

These can't be blindly set, they are low-bits and high-bits of a parameter.  
Can you link me the PDF and page number you are referencing for your exact 
model printer?  I will have our ESCP guy take a look!

-Tres

Original comment by tres.fin...@gmail.com on 5 Dec 2014 at 2:54

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
thank you again for your help.

https://drive.google.com/file/d/0B-WBCF1vpAR2QjlUc3VLbHh3bnM/view?usp=sharing

page 80

Sorry, If I wrong because I can't see my printer model in this document but I 
saw LQ300 i think it would be the same.

Thank you.

Original comment by T.phongp...@gmail.com on 6 Dec 2014 at 1:28

GoogleCodeExporter commented 9 years ago
You may want to contact the manufacturer about this, but according to the 
reference manual below, the LQ-300+ does not support a thai character set. If 
Epson can confirm this, then you may want to use another printer.

http://www.aurelie.net/aurelie/hotline/mode_emploi/escp.pdf

Original comment by Lite.M.F...@gmail.com on 6 Dec 2014 at 3:01

GoogleCodeExporter commented 9 years ago
Thank you for your reply.
My printer has thai language because when I shut down and open with press 
button(font). It was printed thai character (TIS-18).
I think my printer model LQ-300+II

Original comment by T.phongp...@gmail.com on 6 Dec 2014 at 3:09

GoogleCodeExporter commented 9 years ago
Is the printer connected via USB or Parallel Port? Is it set up as a 
raw/generic printer on your system?

Original comment by Lite.M.F...@gmail.com on 6 Dec 2014 at 3:25

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I connected with Parallel Port(LPT1).
now I try a ESCPCommands.
like this qz.append("\x1B\x28\x74\x03\x00\x1B\x74\x200\x20\x00");
It didn't work.

Original comment by T.phongp...@gmail.com on 6 Dec 2014 at 4:37

GoogleCodeExporter commented 9 years ago
@t.phongphisut,

If your code requires \x00, you MUST use qz.appendHex(...).  This is because 
\x00 = NUL and JavaScript is a null-terminated-string language.

i.e. qz.appendHex("x1Bx28x74x03x00x1Bx74x20x20x00");

But I see another problem... x200 <------- Invalid hex?!

:)

-Tres

Original comment by tres.fin...@gmail.com on 7 Dec 2014 at 2:03