Printer

Contents

Prints documents or HTML rendered content

Installation

ionic cordova plugin add cordova-plugin-printernpm install @ionic-native/printer
Ionic EE comes with fully supported and maintained plugins from the Ionic Team. Learn More or Contact Us
ionic enterprise register --key=YOURPRODUCTKEYnpm install @ionic-enterprise/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);