Several iOS specific options (closes #59)

This commit is contained in:
Sebastián Katzer 2016-07-23 14:06:59 +02:00
parent 031f4b385a
commit ea404a0acd
3 changed files with 11 additions and 1 deletions

View File

@ -7,6 +7,7 @@
- [enhancement:] `print` returns bool value to indicate the result
- [enhancement:] Added missing `duplex` support (Android)
- [__change__:] `duplex` requires a string (`none`, `long` or `short`)
- [enhancement:] Support for `hidePageRange`, `hideNumberOfCopies` and `hidePaperFormat` (iOS specific)
#### Version 0.7.1 (23.04.2015)

View File

@ -140,7 +140,10 @@
printInfo.jobName = [settings objectForKey:@"name"];
controller.printInfo = printInfo;
controller.showsPageRange = NO;
controller.showsPageRange = ![[settings objectForKey:@"hidePageRange"] boolValue];
controller.showsNumberOfCopies = ![[settings objectForKey:@"hideNumberOfCopies"] boolValue];
controller.showsPaperSelectionForLoadedPapers = ![[settings objectForKey:@"hidePaperFormat"] boolValue];
return controller;
}

View File

@ -28,10 +28,16 @@ var exec = require('cordova/exec');
*/
exports.getDefaults = function () {
return {
// Platform independent
name: 'unknown',
duplex: 'none',
landscape: false,
graystyle: false,
// iOS specific
hidePageRange: false,
hideNumberOfCopies: false,
hidePaperFormat: false,
// iPad specific
bounds: [40, 30, 0, 0]
};
};