Closed GoogleCodeExporter closed 9 years ago
Can you attach a console output?
-Tres
Original comment by tres.fin...@gmail.com
on 26 Apr 2012 at 1:31
Hopefully this is what you need. I am new to this.
Thanks Dave
On Wed, Apr 25, 2012 at 8:31 PM, <jzebra@googlecode.com> wrote:
Original comment by dave.ol...@gmail.com
on 30 Apr 2012 at 3:31
Dave,
I don't think the attachment came through. Can you try it again? You can save
it to a text file and upload it using the (Attach a file) button, or paste the
contents directly in the comment window, which ever is easier for you.
The console output can be seen (on Windows) by right clicking the Java icon in
the system tray and clicking "Open 1.6.0_xx Console".
Copy from "Info jZebra 1.x.x" on.
-Tres
Original comment by tres.fin...@gmail.com
on 30 Apr 2012 at 4:56
Dave, feel free to reopen this bug if you can provide more details. Closing
and marking as invalid, since many others are using this on Zebra printers
without this problems.
Original comment by tres.fin...@gmail.com
on 23 May 2012 at 12:57
I am experiencing this as well. The console output shows only what ends up
being printed, and not the full request.
Original comment by aes...@gmail.com
on 14 Jun 2012 at 3:22
@aesova: I'm reopening this bug, but I need more details. Can you provide a
console output or a copy of the XML file you are trying to print?
Original comment by tres.fin...@gmail.com
on 14 Jun 2012 at 6:43
[deleted comment]
It might be better if I open a new issue - I am printing to a different printer
using a different function - let me know you think. But the general issue is
the same - if I send a large number of labels I don't always get them all.
For example I send this: (printEPL is a modification of the javascript print
function that accepts full EPL strings since they are generated by our system
and vary depending on the situation):
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999004`|n|B230,23,0,1,2,2,20,N,`999006`|n|B30,74
,0,1,3,12,34,N,`002999006256`|n|A30,110,0,4,1,1,N,`ACK-999006-ADA`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999004`|n|B230,23,0,1,2,2,20,N,`999006`|n|B30,74
,0,1,3,12,34,N,`002999006257`|n|A30,110,0,4,1,1,N,`ACK-999006-ADI`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999004`|n|B230,23,0,1,2,2,20,N,`999006`|n|B30,74
,0,1,3,12,34,N,`002999006255`|n|A30,110,0,4,1,1,N,`ACK-999006-ADO`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999004`|n|B230,23,0,1,2,2,20,N,`999006`|n|B30,74
,0,1,3,12,34,N,`002999006359`|n|A30,110,0,4,1,1,N,`ACK-999006-CAF`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999004`|n|B230,23,0,1,2,2,20,N,`999006`|n|B30,74
,0,1,3,12,34,N,`002999006261`|n|A30,110,0,4,1,1,N,`ACK-999006-CBC`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999004`|n|B230,23,0,1,2,2,20,N,`999006`|n|B30,74
,0,1,3,12,34,N,`002999006262`|n|A30,110,0,4,1,1,N,`ACK-999006-CDF`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999004`|n|B230,23,0,1,2,2,20,N,`999006`|n|B30,74
,0,1,3,12,34,N,`002999006357`|n|A30,110,0,4,1,1,N,`ACK-999006-AVF`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999004`|n|B230,23,0,1,2,2,20,N,`999006`|n|B30,74
,0,1,3,12,34,N,`002999006330`|n|A30,110,0,4,1,1,N,`ACK-999006-OAR`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999006`|n|B230,23,0,1,2,2,20,N,`999006`|n|B30,74
,0,1,3,12,34,N,`002999006270`|n|A30,110,0,4,1,1,N,`ACK-999006-MBC`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999006`|n|B230,23,0,1,2,2,20,N,`999006`|n|B30,74
,0,1,3,12,34,N,`002999006271`|n|A30,110,0,4,1,1,N,`ACK-999006-MDF`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999008`|n|B230,23,0,1,2,2,20,N,`999006`|n|B30,74
,0,1,3,12,34,N,`002999006276`|n|A30,110,0,4,1,1,N,`ACK-999006-DBC`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999004`|n|B230,23,0,1,2,2,20,N,`999006`|n|B30,74
,0,1,3,12,34,N,`002999006253`|n|A30,110,0,4,1,1,N,`ACK-999006-MRF`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999004`|n|B230,23,0,1,2,2,20,N,`999006`|n|B30,74
,0,1,3,12,34,N,`002999006243`|n|A30,110,0,4,1,1,N,`ACK-999006-STQ`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999004`|n|B230,23,0,1,2,2,20,N,`999006`|n|B30,74
,0,1,3,12,34,N,`002999006303`|n|A30,110,0,4,1,1,N,`ACK-999006-SCC`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999004`|n|B230,23,0,1,2,2,20,N,`999006`|n|B30,74
,0,1,3,12,34,N,`002999006254`|n|A30,110,0,4,1,1,N,`ACK-999006-VSF`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999004`|n|B230,23,0,1,2,2,20,N,`051677`|n|B30,74
,0,1,3,12,34,N,`002051677318`|n|A30,110,0,4,1,1,N,`ACK-051677-CBF`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999004`|n|B230,23,0,1,2,2,20,N,`051677`|n|B30,74
,0,1,3,12,34,N,`002051677319`|n|A30,110,0,4,1,1,N,`ACK-051677-CBG`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999004`|n|B230,23,0,1,2,2,20,N,`051677`|n|B30,74
,0,1,3,12,34,N,`002051677320`|n|A30,110,0,4,1,1,N,`ACK-051677-CBH`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999004`|n|B230,23,0,1,2,2,20,N,`051677`|n|B30,74
,0,1,3,12,34,N,`002051677321`|n|A30,110,0,4,1,1,N,`ACK-051677-CBI`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999004`|n|B230,23,0,1,2,2,20,N,`051677`|n|B30,74
,0,1,3,12,34,N,`002051677322`|n|A30,110,0,4,1,1,N,`ACK-051677-CBJ`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999004`|n|B230,23,0,1,2,2,20,N,`051677`|n|B30,74
,0,1,3,12,34,N,`002051677323`|n|A30,110,0,4,1,1,N,`ACK-051677-CBK`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999004`|n|B230,23,0,1,2,2,20,N,`051677`|n|B30,74
,0,1,3,12,34,N,`002051677305`|n|A30,110,0,4,1,1,N,`ACK-051677-CGC`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999004`|n|B230,23,0,1,2,2,20,N,`051677`|n|B30,74
,0,1,3,12,34,N,`002051677225`|n|A30,110,0,4,1,1,N,`ACK-051677-CSA`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999006`|n|B230,23,0,1,2,2,20,N,`051679`|n|B30,74
,0,1,3,12,34,N,`002051679324`|n|A30,110,0,4,1,1,N,`ACK-051679-MBF`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999006`|n|B230,23,0,1,2,2,20,N,`051679`|n|B30,74
,0,1,3,12,34,N,`002051679325`|n|A30,110,0,4,1,1,N,`ACK-051679-MBG`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999006`|n|B230,23,0,1,2,2,20,N,`051679`|n|B30,74
,0,1,3,12,34,N,`002051679326`|n|A30,110,0,4,1,1,N,`ACK-051679-MBH`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999006`|n|B230,23,0,1,2,2,20,N,`051679`|n|B30,74
,0,1,3,12,34,N,`002051679306`|n|A30,110,0,4,1,1,N,`ACK-051679-MGC`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999006`|n|B230,23,0,1,2,2,20,N,`051679`|n|B30,74
,0,1,3,12,34,N,`002051679233`|n|A30,110,0,4,1,1,N,`ACK-051679-MSA`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999008`|n|B230,23,0,1,2,2,20,N,`051681`|n|B30,74
,0,1,3,12,34,N,`002051681229`|n|A30,110,0,4,1,1,N,`ACK-051681-DSA`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999004`|n|B230,23,0,1,2,2,20,N,`051677`|n|B30,74
,0,1,3,12,34,N,`002051677901`|n|A30,110,0,4,1,1,N,`ACK-051677-T01`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999006`|n|B230,23,0,1,2,2,20,N,`051679`|n|B30,74
,0,1,3,12,34,N,`002051679901`|n|A30,110,0,4,1,1,N,`ACK-051679-T01`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999008`|n|B230,23,0,1,2,2,20,N,`051681`|n|B30,74
,0,1,3,12,34,N,`002051681277`|n|A30,110,0,4,1,1,N,`ACK-051681-DDF`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999008`|n|B230,23,0,1,2,2,20,N,`051681`|n|B30,74
,0,1,3,12,34,N,`002051681327`|n|A30,110,0,4,1,1,N,`ACK-051681-DBF`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999008`|n|B230,23,0,1,2,2,20,N,`051681`|n|B30,74
,0,1,3,12,34,N,`002051681328`|n|A30,110,0,4,1,1,N,`ACK-051681-DBG`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999008`|n|B230,23,0,1,2,2,20,N,`051681`|n|B30,74
,0,1,3,12,34,N,`002051681329`|n|A30,110,0,4,1,1,N,`ACK-051681-DBH`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999008`|n|B230,23,0,1,2,2,20,N,`051681`|n|B30,74
,0,1,3,12,34,N,`002051681307`|n|A30,110,0,4,1,1,N,`ACK-051681-DGC`|n|');
printEPL('N|n|q457|n|Q154,24|n|D14|n|A150,0,0,4,1,1,N,`ASDF`|n|A30,23,0,4,1,1,N,
`F:54509`|n|A30,48,0,4,1,1,N,`P:999008`|n|B230,23,0,1,2,2,20,N,`051681`|n|B30,74
,0,1,3,12,34,N,`002051681901`|n|A30,110,0,4,1,1,N,`ACK-051681-T01`|n|');
Once it might give me this:
Java Plug-in 1.6.0_31
Using JRE version 1.6.0_31-b05 Java HotSpot(TM) Client VM
User home directory = C:\Users\babcocmi
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
Jun 15, 2012 10:54:20 AM jzebra.LogIt log
INFO: ===== SENDING DATA TO THE PRINTER =====
Jun 15, 2012 10:54:20 AM jzebra.LogIt log
INFO:
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999004"
B230,23,0,1,2,2,20,N,"999006"
B30,74,0,1,3,12,34,N,"002999006256"
A30,110,0,4,1,1,N,"ACK-999006-ADA"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999004"
B230,23,0,1,2,2,20,N,"999006"
B30,74,0,1,3,12,34,N,"002999006257"
A30,110,0,4,1,1,N,"ACK-999006-ADI"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999004"
B230,23,0,1,2,2,20,N,"999006"
B30,74,0,1,3,12,34,N,"002999006255"
A30,110,0,4,1,1,N,"ACK-999006-ADO"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999004"
B230,23,0,1,2,2,20,N,"999006"
B30,74,0,1,3,12,34,N,"002999006359"
A30,110,0,4,1,1,N,"ACK-999006-CAF"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999004"
B230,23,0,1,2,2,20,N,"999006"
B30,74,0,1,3,12,34,N,"002999006261"
A30,110,0,4,1,1,N,"ACK-999006-CBC"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999004"
B230,23,0,1,2,2,20,N,"999006"
B30,74,0,1,3,12,34,N,"002999006262"
A30,110,0,4,1,1,N,"ACK-999006-CDF"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999004"
B230,23,0,1,2,2,20,N,"999006"
B30,74,0,1,3,12,34,N,"002999006357"
A30,110,0,4,1,1,N,"ACK-999006-AVF"
Jun 15, 2012 10:54:20 AM jzebra.LogIt log
INFO: Sending print job to printer: "Zebra LP 2824"
Jun 15, 2012 10:54:20 AM jzebra.LogIt log
INFO: Print job data transfer complete.
Jun 15, 2012 10:54:20 AM jzebra.LogIt log
INFO: Print job has no more events.
Jun 15, 2012 10:54:20 AM jzebra.LogIt log
INFO: Print job received by printer: "Zebra LP 2824"
Jun 15, 2012 10:54:20 AM jzebra.LogIt log
INFO: ===== SENDING DATA TO THE PRINTER =====
Jun 15, 2012 10:54:20 AM jzebra.LogIt log
INFO:
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999008"
B230,23,0,1,2,2,20,N,"051681"
B30,74,0,1,3,12,34,N,"002051681329"
A30,110,0,4,1,1,N,"ACK-051681-DBH"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999008"
B230,23,0,1,2,2,20,N,"051681"
B30,74,0,1,3,12,34,N,"002051681307"
A30,110,0,4,1,1,N,"ACK-051681-DGC"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999008"
B230,23,0,1,2,2,20,N,"051681"
B30,74,0,1,3,12,34,N,"002051681901"
A30,110,0,4,1,1,N,"ACK-051681-T01"
P1,1
N
Jun 15, 2012 10:54:20 AM jzebra.LogIt log
INFO: Sending print job to printer: "Zebra LP 2824"
Jun 15, 2012 10:54:20 AM jzebra.LogIt log
INFO: Print job data transfer complete.
Jun 15, 2012 10:54:20 AM jzebra.LogIt log
INFO: Print job has no more events.
Jun 15, 2012 10:54:20 AM jzebra.LogIt log
INFO: Print job received by printer: "Zebra LP 2824"
Another time it might give me this:
Java Plug-in 1.6.0_31
Using JRE version 1.6.0_31-b05 Java HotSpot(TM) Client VM
User home directory = C:\Users\babcocmi
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
Jun 15, 2012 10:57:22 AM jzebra.LogIt log
INFO: ===== SENDING DATA TO THE PRINTER =====
Jun 15, 2012 10:57:22 AM jzebra.LogIt log
INFO:
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999004"
B230,23,0,1,2,2,20,N,"999006"
B30,74,0,1,3,12,34,N,"002999006256"
A30,110,0,4,1,1,N,"ACK-999006-ADA"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999004"
B230,23,0,1,2,2,20,N,"999006"
B30,74,0,1,3,12,34,N,"002999006257"
A30,110,0,4,1,1,N,"ACK-999006-ADI"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999004"
B230,23,0,1,2,2,20,N,"999006"
B30,74,0,1,3,12,34,N,"002999006255"
A30,110,0,4,1,1,N,"ACK-999006-ADO"
P1,1
N
Jun 15, 2012 10:57:22 AM jzebra.LogIt log
INFO: Sending print job to printer: "Zebra LP 2824"
Jun 15, 2012 10:57:22 AM jzebra.LogIt log
INFO: Print job data transfer complete.
Jun 15, 2012 10:57:22 AM jzebra.LogIt log
INFO: Print job has no more events.
Jun 15, 2012 10:57:22 AM jzebra.LogIt log
INFO: Print job received by printer: "Zebra LP 2824"
Jun 15, 2012 10:57:22 AM jzebra.LogIt log
INFO: ===== SENDING DATA TO THE PRINTER =====
Jun 15, 2012 10:57:22 AM jzebra.LogIt log
INFO:
Jun 15, 2012 10:57:22 AM jzebra.LogIt log
INFO: Sending print job to printer: "Zebra LP 2824"
Jun 15, 2012 10:57:22 AM jzebra.LogIt log
INFO: Print job data transfer complete.
Jun 15, 2012 10:57:22 AM jzebra.LogIt log
INFO: Print job has no more events.
Jun 15, 2012 10:57:22 AM jzebra.LogIt log
INFO: Print job received by printer: "Zebra LP 2824"
Sometimes (usually after first opening the browser, I'll get a full set, or
closer to it - this is usually if it's just after opening a fresh session and
when it's the first time I've requested a label set.)
Java Plug-in 1.6.0_31
Using JRE version 1.6.0_31-b05 Java HotSpot(TM) Client VM
User home directory = C:\Users\babcocmi
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
Jun 15, 2012 11:20:42 AM jzebra.LogIt log
INFO: jZebra 1.3.5
Jun 15, 2012 11:20:42 AM jzebra.LogIt log
INFO: ===== JAVASCRIPT LISTENER THREAD STARTED =====
Jun 15, 2012 11:20:42 AM jzebra.LogIt log
INFO: Current printer charset encoding: windows-1252
Jun 15, 2012 11:20:42 AM jzebra.LogIt log
INFO: ===== SEARCHING FOR PRINTER =====
Jun 15, 2012 11:20:42 AM jzebra.LogIt log
INFO: Found 6 attached printers.
Jun 15, 2012 11:20:42 AM jzebra.LogIt log
INFO: Printer specified: \Qzebra\E
Jun 15, 2012 11:20:42 AM jzebra.LogIt log
INFO: Printer name match: Zebra LP 2824
Jun 15, 2012 11:20:42 AM jzebra.LogIt log
INFO: Printer name match: Zebra LP2844
Jun 15, 2012 11:20:42 AM jzebra.LogIt log
INFO: Printer name match: BARCODE - Zebra TLP2844
Jun 15, 2012 11:20:42 AM jzebra.LogIt log
INFO: Using best match: BARCODE - Zebra TLP2844
Jun 15, 2012 11:24:04 AM jzebra.LogIt log
INFO: ===== SEARCHING FOR PRINTER =====
Jun 15, 2012 11:24:04 AM jzebra.LogIt log
INFO: Found 6 attached printers.
Jun 15, 2012 11:24:04 AM jzebra.LogIt log
INFO: Printer specified: \QZebra LP2844\E
Jun 15, 2012 11:24:04 AM jzebra.LogIt log
INFO: Printer name match: Zebra LP2844
Jun 15, 2012 11:24:04 AM jzebra.LogIt log
INFO: Using best match: Zebra LP2844
Jun 15, 2012 11:24:21 AM jzebra.LogIt log
INFO: ===== SEARCHING FOR PRINTER =====
Jun 15, 2012 11:24:21 AM jzebra.LogIt log
INFO: Found 6 attached printers.
Jun 15, 2012 11:24:21 AM jzebra.LogIt log
INFO: Printer specified: \QZebra LP 2824\E
Jun 15, 2012 11:24:21 AM jzebra.LogIt log
INFO: Printer name match: Zebra LP 2824
Jun 15, 2012 11:24:21 AM jzebra.LogIt log
INFO: Using best match: Zebra LP 2824
Jun 15, 2012 11:24:25 AM jzebra.LogIt log
INFO: ===== SENDING DATA TO THE PRINTER =====
Jun 15, 2012 11:24:25 AM jzebra.LogIt log
INFO:
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999004"
B230,23,0,1,2,2,20,N,"999006"
B30,74,0,1,3,12,34,N,"002999006256"
A30,110,0,4,1,1,N,"ACK-999006-ADA"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999004"
B230,23,0,1,2,2,20,N,"999006"
B30,74,0,1,3,12,34,N,"002999006257"
A30,110,0,4,1,1,N,"ACK-999006-ADI"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999004"
B230,23,0,1,2,2,20,N,"999006"
B30,74,0,1,3,12,34,N,"002999006255"
A30,110,0,4,1,1,N,"ACK-999006-ADO"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999004"
B230,23,0,1,2,2,20,N,"999006"
B30,74,0,1,3,12,34,N,"002999006359"
A30,110,0,4,1,1,N,"ACK-999006-CAF"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999004"
B230,23,0,1,2,2,20,N,"999006"
B30,74,0,1,3,12,34,N,"002999006261"
A30,110,0,4,1,1,N,"ACK-999006-CBC"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999004"
B230,23,0,1,2,2,20,N,"999006"
B30,74,0,1,3,12,34,N,"002999006262"
A30,110,0,4,1,1,N,"ACK-999006-CDF"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999004"
B230,23,0,1,2,2,20,N,"999006"
B30,74,0,1,3,12,34,N,"002999006357"
A30,110,0,4,1,1,N,"ACK-999006-AVF"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999004"
B230,23,0,1,2,2,20,N,"999006"
B30,74,0,1,3,12,34,N,"002999006330"
A30,110,0,4,1,1,N,"ACK-999006-OAR"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999006"
B230,23,0,1,2,2,20,N,"999006"
B30,74,0,1,3,12,34,N,"002999006270"
A30,110,0,4,1,1,N,"ACK-999006-MBC"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999006"
B230,23,0,1,2,2,20,N,"999006"
B30,74,0,1,3,12,34,N,"002999006271"
A30,110,0,4,1,1,N,"ACK-999006-MDF"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999008"
B230,23,0,1,2,2,20,N,"999006"
B30,74,0,1,3,12,34,N,"002999006276"
A30,110,0,4,1,1,N,"ACK-999006-DBC"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999004"
B230,23,0,1,2,2,20,N,"999006"
B30,74,0,1,3,12,34,N,"002999006253"
A30,110,0,4,1,1,N,"ACK-999006-MRF"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999004"
B230,23,0,1,2,2,20,N,"999006"
B30,74,0,1,3,12,34,N,"002999006243"
A30,110,0,4,1,1,N,"ACK-999006-STQ"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999004"
B230,23,0,1,2,2,20,N,"999006"
B30,74,0,1,3,12,34,N,"002999006303"
A30,110,0,4,1,1,N,"ACK-999006-SCC"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999004"
B230,23,0,1,2,2,20,N,"999006"
B30,74,0,1,3,12,34,N,"002999006254"
A30,110,0,4,1,1,N,"ACK-999006-VSF"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999004"
B230,23,0,1,2,2,20,N,"051677"
B30,74,0,1,3,12,34,N,"002051677318"
A30,110,0,4,1,1,N,"ACK-051677-CBF"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999004"
B230,23,0,1,2,2,20,N,"051677"
B30,74,0,1,3,12,34,N,"002051677319"
A30,110,0,4,1,1,N,"ACK-051677-CBG"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999004"
B230,23,0,1,2,2,20,N,"051677"
B30,74,0,1,3,12,34,N,"002051677320"
A30,110,0,4,1,1,N,"ACK-051677-CBH"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999004"
B230,23,0,1,2,2,20,N,"051677"
B30,74,0,1,3,12,34,N,"002051677321"
A30,110,0,4,1,1,N,"ACK-051677-CBI"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999004"
B230,23,0,1,2,2,20,N,"051677"
B30,74,0,1,3,12,34,N,"002051677322"
A30,110,0,4,1,1,N,"ACK-051677-CBJ"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999004"
B230,23,0,1,2,2,20,N,"051677"
B30,74,0,1,3,12,34,N,"002051677323"
A30,110,0,4,1,1,N,"ACK-051677-CBK"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999004"
B230,23,0,1,2,2,20,N,"051677"
B30,74,0,1,3,12,34,N,"002051677305"
A30,110,0,4,1,1,N,"ACK-051677-CGC"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999004"
B230,23,0,1,2,2,20,N,"051677"
B30,74,0,1,3,12,34,N,"002051677225"
A30,110,0,4,1,1,N,"ACK-051677-CSA"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999006"
B230,23,0,1,2,2,20,N,"051679"
B30,74,0,1,3,12,34,N,"002051679324"
A30,110,0,4,1,1,N,"ACK-051679-MBF"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999006"
B230,23,0,1,2,2,20,N,"051679"
B30,74,0,1,3,12,34,N,"002051679325"
A30,110,0,4,1,1,N,"ACK-051679-MBG"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999006"
B230,23,0,1,2,2,20,N,"051679"
B30,74,0,1,3,12,34,N,"002051679326"
A30,110,0,4,1,1,N,"ACK-051679-MBH"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999006"
B230,23,0,1,2,2,20,N,"051679"
B30,74,0,1,3,12,34,N,"002051679306"
A30,110,0,4,1,1,N,"ACK-051679-MGC"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999006"
B230,23,0,1,2,2,20,N,"051679"
B30,74,0,1,3,12,34,N,"002051679233"
A30,110,0,4,1,1,N,"ACK-051679-MSA"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999008"
B230,23,0,1,2,2,20,N,"051681"
B30,74,0,1,3,12,34,N,"002051681229"
A30,110,0,4,1,1,N,"ACK-051681-DSA"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999004"
B230,23,0,1,2,2,20,N,"051677"
B30,74,0,1,3,12,34,N,"002051677901"
A30,110,0,4,1,1,N,"ACK-051677-T01"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999006"
B230,23,0,1,2,2,20,N,"051679"
B30,74,0,1,3,12,34,N,"002051679901"
A30,110,0,4,1,1,N,"ACK-051679-T01"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999008"
B230,23,0,1,2,2,20,N,"051681"
B30,74,0,1,3,12,34,N,"002051681277"
A30,110,0,4,1,1,N,"ACK-051681-DDF"
P1,1
N
N
N
q457
Q154,24
D14
A150,0,0,4,1,1,N,"ASDF"
A30,23,0,4,1,1,N,"F:54509"
A30,48,0,4,1,1,N,"P:999008"
B230,23,0,1,2,2,20,N,"051681"
B30,74,0,1,3,12,34,N,"002051681327"
A30,110,0,4,1,1,N,"ACK-051681-DBF"
P1,1
N
Jun 15, 2012 11:24:25 AM jzebra.LogIt log
INFO: Sending print job to printer: "Zebra LP 2824"
Jun 15, 2012 11:24:25 AM jzebra.LogIt log
INFO: Print job data transfer complete.
Jun 15, 2012 11:24:25 AM jzebra.LogIt log
INFO: Print job has no more events.
Jun 15, 2012 11:24:25 AM jzebra.LogIt log
INFO: Print job received by printer: "Zebra LP 2824"
Jun 15, 2012 11:24:26 AM jzebra.LogIt log
INFO: ===== SENDING DATA TO THE PRINTER =====
Jun 15, 2012 11:24:26 AM jzebra.LogIt log
INFO:
Jun 15, 2012 11:24:26 AM jzebra.LogIt log
INFO: Sending print job to printer: "Zebra LP 2824"
Jun 15, 2012 11:24:26 AM jzebra.LogIt log
INFO: Print job data transfer complete.
Jun 15, 2012 11:24:26 AM jzebra.LogIt log
INFO: Print job has no more events.
Jun 15, 2012 11:24:26 AM jzebra.LogIt log
INFO: Print job received by printer: "Zebra LP 2824"
Any help is appreciated.
Thanks!
Michael
Original comment by aes...@gmail.com
on 15 Jun 2012 at 3:30
Thanks Michael.
Are you appending them all at once, then calling print at the end or are you
calling print in between each label?
*Note: There's a "documentsPerSpool" feature that can help with the print
spooler in situations of large batch jobs, but unfortunately it was just
reported via email as broken with version 1.4.1.
-Tres
Original comment by tres.fin...@gmail.com
on 15 Jun 2012 at 8:14
Hi Tres,
Thanks for your response. I've been on a different project for a bit and hadn't
seen your reply yet.
I did try the spool option, but it didn't work for me - I guess your note
explains why! :-)
I am appending and printing one at a time - each of the PrintEPL() calls above
will append one label and print it.
Another thing that I've noticed is happening is that when we don't get the
labels is that it isn't necessarily just stopping before the end of the list,
but might print them out of order or skip some throughout the process.
Thanks again for your help!
Michael
Original comment by aes...@gmail.com
on 28 Jun 2012 at 5:27
Michael,
The spooling option was just confirmed working by both myself and the reporter
of that bug, so false alarm.
The feature should work for you. Let us know if you have any problems. The
mailing list is preferred, but this bug report is ok too.
Original comment by tres.fin...@gmail.com
on 29 Jun 2012 at 1:38
Issue 77 has been merged into this issue.
Original comment by tres.fin...@gmail.com
on 13 Jul 2012 at 2:00
Okay I will give spooling another try.
Thanks,
Michael
Original comment by aes...@gmail.com
on 13 Jul 2012 at 7:13
[deleted comment]
[deleted comment]
Hi i'have finally solve my problem to print a lot of labels by batch ajax
request. i have write a simple javascript class that use jzebra method. I hope
that can be usefull for comunity!
I use this class without problem whit browser like chrome and mozilla firefox.
I'have no test it under IE.
For any question about contact me maito:andrea.namici@gmail.com
/**
* Javascript jzebra Plugin.
*
* This plugin provide to help usage of jzebra.jar.
*
* I'have no write jzebra.jar class
*
* I write a javascript library that use jzebra.jar java applet method can be real usefull for web developers!
* This class it's tested on Zebra TLP2844-Z, but it can be use with other zebra printer becouse it's use ZPL
* print code language developer by Zebra.
*
* @author Andrea Namici
* @mailto andrea.namici@gmail.com
*
*/
window.jzebra = function(printer_name,appletOptions){
//Applet
this.def_applet_name = "jzebra"; //Applet Default Name
this.def_applet_width = "0px"; //Applet Default Width
this.def_applet_height = "0px"; //Applet Default Height
this.def_applet_url = "jzebra.jar"; //Applet Default default url
this.def_applet_visibility = "visible"; //Applet Default Visibility Style
//Applet Params
this.def_printer_name = "zebra"; //Name of Zebra Printer
//ZPL
this.zpl_code = false; //ZPL default Code
//Javascript
this.jzebra_istance = false; //Applet Istance of jzebra
this.jzebra_istance_timeout = 5000; //Applet Istance init default timeout. this time tell when init the jzebra reference in class
this.nr_packed = 35; //Jzebra max print at once
this.nr_append = 0; //Jzebra nr of print appended
this.buffer = new Array(); //Jzebra Print Buffer, this parameter it's a print array buffer
this.buffer_timeout = 5000; //Jzebra Time of each buffer print (setTimeout js)
this.buffer_timeout_int = false; //Jzebra Reference of Timeout buffer print function
/**
* Class Costruct
*
* Init of Java Applet
*
* @return boolean
*/
this.init = function(printer_name,appletOptions){
var applet = document.createElement("applet");
var param = document.createElement("param");
//Applet Attribute
applet.setAttribute("code","jzebra.PrintApplet.class");
if(typeof appletOptions.name!='undefined'){
applet.setAttribute("name",appletOptions.name);
}else{
applet.setAttribute("name",this.def_applet_name);
}
if(typeof appletOptions.url != 'undefined'){
applet.setAttribute("archive",appletOptions.url);
}else{
applet.setAttribute("archive",this.def_applet_url);
}
if(typeof appletOptions.width!='undefined'){
applet.setAttribute("widht",appletOptions.width);
}else{
applet.setAttribute("widht",this.def_applet_width);
}
if(typeof appletOptions.height!='undefined'){
applet.setAttribute("height",appletOptions.applet_height);
}else{
applet.setAttribute("height",this.def_applet_height);
}
if(typeof appletOptions.visibility!="undefined"){
applet.style.visibility = appletOptions.visibility;
}else{
applet.style.visibility = this.def_applet_visibility;
}
//Applet Params Attribute
param.setAttribute("name","printer");
param.setAttribute("value",printer_name);
applet.appendChild(param);
document.getElementsByTagName("body")[0].appendChild(applet).appendChild(param);
return this.initAppletIstance() > 0 ? true : false;
}
/**
* Init Class jzebra_istance reference
*
* Set class applet java reference aftern a seconds timeout.
* This workaround it's usefull when loading a java applet it's too slow.
*
* @return Int
*/
this.initAppletIstance = function(){
return window.setTimeout(function(jzebraObj){
jzebraObj.jzebra_istance = document.getElementsByName("jzebra")[0];
return true;
},this.jzebra_istance_timeout,this);
}
/**
* Get generic ZPL to Print.
* Before print you can do sobstition using build_zpl_code()
*
* @param Int type You can load more than one type of zpl Code using this method
* @see build_zpl_code Method
* @return String
*/
this.getZPL = function(type){
var zpl_code = "";
switch(type)
{
case 1: //QrCode
zpl_code ="^XA";
zpl_code+="^PR5";
zpl_code+="^FO50,70";
zpl_code+=" ^A0N,20,20";
zpl_code+=" ^FD@pst_creation_datetime@";
zpl_code+="^FS";
zpl_code+=" ^FO250,70";
zpl_code+=" ^A0N,20,20";
zpl_code+=" ^FD@aug_code@";
zpl_code+="^FS";
zpl_code+="^FO50,140";
zpl_code+=" ^A0N,20,20^CI0,21,36";
zpl_code+=" ^FDPrezzo: @pst_imp_iva@ $";
zpl_code+="^FS";
zpl_code+="^FO250,140";
zpl_code+=" ^A0N,20,20";
zpl_code+=" ^FDPeso: @pst_weight@g";
zpl_code+="^FS";
zpl_code+=" ^FO50,200";
zpl_code+=" ^GB300,0,4";
zpl_code+="^FS";
zpl_code+=" ^FO420,40";
zpl_code+=" ^BQN,5,5";
zpl_code+=" ^FDQA,@pst_code@";
zpl_code+="^FS";
zpl_code+="^XZ";
break;
default:
zpl_code ="^XA";
zpl_code+="^PR5";
zpl_code+="^FO50,70";
zpl_code+=" ^A0N,20,20";
zpl_code+=" ^FDHello ZPL Work!";
zpl_code+="^FS";
zpl_code+="^XZ";
break;
}
return zpl_code;
}
/**
* Get ZPL Code to Print with sobstituion of parameter in zpl_code
*
* @param String zpl_code ZPL code to use
* @param Object options fields to find and replace in zpl_code. Note that field must be like this "@fieldname@". the charater "@" it's important!
*
* return String ZPL Code to print or FALSE if failure
*/
this.BuildZPL = function(zpl_code,options){
if(typeof options=='object')
{
for(attr in options)
{
var regExp = new RegExp("@"+attr+"@");
zpl_code = zpl_code.replace(regExp,options[attr]);
}
return zpl_code;
}
return false;
}
/**
* Return current java applet HTML reference of document
* @return object
*/
this.get_applet_istance = function(){
return this.jzebra_istance;
}
/**
* Append un job to jZebra.
*
* You can use Buffer method or print all jobs append at the end using printJob()
*
* @param Int type Type of ZPL code to Print
* @param Boolean use_buffer If TRUE use buffer method, FALSE append only
* @param Object options Fields to find and replace in zpl_code. Note that field must be like this "@fieldname@". the charater "@" it's important!
*
* @see printJob()
*
* @return Boolean TRUE on job Append, FALSE otherwise
*
*/
this.appendJob = function(type,options,use_buffer){
var use_buffer = typeof use_buffer=='undefined' ? false : use_buffer;
if(use_buffer){
if(this.nr_append==0){
this.initBufferTimeoutPrint();
}
}
var zpl_code = this.getZPL(type); //get ZPL code to format
zpl_code = this.BuildZPL(zpl_code,options); //format ZPL code to print
this.nr_append++;
if(use_buffer){
return this.buffer.push(zpl_code); //Append zpl_code to buffer que
}else{
return this.append(zpl_code); //Append direct
}
}
/**
* Init Buffer Print at first time that ivoke appendJob Method.
*
* @return INT setTimeout int
*/
this.initBufferTimeoutPrint = function(){
this.buffer_timeout_int = window.setInterval(function(jzebraObj){
if(!jzebraObj.printBuffer()){
window.clearTimeout(jzebraObj.buffer_timeout_int); //Clear interval appena buffer finito
}
},this.buffer_timeout,this);
return this.buffer_timeout_int;
}
/**
* Append a jzebra print
*
* @param zpl_code String ZPL to print
*
* @return Boolean
*/
this.append = function(zpl_code){
this.jzebra_istance.append(zpl_code);
return true;
}
//Print Method ***********************************************************
//
//
/**
* Print Current Buffer Array
*
* @return Boolean
*/
this.printBuffer = function(){
if(this.buffer.length>0)
{
i=0;
while(i<this.nr_packed && (zpl_code = this.buffer.shift()))
{
this.jzebra_istance.append(zpl_code);
i++;
}
if(i>0){
this.printJob();
return true;
}
}
return false;
}
/**
* Print all Jobs Appended
*
* @return Void
*/
this.printJob = function(){
return this.jzebra_istance.print();
}
/**
* Print Single ZPL code.
*
* This method append a single string and print directly
*
* @param String code ZPL code to Print
*
* @return Void
*/
this.printZPLCode = function(code){
this.jzebra_istance.append(code);
this.jzebra_istance.print();
}
//
//**********************************************************************
//Class Costruct ************************
var printer_name = typeof printer_name == 'undefined' ? this.def_printer_name : printer_name;
var appletOptions = typeof appletOptions == 'undefined' ?
{
url : this.def_applet_url,
width : this.def_applet_width,
height : this.def_applet_height,
name : this.def_applet_name,
visibility : this.def_applet_visibility
}
: appletOptions;
return this.init(printer_name,appletOptions);
// ***********************************
};
//Usage:
var jzebra = new
jzebra("zebra_printer_name",{width:"0px",height:"0px",visibility:"hidden",url:".
/jzebra.jar"});
var dataObj = {pst_creation_datetime: "15/07/2012 10:00",
pst_imp_iva:"10",
pst_weight:"4",
pst_aug_code:"AJJASJXJJSJDA",
pst_code:"qrCode values"}; //Example of data
//Using Buffer Mode, Print like real time mode
var zpl_code_type = 1; //printe a qrcode label
//var zpl_code_type = 2; //print hello word label
for(i=0;i<100;i++)
{
dataObj.pst_code = Math.round(Math.random()*1000000,2); //Random qrCode to Print
/*
Add data to print to the buffer and provide it self to launch print after default timeout.
This is great to do batch print
*/
jzebra.appendJob(zpl_code_type,dataObj,true);
}
//Using No Buffer ////////////////
for(i=0;i<100;i++)
{
jzebra.appendJob(1,dataObj,false);
}
jzebra.printJob();
/////////////////////////////////
//Using Direct Print
var zpl_code = jzebra.getZPL(2);
jzebra.printZPLCode(zpl_code);
/////////////////////////////////
Original comment by andrea.n...@gmail.com
on 15 Jul 2012 at 2:57
Attachments:
[deleted comment]
Added jzebra.js to Downloads as "jzebra_batch.js". Closing bug as "invalid"
since batch mode printing is supported.
If this JavaScript code is regarded as very important, we can entertain adding
it to sample.html or as part of the jzebra.zip download, simply reopen and drop
a comment into it stating why its better than the "EndOfDocument" method.
-Tres
Original comment by tres.fin...@gmail.com
on 22 Aug 2012 at 5:50
Original issue reported on code.google.com by
dave.ol...@gmail.com
on 25 Apr 2012 at 8:01