Update iOS a bit

This commit is contained in:
Sebastián Katzer 2014-07-13 13:09:42 +02:00
parent aa22e1c060
commit 59f848b293

View File

@ -105,6 +105,7 @@
UIPrintInfo* printInfo = [UIPrintInfo printInfo]; UIPrintInfo* printInfo = [UIPrintInfo printInfo];
printInfo.outputType = UIPrintInfoOutputGeneral; printInfo.outputType = UIPrintInfoOutputGeneral;
printInfo.orientation = UIPrintInfoOrientationPortrait;
controller.printInfo = printInfo; controller.printInfo = printInfo;
controller.showsPageRange = YES; controller.showsPageRange = YES;
@ -134,9 +135,14 @@
// Get formatter for web (note: margin not required - done in web page) // Get formatter for web (note: margin not required - done in web page)
UIViewPrintFormatter* formatter = [webPage viewPrintFormatter]; UIViewPrintFormatter* formatter = [webPage viewPrintFormatter];
formatter.contentInsets = UIEdgeInsetsMake(0.0f, 0.0f, 0.0f, 0.0f);
controller.printFormatter = formatter; UIPrintPageRenderer* renderer = [[UIPrintPageRenderer alloc] init];
controller.showsPageRange = YES; renderer.headerHeight = -30.0f;
renderer.footerHeight = -30.0f;
[renderer addPrintFormatter:formatter startingAtPageAtIndex:0];
controller.printPageRenderer = renderer;
} }
/** /**
@ -148,9 +154,7 @@
*/ */
- (void) openPrintController:(UIPrintInteractionController*)controller - (void) openPrintController:(UIPrintInteractionController*)controller
{ {
//[self.commandDelegate runInBackground:^{
[controller presentAnimated:YES completionHandler:NULL]; [controller presentAnimated:YES completionHandler:NULL];
//}];
} }
/** /**