print 4x6 image using UIPrintInteractionController

374 Views Asked by At

I am trying to print a 4x6 image through the printController, however, when it prints it cuts off some of the image. The code I am using is below.

@IBAction func doPrint(_ sender: Any) {
    let printInfo = UIPrintInfo(dictionary:nil)
    printInfo.outputType = .photo
    printInfo.jobName = "PrintPhoto"
    printInfo.orientation = .landscape

    let printController = UIPrintInteractionController.shared
    printController.printInfo = printInfo
    printController.printingItem = newImage
    printController.showsNumberOfCopies = false
    printController.present(animated: true, completionHandler: nil)
}

These are border-less 4x6 prints and it is cutting off approx 0.25 inch, resizing the image produces same result.

0

There are 0 best solutions below