Uncaught TypeError: g is not a function - Browser Print Issue - Zebra-ZD220

// Expert user has replied.
s suliman babar 1 year 10 months ago
131 5 0

BrowserPrint-3.0.216.min.js
BrowserPrint-Zebra-1.0.216.min.js
These two libraries are included in the sample page of the Browser Print. I am using Browser Emulator for testing it. The Test Label is printed correctly but when I send image, following error pops up in console
"Uncaught TypeError: g is not a function at line 279"

Any help would be appreciated, thanks.

Please register or login to post a reply

5 Replies

s suliman babar

Can anybody point to the problem in hand.

J James Swinton-Bland

Hi,

could you try the latest sample posted here: https://techdocs.zebra.com/link-os/latest/demos/browser-print/

This appears to be using a later JS version: BrowserPrint-2.0.0.75.min.js

Thanks,

James

s suliman babar

Thank you, it might solve it. i will try that. But the printer in discussion ZD-220 is not in the supported.

J James Swinton-Bland

Hi,

The ZD220 runs the same OS as the ZD4/500 series, so I think it would be worth trying. Unfortunately I don't have a printer here to test with so I can't confirm / deny.

Thanks,

James

S Steven Si

There is a code snippet from the sample that comes with the demo of the BrowserPrint.js-3.0.216/sample/index.html. It demonstrates how to use the convertAndSendFile() API to send and print a JPG.

function sendImage(imageUrl)
{
	url = window.location.href.substring(0, window.location.href.lastIndexOf("/"));
	url = url + "/" + imageUrl;
	selected_device.convertAndSendFile(url, undefined, errorCallback)
}

 

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