UIView prints at 4x6 instead of 8.5x11

Tried scaling the UIView and also ensured it is selecting 8.5x11 as the papersize. Can change orientation but can't figure out how to scale it. I'm sure it's something silly.


-(void)printBox: (id)self{

NSLog(@"print");

vCsend.transform = CGAffineTransformMakeScale(2.8,2.8);

NSLog(@"frame size: %f x %f", vCsend.frame.size.height/72, vCsend.frame.size.width/72);

UIPrintInfo *printInfo= [UIPrintInfo printInfo];

printInfo.outputType = UIPrintInfoOutputGrayscale;

printInfo.jobName = @"box";

printInfo.orientation = UIPrintInfoOrientationLandscape;

printInfo.duplex = UIPrintInfoDuplexLongEdge;

pC.printInfo = printInfo;

pC.showsPageRange = YES;

UIViewPrintFormatter *formatter = [vCsend viewPrintFormatter];

pC.printFormatter = formatter;

UIPrintInteractionCompletionHandler completionHandler = ^(UIPrintInteractionController *printController, BOOL completed, NSError *error){

if(!completed && error){

NSLog(@"Print failed - domain: %@ error code %ld", error.domain, (long)error.code);

}

};

[pC presentAnimated:YES completionHandler:completionHandler];

}

Just FYI, I moved you over to App Frameworks > Printing, where you're more likely to find folks with expertise in the area of UIView printing.

Share and Enjoy

Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1@apple.com"
UIView prints at 4x6 instead of 8.5x11
 
 
Q