zaqaqaw / jzebra

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

Printing a receipt in arabic #137

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?
Print a receipt for a restaurant with table containing items name in arabic and 
quantity with indentation and Image if possible

What version of the product are you using? On what operating system?
latest version of jzebra. just downloaded it today on windows 7 and printer 
bixolon SRP-350II

Please provide any additional information below.
attached is the receipt I want and what I am printing now

Original issue reported on code.google.com by mohamedt...@gmail.com on 4 Jun 2013 at 10:56

Attachments:

GoogleCodeExporter commented 8 years ago
Mohamed,

Thank you for your interest in jZebra.  First, I would recommend contacting 
Bixolon for assistance with the BXL language.  For more information on the BXL 
language, see the Command Manual for your printer located here:
http://www.bixolon.com/upload/download/srp-350ii_command%20manual_rev_1_01.pdf

1. Do you have access to a BXL programming guide?  You may need to switch the 
printer's character table for Arabic (Page 22, Code #864 "Arabic").
http://www.bixolon.com/upload/download/srp-350ii_code%20pages_english_rev_1_00.p
df

2. How is the printer attached?  If it is USB, you should make sure to set up 
the Generic/Text driver.  Alternately, you can use the COM emulator from 
Bixolon's downloads section.  
http://www.bixolon.com/upload/download/bixolon%20vcom%20for%20usb%20driver.zip

-Tres

Original comment by tres.fin...@gmail.com on 4 Jun 2013 at 11:32

GoogleCodeExporter commented 8 years ago
Tres,
Thank you very much for the fast reply, but really i didn't understand point 1 
and yes the printer is attached via usb so I am following step 2. And other 
question can I use printHTML for the purpose I want?

Original comment by mohamedt...@gmail.com on 4 Jun 2013 at 11:47

GoogleCodeExporter commented 8 years ago
Mohamed,

I always suggest raw printing over HTML.

BXL is a raw printing language your printer supports, however you will need to 
learn the commands by following the programming guide.

https://code.google.com/p/jzebra/wiki/WhatIsRawPrinting

Original comment by tres.fin...@gmail.com on 5 Jun 2013 at 1:54

GoogleCodeExporter commented 8 years ago
Idk if someone else is going to need BXL sample, but in order not to struggle, 
like me for whole day, to figure it out here it is.
Find Command Manual for your printer here.
http://www.bixolon.com/upload/download/unified%20command%20manual_rev_1_01.pdf
For example I have SRP-150 and I want to select the character size.
Command for that is 'GS ! n'.
In order for this command to work we need to send it to printer as HEX.
In Command Manual you have HEX values for this command '1D 21 n'.Replace n with 
coresponding HEX value in this case its DEC(1) => HEX(01).
To use it with jZebra use it like this, \x indicates hexadecimal notation:
qz.append('\x1D\x21\x01\n');

I hope this will help to anyone who stumble across this in his search for 
answer.

Original comment by zemundu...@gmail.com on 17 Apr 2014 at 12:35

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
hey i have same problem when write Arabic characters  the printer on network 
(socket) write this Code :

 var builder = new StringBuilder();
            builder.AppendLine("سامر ");
            string szString = builder.ToString();
            string text = szString.ToString(); 

            string ip = "192.168.1.76";
            int port = 9100; 
            var textArr = text.ToCharArray(); 
            var data = Encoding.ASCII.GetBytes(textArr);

            var socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
            socket.NoDelay = true;

            var ipAddress = IPAddress.Parse(ip);
            IPEndPoint remoteEP = new IPEndPoint(ipAddress, port);

            socket.Connect(remoteEP);
            socket.Send(data);
            socket.Close(); 

BUT the result  print "????"
any one can help 

Original comment by s.dw...@gmail.com on 17 Jun 2015 at 8:22

GoogleCodeExporter commented 8 years ago
I do not see any QZ Print code in your example.  You need to verify you are 
actually using qz-print.

Also, our page has moved to https://github.com/qzind/qz-print

-Tres

Original comment by tres.fin...@gmail.com on 17 Jun 2015 at 4:15