If a PDF is encrypted for IOS the method return nil.
But if we have right access to open it in read mode, the PDF can't open.
Could you modify this method in SwiftPdfxPlugin.swift to allow this:
func openFileDocument(pdfFilePath: String) -> CGPDFDocument? {
let docment = CGPDFDocument(URL(fileURLWithPath: pdfFilePath) as CFURL)
if docment?.isEncrypted == true {
// we check if PDF is allowed in copy or print mode to open it
if(docment?.allowsPrinting == true || docment?.allowsCopying == true) {
return docment
}
return nil
}
return docment
}
If a PDF is encrypted for IOS the method return nil.
But if we have right access to open it in read mode, the PDF can't open.
Could you modify this method in SwiftPdfxPlugin.swift to allow this:
func openFileDocument(pdfFilePath: String) -> CGPDFDocument? {
let docment = CGPDFDocument(URL(fileURLWithPath: pdfFilePath) as CFURL)