I am working on the iPhone app using print image concept using UIPrintInteractionController. I have stuck at one point i.e. border, whenever I tried to print any image using printer it always show border on all sides which is not required. Image should use whole the paper size, as I am giving the image size same as paper width and height, but still it is showing border.
I didn't find any kind of method to remove the border or make the paper content border less. See iPhone image
You can see in the attached image , In this I am trying to print the image from Mac system in which it is giving option for border and border less.
I think it should be there in the UIPrintInteractionController framework, but didn't find anyone.
Please help me, if someone has experienced regarding this.
Thanks in advance. Your help will be appreciated
[![A4][4]][4]
If you want to eliminate any borders you could quickly achieve that by passing a photo
outputType to a printInfo object:
let printController = UIPrintInteractionController.shared
printController.printingItem = someImage
printController.showsPaperSelectionForLoadedPapers = true
let printInfo = UIPrintInfo.printInfo()
printInfo.outputType = .photo
printController.printInfo = printInfo
Now, if you want greater control over the final rendering, you could explore Apple's sample project regarding UIPrintInteractionController
Objective-C version
UIPrintInteractionController *printController = [UIPrintInteractionController sharedPrintController];
printController.printingItem = someImage;
controller.showsPaperSelectionForLoadedPapers=YES;
UIPrintInfo *printInfo = [UIPrintInfo printInfo];
printInfo.outputType = UIPrintInfoOutputPhoto;
printController.printInfo = printInfo;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With