Print Multipage TIFF file in Swift

Dear Experts,


I need to print multipage TIFF file in Swift.


imageURLFromParse is the url of tiff file.

let imageURLFromParse = NSURL(string : "myTIFFURL")
let imageData = NSData(contentsOf: imageURLFromParse! as URL) //NSData of multipage TIFF file.
let image = UIImage(data: imageData as! Data, scale: 1.0)


image shows only first page of TIFF file.

let printController = UIPrintInteractionController.shared
let printInfo = UIPrintInfo(dictionary:nil)
printInfo.outputType = UIPrintInfoOutputType.general
printController.showsNumberOfCopies = false
printController.showsPageRange = false
printInfo.jobName = "PRINT TIFF"
printController.printInfo = printInfo
printController.printingItem = imageData


I tried to give imageData(NSData) or image(UIImage) to printingItem, but Print Options pop up only shows first page of the TIFF file.


I think NSData should be array. ** I don't know how I can handle this.

Is there any way to print multipage TIFF file in iOS ?


Regards, Tuğçe.

Posted on Dec 10, 2018 11:39 PM

Reply
2 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Print Multipage TIFF file in Swift

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.