How do I release the printer handle for the Zebra ZXP Series 3?

J Joshua Preston 3 years 7 months ago
5 2 0

I am using the Zebra Technologies - Card ID Printing – Zebra Card SDK for ZXP Series 3 Printers – C# .
 
How can I release the printer handle so that I can print another card while my application is open?? I am havnig to close my application and re-open it every time.. WHY?
 
I tried RefreshConnectionToPrinter()
 
but that didn't work.
 
rwest

Please Register or Login to post a reply

2 Replies

S Stephen Troup

Provided the job is being closed at the end it should release the printer.

i.e. the code j.Close(); where j is the open zmotifprinterlib.Job object

If you try to open another job while the existing is still connected will result in an error with the ZXP3.

I tend to use one job for each print rather then open one job for every print. So on closing the job you'll need to open another - you can't use the old reference as it's now closed even if it's not nothing.

i.e. a typical loop will do the following    open job, connect to printer, print card, close job

J Joshua Preston

I am using Zebra Technologies - Card ID Printing – Zebra Card SDK for ZXP Series 3 Printers – C# , so I'm not sure if i have the zmotifprintlib. I do think I found the issue though, thanks to your help. I was not setting

ZBRGraphics graphics = null;

I was instead doing

ZBRGraphics graphics = new ZBRGraphics()

which may have been why? I'm going to test it and find out

CONTACT
Can’t find what you’re looking for?