diff --git a/src/ios/APPPrinter.m b/src/ios/APPPrinter.m index 94518ff..c86fc9b 100755 --- a/src/ios/APPPrinter.m +++ b/src/ios/APPPrinter.m @@ -337,6 +337,7 @@ UIPrintInfoOrientation orientation = UIPrintInfoOrientationPortrait; UIPrintInfoOutputType outputType = UIPrintInfoOutputGeneral; UIPrintInfoDuplex duplexMode = UIPrintInfoDuplexNone; + long copies = MAX([settings[@"copies"] longValue], 1); if ([settings[@"landscape"] boolValue]) { orientation = UIPrintInfoOrientationLandscape; @@ -355,11 +356,12 @@ duplexMode = UIPrintInfoDuplexShortEdge; } + [printInfo setValue:[NSNumber numberWithLong:copies] forKey:@"_copies"]; + printInfo.outputType = outputType; printInfo.orientation = orientation; printInfo.duplex = duplexMode; printInfo.jobName = settings[@"name"]; - controller.printInfo = printInfo; controller.showsNumberOfCopies = ![settings[@"hideNumberOfCopies"] boolValue]; diff --git a/www/printer.js b/www/printer.js index 14ad192..f0519f3 100755 --- a/www/printer.js +++ b/www/printer.js @@ -28,16 +28,14 @@ var exec = require('cordova/exec'); */ exports.getDefaults = function () { return { - // Platform independent name: 'unknown', duplex: 'none', landscape: false, graystyle: false, - // iOS specific border: true, + copies: 1, hideNumberOfCopies: false, hidePaperFormat: false, - // iPad specific bounds: [40, 30, 0, 0] }; };