Search code examples
iosiphoneipadairprint

AirPrint - Make number of copies default to 2 and not just 1 copy


When I open the print options using AirPrint, I want to make it default to 2 copies and not just 1 copy.

Couldn't find any methods that could change the number of copies. Wondering if anyone has any ideas if this is possible since it seems that this printing option is pretty limited.


Solution

  • So I found my own solution. Basically under the UIPrintInteraction Controller there is a method called printItems. What I did is make an NSArray and put two copies of the object I wanted to print and used that method instead of printItem.

    However, since my application used the printFormatter I was unable to use this method since in the IOS developer documentation it says "If you set this property (printFormatter), UIPrintInteractionController sets the printingItems, printingItem, and printPageRenderer properties to nil. (Only one of these properties can be set for a print job.)"

    So what I did was just doubled the html page I was formatting and I trusted that the formatting was correct for it to print two pages.