Printer plugin giving error when used in capacitor project with ionic 4

I have installed the printer plugin to capacitor project using ionic 4.

npm install cordova-plugin-printer
npm install @ionic-native/printer
ionic cap sync

Added: import { Printer, PrintOptions } from ‘@ionic-native/printer/ngx’; to app.module.ts and also to providers.

then in home.ts

import { Printer, PrintOptions } from '@ionic-native/printer';

constructor(private printer: Printer) { }


this.printer.isAvailable().then(onSuccess, onError);

let options: PrintOptions = {
     name: 'MyDocument',
     printerId: 'printer007',
     duplex: true,
     landscape: true,
     grayscale: true

this.printer.print(content, options).then(onSuccess, onError);

i m getting this error:

Type '{ name: string; printerId: string; duplex: true; landscape: boolean; grayscale: boolean; monochrome: true; }' is not assignable to type 'PrintOptions'.
  Object literal may only specify known properties, but 'printerId' does not exist in type 'PrintOptions'. Did you mean to write 'printer'?

135         printerId: 'printer007',

[ERROR] An error occurred while running subprocess ng.

even if i remove printoptions, then the app runs and on click of print button,nothing happens and in console i can see :

CDVPlugin class APPPrinter (pluginName: printer) does not exist.
Error: Cordova Plugin mapping not found

I m stuck in this issue and couldn’t see a way to get it resolved, not sure if this is plugin issue or capacitor

Any help is appreciated.Thanks

Source: AngularJS Questions