I checked out the docs which only has example code for Angular. Tried to adapt it for vue:
import {Printer} from '@ionic-native/printer/ngx';
methods: {
printSpecs() {
Printer.isAvailable()
.then(() => {
const options = {
name: 'MyDocument',
duplex: true,
orientation: 'landscape',
monochrome: true
}
const content = 'this is a test print'
Printer.print(content, options)
.then(() => {
console.log('Print success');
});
});
},
}
But get the error: Uncaught TypeError: _ionic_native_printer_ngx__WEBPACK_IMPORTED_MODULE_12__.Printer.isAvailable is not a function
I’ve fiddled about with various configurations but nothing has worked. Any ideas how I can get this to work?