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


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.

Submitted by SSi1 on May 23, 2022 Permalink

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)