Печать UIImage с использованием AirPrint приводит к обрезанию содержимого
Я распечатываюUIImage
используя AirPrint, но поля не верны. Вот как это выглядит при печати:
Есть ли способ, которым я могу идеально разместить его на бумаге?
Вот код в соответствии с просьбой:
UIPrintInteractionController *pic = [UIPrintInteractionController sharedPrintController];
//pic.delegate = del;
UIPrintInfo *printInfo = [UIPrintInfo printInfo];
printInfo.outputType = UIPrintInfoOutputGeneral;
printInfo.jobName = [NSString stringWithFormat:@"New Ticket"];
pic.printInfo = printInfo;
pic.printingItem = [UIImage imageWithContentsOfFile:path];
void (^completionHandler)(UIPrintInteractionController *, BOOL, NSError *) =
^(UIPrintInteractionController *printController, BOOL completed, NSError *error) {
if (!completed && error) {
UIAlertView *av = [[UIAlertView alloc] initWithTitle:@"Error."
message:[NSString stringWithFormat:@"An error occured while printing: %@", error]
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil, nil];
[av show];
[av release];
}
};
[pic presentAnimated:YES completionHandler:completionHandler];