Skip to Content

WEB IDE Cordova Print Plugin

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?

Add comment
10|10000 characters needed characters exceeded

3 Answers

  • Best Answer
    Posted on Oct 20, 2016 at 06:25 PM
    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 25, 2016 at 06:12 PM

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

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 27, 2016 at 05:27 AM

    Everything is now corrected, thank you for your response.

    Add comment
    10|10000 characters needed characters exceeded