Set number of copies for iOS
This commit is contained in:
parent
c19cec7415
commit
7905b71feb
@ -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];
|
||||
|
@ -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]
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user