Hi, Kyle
Thanks for your reply.
I've been trying to make qz work on my desktop for the last 2 days already and unfortunatelly unsuccessfully :(
Should I paste it in the <head> or in the <body> ?
I'd like to trigger the printing automatically when page loads with <body onload="print()">
I am trying all variations like pasting the code in the <head> and pasting the code in the <body> but neither works :(
This is my html which is not working:
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<title>POS print by Kavi ...</title>
<script type="text/javascript" src="js/dependencies/rsvp-3.1.0.min.js"></script>
<script type="text/javascript" src="js/dependencies/sha-256.min.js"></script>
<script type="text/javascript" src="js/qz-tray.js"></script>
</head>
<body onload="print()">
<script>
function print() {
var config = qz.configs.create("POS-58");
var data = [
'Data\n',
'Should be simple data\n',
'To be printed\n'
];
qz.print(config, data).catch(function(e) {
console.error(e);
});
}
</script>
<h1>Printing to POS !!!</h1>
</body>
</html>
Can you please help?
Thank you.
'kavi'...