<commit_before>Cordova Printer-Plugin
======================

A print plugin to print a file from android/ios cordova app using third party apps. It can print both in online/offline mode.

Modified from this plugin https://github.com/katzer/cordova-plugin-printer

## Supported Platforms
- **iOS** *(Print from iOS devices to AirPrint compatible printers or other printers using third party apps via wifi)*<br>
See [Drawing and Printing Guide for iOS](http://developer.apple.com/library/ios/documentation/2ddrawing/conceptual/drawingprintingios/Printing/Printing.html) for detailed informations and screenshots.

- **Android** *(Print through 3rd party printing apps)*

## Adding the Plugin to your project
Through the [Command-line Interface](http://cordova.apache.org/docs/en/3.0.0/guide_cli_index.md.html#The%20Command-line%20Interface):

```bash

cordova plugin add https://github.com/pankajnirwan103/cordova-plugin-printer.git
cordova build


## Removing the Plugin from your project
Through the [Command-line Interface](http://cordova.apache.org/docs/en/3.0.0/guide_cli_index.md.html#The%20Command-line%20Interface):
```
cordova plugin rm nirwan.cordova.plugin.printer
```

## Release Notes

#### Version 0.1.0 (02.09.2014)
- *Based on the Print plugin made by* ***KAtzer***

## Using the plugin
The plugin creates the object ```window.plugin.printer```


## Android

### Get all available printing apps on Android
The callback function will be called with a second argument which is an array, indicating which printer apps are available for printing.
```javascript
window.plugin.printer.isServiceAvailable(
    function (isAvailable, installedAppIds) {
        alert('The following print apps are installed on your device: ' + installedAppIds.join(', '));
    }
);
```

### Printing 
You need to download/save html using fileTransfer plugin https://github.com/apache/cordova-plugin-file-transfer. Make sure you use it after deviceReady event is called.

** Below example uses print share app for printing files.
```javascript<commit_msg>Updating Readme<commit_after>Cordova Printer-Plugin
======================

A print plugin to print a file from android/ios cordova app using third party apps. It can print both in online/offline mode.

Modified from this plugin https://github.com/katzer/cordova-plugin-printer

## Supported Platforms
- **iOS** *(Print from iOS devices to AirPrint compatible printers or other printers using third party apps via wifi)*<br>
See [Drawing and Printing Guide for iOS](http://developer.apple.com/library/ios/documentation/2ddrawing/conceptual/drawingprintingios/Printing/Printing.html) for detailed informations and screenshots.

- **Android** *(Print through 3rd party printing apps)*

## Adding the Plugin to your project
Through the [Command-line Interface](http://cordova.apache.org/docs/en/3.0.0/guide_cli_index.md.html#The%20Command-line%20Interface):

```bash

cordova plugin add https://github.com/pankajnirwan103/cordova-plugin-printer.git
cordova build


## Removing the Plugin from your project
Through the [Command-line Interface](http://cordova.apache.org/docs/en/3.0.0/guide_cli_index.md.html#The%20Command-line%20Interface):

cordova plugin rm nirwan.cordova.plugin.printer
```

## Release Notes

#### Version 0.1.0 (02.09.2014)
- *Based on the Print plugin made by* ***KAtzer***

## Using the plugin
The plugin creates the object ```window.plugin.printer```


## Android

### Get all available printing apps on Android
The callback function will be called with a second argument which is an array, indicating which printer apps are available for printing.
```javascript
window.plugin.printer.isServiceAvailable(
    function (isAvailable, installedAppIds) {
        alert('The following print apps are installed on your device: ' + installedAppIds.join(', '));
    }
);
```

### Printing 
You need to download/save html using fileTransfer plugin https://github.com/apache/cordova-plugin-file-transfer. Make sure you use it after deviceReady event is called.

** Below example uses print share app for printing files.
```javascript
{'fraction_non_alphanumeric': 0.1162221678492782, 'fraction_numerical': 0.014680694886224614, 'mean_word_length': 4.941860465116279, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2159013', 'n_tokens_mistral': 1218, 'n_tokens_neox': 1136, 'n_words': 392}