lokeshj / jzebra

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

Problem when using multiple Zebra printers? #131

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We have a problem with the latest jZebra (1.4.8) which we didn't see in the 
previous version we used (jZebra.jar is from 2012-02-14). 

It seems that sometimes when switching printer to print on then the next 
following label does not always print (happens irregularly but maybe about 
every 10th time or so). 

We are doing Raw print of ZPL. The PC's have multiple Zebra printers connected. 
Sometimes the user clicks a button etc. and we want to print two labels on two 
different Zebra printers.

Here's what we do when printing one label: 

1. Call findPrinter(newPrinterName) to set printer to print on
2. Call isDoneFinding() in loop until it returns true
(3. Call getException() and examine any text in getLocalizedMessage())
(4. If error text found display it and call clearException())
5. Call appendFile(url)
6. Call print()
7. Call isDonePrinting() in loop until it returns true
8. Call getException() to examine any error during printing
9. If there is an exception, call getLocalizedMessage() followed by 
clearException()

Are we doing something wrong? Do we need to call a "flush" method or something? 
Or is there possibly a bug inside jZebra?  

Printing several labels in a row on just one printer works fine. It's just when 
switching printers the problem occurs. 

Kind Regards

/Per

Original issue reported on code.google.com by per.thor...@gmail.com on 3 May 2013 at 8:10

GoogleCodeExporter commented 9 years ago
Oh, it might be that we called print() immediately following appendFile(url) as 
in the sample. 
Now we wait for jzebraDoneAppending() and it appears the problem is gone. 

Original comment by per.thor...@gmail.com on 3 May 2013 at 11:51

GoogleCodeExporter commented 9 years ago
Thank you for the update.  I'll leave the bug report open for a little while in 
case this issue comes back.

Original comment by tres.fin...@gmail.com on 3 May 2013 at 12:15

GoogleCodeExporter commented 9 years ago

Original comment by tres.fin...@gmail.com on 2 Aug 2013 at 4:58