Did you find this guide helpful?
Some test text!
iOS / Guides / Print a document
Apryse SDK supports printing. The library handles all the hard work, you simply have to tell it to show the system print dialog with a document. This can be done with Print.startPrintJob
.
Here is how:
func handlePrintJob(sender: Any?) {
let print = PTPrint()
print.prepareDoc(toPrint: self.pdfDoc, delegate: MyPrintDelegate(self.view), userData: sender)
}
where MyPrintDelegate
is:
class MyPrintDelegate: NSObject, PTPrintDelegate {
let view: UIView
init(_ view: UIView) {
self.view = view
}
func prepared(toPrint docFilePath: String!, userData: Any!) {
let myPrint = PTPrint()
myPrint.printDoc(docFilePath, from: .zero, in: self.view, withJobName: docFilePath, animated: true, completionHandler: nil)
}
}
Trial setup questions? Ask experts on Discord
Need other help? Contact Support
Pricing or product questions? Contact Sales