nini9140 / jzebra

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

create a job spooler for more than 100 labels #77

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi!

i'm using jzebra plugin for printing in batch mode more than 100 qrcode. i'have 
a my class write in javascript that use jzebra for appending print and send to 
an zebra printer (TPL2844Z) ZPL code.

This is my ZPL code:

^XA 
^PRC ^FO50,70
^A0N,20,20
^FD@pst_creation_datetime@
^FS
^FO250,70 ^A0N,20,20 ^FD@aug_code@
^FS ^FO50,140 A0N,20,20CI0,21,36 ^FDPrezzo: @pst_imp_iva@ $
^FS ^FO250,140
^A0N,20,20 ^FDPeso: @pst_weight@g
^FS
^FO50,200 ^GB300,0,4
^FS
^FO420,40 ^BQN,5,5 ^FDQA,@pst_code@
^FS 
^XZ

(field suffixed by @xxxx@ are replaced by javascript from data get by json)

I'have a problem for creating an job spooler that does print correct all label. 
When i send print to the printer using method jzebra.print() (preceded by 
append all of jobs using jzebra.append(zpl_code)) zebra printer doesn't print 
all but only 60/65 label of 100. Question is how i can create a method that 
spooled a pack of job and prints in real time mode? is there a way to make a 
print spooler pack and send to the printer?

thank you all!

Original issue reported on code.google.com by andrea.n...@gmail.com on 12 Jul 2012 at 11:38

GoogleCodeExporter commented 9 years ago
There has been multiple reports of this.

This could be caused by a few things:
1. Limitation of the String buffer in Java
2. Limitation of the raw print spooler in Windows (and potentially other OSs)
3. Limitation of the memory in the printer.

A feature was added in version 1.0.6 to add more control of the spooler.
Link:  
http://code.google.com/p/jzebra/wiki/TutorialWebApplet#Advanced_Print_Spooling

The easiest way we were able to achieve this was to tell jZebra what the end of 
a print job looks like:

document.jZebra.setEndOfDocument("^FS\r\n^XZ\r\n");
document.jzebra.setDocumentsPerSpool("1");  

or

document.jZebra.setEndOfDocument("^FS\n^XZ\n");
document.jzebra.setDocumentsPerSpool("1");

You can adjust to your needs.

I'll leave this bug open until someone has time to investigate the underlying 
cause, but please post back on this bug report as to whether the spooling 
feature fixes your problem.

In regards to "packing" data for the printer, that is very likely.  If the 
ZPLII programmer's guide has an example, we can try it out, or even try to 
bundle it in to the applet.

-Tres

Original comment by tres.fin...@gmail.com on 13 Jul 2012 at 1:55

GoogleCodeExporter commented 9 years ago

Original comment by tres.fin...@gmail.com on 13 Jul 2012 at 2:00