I have a Datecs DPP-350 printer with which I can't print text unless I put an image or a QR to print as well. Also, it only works randomly, I can't get it to always print what I want. It would also help me to know how to use the setPageRegion method. With this code everything explained above happens:
window.DatecsPrinter.listBluetoothDevices(
function (devices) {
window.DatecsPrinter.connect(devices[0].address,
function () {
printSomeTestText();
},
function () {
alert(JSON.stringify(error));
}
);
},
function (error) {
alert(JSON.stringify(error));
}
);
function printSomeTestText() {
window.DatecsPrinter.printText("Demo", 'ISO-8859-1',
function () {
printQRCode();
}
);
}
function printQRCode() {
window.DatecsPrinter.printQRCode(
4,
4,
'http://giorgiofellipe.com.br',
function () {
alert('success!');
window.DatecsPrinter.disconnect();
},
function () {
alert(JSON.stringify(error));
}
);
}
I have a Datecs DPP-350 printer with which I can't print text unless I put an image or a QR to print as well. Also, it only works randomly, I can't get it to always print what I want. It would also help me to know how to use the setPageRegion method. With this code everything explained above happens: