This is the only code I have to open the PDF:
override func read(from data: Data, ofType typeName: String) throws {
self.thePDFDocument =
PDFDocument.init(data: data)
if self.thePDFDocument == nil {
throw NSError(domain: NSOSStatusErrorDomain, code: unimpErr, userInfo: nil)
}
}
I set the PDFDocument to nil when I close it.
Topic:
App & System Services
SubTopic:
Core OS
Tags: