Printer

Contents

Prints documents or HTML rendered content

https://github.com/katzer/cordova-plugin-printer

Stuck on a Cordova issue?

Installation

Community Enterprise
ionic cordova plugin add cordova-plugin-printer npm install @ionic-native/printer
Ionic EE comes with fully supported and maintained plugins from the Ionic Team. Learn More   or   Contact Us
ionic activate-native-ee --key=YOURPRODUCTKEY ionic integrations add @ionic-native/printer

Supported Platforms

  • Android
  • iOS
  • Windows

Usage

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

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);