BrowserPrint devices

// Expert user has replied.
Y Yanis Dalabiras 2 years 1 month ago
80 2 0

Hi,

I see the supported printers for BrowserPrint are listed as:
BROWSER PRINT SUPPORTS THE FOLLOWING ZEBRA PRINTERS:

QLn series
ZT200™ series
ZT400™ series
ZT510
ZT600 Series
ZD500™ series
ZD400™ series
LP2824+
GK420
GX420

I am using 'BrowserPrint-3.0.216.min.js' to connect to a printer. On the computer BrowserPrint 1.2.279 is running on a windows machine.

My issue is that I am trying to get the device status. The write looks like this:
<code>

{
"data": "~hs",
"device": {
"name":"27j184501282",
"uid":"27j184501282",
"connection":"usb",
"deviceType":"printer",
"version":2,
"provider":"com.zebra.ds.webdriver.desktop.provider.DefaultDeviceProvider",
"manufacturer":"Zebra Technologies"
}
}
</code>

The response is simple "{}". The subsequent "read" request to same device yields a very large response that is not starting/ending with start and end text control characters as I was expecting.
"
,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,
"

Is there a way to see if a printer is supported or do you know why the read has so many messages and is unterminated? Is there a setting needed, for example, on the printer to clear the read buffer (or something) after a read request?

Additionally, I have seen posted on the internet ""~HQES" instead of "~hq" - what is the difference - is there an explanation of the write codes like "~wc", etc.?

Please Register or Login to post a reply

2 Replies

S Steven Si

The Browser Print has API to query for the printer status. There is no need to write the "~HS" status query ZPL command directly, as the response has to be parsed. If prefer to write the "~HS" directly, make sure that the code doesn't write the "~HS" multiple times. Otherwise the response strings will appear multiple times.

For the detail of the ZPL commands, please refer to the ZPL Programming Guide, where the ~HS, ~HQES, etc., are all documented.

B Brian Kits

I missed some important details. The printer is a ZP505 model. If I unplug the device and start again after a couple of calls to get status the read returns this:
<code>
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
</code>

Then if I make another call it starts to get jumbled. The STX is gone from the beginning:
<code>
1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
030,0,0,1245,000,0,0,0,000,0,0,0
000,0,0,0,0,2,4,0,00000000,1,000
1234,0
</code>

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