cancel
Showing results for 
Search instead for 
Did you mean: 

WEB IDE Cordova Print Plugin

czranie
Explorer
0 Kudos

Hello experts,

I'm trying to get Kapsel Plugins to work in my WebIDE project. Barcodescanner cordova.plugins.barcodeScanner.scan is working fine but I have an issue with Printer Plugin. Code:

onPrint: function() {

document.addEventListener("deviceready", onDeviceReady, false);

function onDeviceReady() {

var page = '<h1>Hello Document</h1>';

cordova.plugins.printer.print(page, { name : 'printjob' } , function () {

alert('printing finished or canceled');

});

}

After running this code I get following error :
Uncaught TypeError: Cannot read property 'print' of undefined

Could you propose how to get rid of this error?

Accepted Solutions (1)

Accepted Solutions (1)

Kevin_SAP
Advisor
Advisor
0 Kudos

Answers (2)

Answers (2)

czranie
Explorer
0 Kudos

Everything is now corrected, thank you for your response.

czranie
Explorer
0 Kudos

Yes, but the example in that thread is not working. The site where is "index.html" pointing is not found.