Closed GoogleCodeExporter closed 9 years ago
Gerard,
It is likely that the printer you are using is using the ESC/P emulation.
This is very popular for Epson printers. Zebra specializes in their own
languages (ZPL, EPL, etc) so they would not be the experts in this field.
The mailing list (jzebra-users@googlegroups.com) has a few people that have had
much success with ESC/P.
For starters, I can tell warn that JavaScript is incompatible with the "Null"
character, or "\x00", so if you are using that anywhere in your script, you may
need to use "appendNull()". Even this approach has had limited success, so
most people prepare the data in base64 format using a server-side language and
then use append64.
-Tres
Original comment by tres.fin...@gmail.com
on 5 Mar 2013 at 4:01
Hi Tres,
That is correct, I use "\x00" quite a few times for the barcode settings.
('\x1B\x42\x53\x00\x00\x48\x00\x00\x00\x00\x40\x00\x02\x02' )
How can I apply appendNull() (as I could not find an example on the jZebra
documentation).
And secondly, if I should use the base64 method; what exacttly should I
'base64'? Is it the total string as in brackets above? Or should I just use
hex-only code without the "\x" ?
THanks for your reply !
-Gerard
Original comment by gcromb...@gmail.com
on 6 Mar 2013 at 7:29
Gerard,
> 1. How can I apply appendNull()
1. appendNull() can get ugly. Here's how it's intended to be used (but again,
there's been marginal success with it).
Pseudocode, not tested. ;)
> applet.append('\x1B\x42\x53');
> applet.appendNull(); applet.appendNull();
> applet.append('\x48');
> applet.appendNull(); applet.appendNull();applet.appendNull();
applet.appendNull();
> applet.append('\x40\');
> applet.appendNull();
> applet.append('\x02\x02');
Future versions will correct this by allowing a special character (probably
"\\x00") and then replace it internally.
This bug is caused by JavaScript using the "\x00" null character to terminate
Strings. This is consistent across all browsers.
> 2. I should use the base64 method; what exacttly should I 'base64'?
2. Base64 would be done by a language other than JavaScript (php, asp, etc).
Essentially. The hex would look different, for example in php, I belive null
is represented as "\0", so the hex would remain the same, but the escaping
would follow that of your server language.
-Tres
Original comment by tres.fin...@gmail.com
on 7 Mar 2013 at 1:19
Hi Tres,
I have tried the appendNul() but it didnt work. I have resolved it by creating
each time a file with all hex codes and then use the print file command with
jZebra. This works great and have put it in production allready. Thank you for
your support and quick responses !! Regards, Gerard
Original comment by gcromb...@gmail.com
on 16 Mar 2013 at 6:01
Changes 1.5.4:
- Fix for appendHex() now allows "x1B" instead of "\x1B", fixing the "\x00"
bug. Just use "x00".
Please test and let me know if it's working.
Also, I've fixed the bug in the appendNull() command so that should work too.
Let me know if it fixes it.
-Tres
Original comment by tres.fin...@gmail.com
on 3 Aug 2013 at 7:18
Original comment by tres.fin...@gmail.com
on 3 Aug 2013 at 7:22
Original issue reported on code.google.com by
gcromb...@gmail.com
on 4 Mar 2013 at 6:43