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.