Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIPrintInteractionController, turn off Double-sided option?

When using UIPrintInteractionController,

it is easy to turn off the 'page range' and 'number of copies' options

UIPrintInteractionController *pic =
      [UIPrintInteractionController sharedPrintController];
pic.delegate = self;
pic.printInfo = pif;
pic.printFormatter = formatter;
pic.showsPageRange = NO;
pic.showsNumberOfCopies = NO;

enter image description here

Is there a way to TURN OFF the Double-sided option?

Conversely, has anyone actually confirmed with Apple, that it is impossible to turn off the double sided option? If so thanks.

like image 845
Fattie Avatar asked Jul 04 '14 10:07

Fattie


1 Answers

var duplex: UIPrintInfoDuplex

As per official documentation:-

If a printer is capable of duplex printing, a switch in the printing options allows users to toggle between single-side and double-sided printing. See the description of the UIPrintInfoDuplex constants for more information.

enum UIPrintInfoDuplex : Int {
    case None
    case LongEdge
    case ShortEdge
}

none: No double-sided (duplex) printing; single-sided printing only.

UIPrintInfo *printInfo = [UIPrintInfo printInfo];
printInfo.duplex = UIPrintInfoDuplexLongEdge;
printController.printInfo = printInfo//printController is instance of UIPrintInteractionController
like image 75
pkc456 Avatar answered Oct 19 '22 21:10

pkc456