मैं एयरप्रिंट का उपयोग कर UIImage
प्रिंट कर रहा हूं लेकिन मार्जिन सही नहीं हैं। यह प्रिंट करता है जब यह प्रिंट करता है:
एयरप्रिंट का उपयोग करके प्रिंटिंग यूआईएममेज कट ऑफ सामग्री का कारण बनता है
क्या कोई तरीका है कि मैं इसे कागज पर पूरी तरह से फिट कर सकता हूं? कि जिस तरह से आप पृष्ठ पर पूरी बात देख सकते हैं
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];
आपको शायद हमें अपना कोड दिखाना होगा। कोड के साथ –
अपडेट किया गया। – 0xSina
यदि आप 'UIImage' प्रिंट कर रहे हैं, तो आप' UIPrintInfoOutputGeneral 'के बजाय 'UIPrintInfoOutputPhoto' पर' printInfo.outputType' क्यों सेट नहीं कर रहे हैं? –