|
@@ -38,7 +38,7 @@ class RCTCPDFView: UIView {
|
|
|
|
|
|
private func createCPDFView() {
|
|
|
let fileManager = FileManager.default
|
|
|
- let samplesFilePath = NSHomeDirectory().appending("/Documents/ReaderViewer")
|
|
|
+ let samplesFilePath = NSHomeDirectory().appending("/Documents/Files")
|
|
|
let fileName = document.lastPathComponent
|
|
|
let docsFilePath = samplesFilePath + "/" + fileName
|
|
|
|
|
@@ -73,12 +73,17 @@ class RCTCPDFView: UIView {
|
|
|
let document = self.pdfViewController?.pdfListView?.document
|
|
|
let success = document?.write(to: document?.documentURL ?? URL(fileURLWithPath: ""), isSaveFontSubset: true) ?? false
|
|
|
completionHandler(success)
|
|
|
+ } else {
|
|
|
+ completionHandler(true)
|
|
|
}
|
|
|
+
|
|
|
} else {
|
|
|
if self.pdfViewController?.pdfListView?.document.isModified() == true {
|
|
|
let document = self.pdfViewController?.pdfListView?.document
|
|
|
let success = document?.write(to: document?.documentURL ?? URL(fileURLWithPath: ""), isSaveFontSubset: true) ?? false
|
|
|
completionHandler(success)
|
|
|
+ } else {
|
|
|
+ completionHandler(true)
|
|
|
}
|
|
|
}
|
|
|
}
|