How to force close QZ connection?

488 views
Skip to first unread message

lth1...@gmail.com

unread,
Sep 24, 2015, 2:25:29 AM9/24/15
to qz-print
Is there anyway or any functions can force to close the QZ connection without refresh the page?
Like using jquery to make a button call click event then call this close/end QZ function? The QZ tray should be disconnect.

Best Regards
Eric

Tres Finocchiaro

unread,
Sep 24, 2015, 2:17:29 PM9/24/15
to TIANHAN LIU, qz-print
Eric,

Not currently as our websocket currently has private access within our library.


Please feel free to move this to a global scope and declare a close function, although you will need to maintain this change manually for upgrades, etc.

If you have strong feelings that this should be changed permanently, please open an issue on our tracker on GitHub.

--
You received this message because you are subscribed to the Google Groups "qz-print" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qz-print+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

davor....@gmail.com

unread,
Jan 22, 2017, 3:14:12 AM1/22/17
to qz-print, lth1...@gmail.com
Eric, Tres,

have you tried to implement something like that? This would be extremely helpful in cases when we have multiple buttons on same page printing different labels?
It is quite clumsy solution to reload page in that situation.

Tres Finocchiaro

unread,
Jan 22, 2017, 9:24:06 AM1/22/17
to davor....@gmail.com, qz-print, liutianhan
Which version?

In 2.0, you can use qz.websocket.disconnect() to force disconnection from QZ Tray.

> In cases when we have multiple buttons on same page printing different labels?

I'm not sure the use-case you've mentioned would warrant a full disconnect.  Can you explain why you want to disconnect from QZ Tray between labels?
--
You received this message because you are subscribed to the Google Groups "qz-print" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qz-print+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages