Browse Source

clear code

marinofaggiana 5 years ago
parent
commit
ef80b16eee
1 changed files with 7 additions and 3 deletions
  1. 7 3
      iOSClient/Main/Create cloud/NCCreateFormUploadScanDocument.swift

+ 7 - 3
iOSClient/Main/Create cloud/NCCreateFormUploadScanDocument.swift

@@ -24,7 +24,7 @@
 
 import Foundation
 import WeScan
-import GoogleMobileVision
+//import GoogleMobileVision
 
 class NCCreateFormUploadScanDocument: XLFormViewController, NCSelectDelegate {
     
@@ -42,7 +42,7 @@ class NCCreateFormUploadScanDocument: XLFormViewController, NCSelectDelegate {
     var password: String = ""
     var fileType = "PDF"
     
-    var textDetector: GMVDetector?
+    //var textDetector: GMVDetector?
     
     let appDelegate = UIApplication.shared.delegate as! AppDelegate
     
@@ -339,7 +339,7 @@ class NCCreateFormUploadScanDocument: XLFormViewController, NCSelectDelegate {
         //        let rowCell = row.cell(forForm: self)
         //        rowCell.becomeFirstResponder()
         
-        textDetector = GMVDetector(ofType: GMVDetectorTypeText, options: nil)
+        //textDetector = GMVDetector(ofType: GMVDetectorTypeText, options: nil)
     }
     
     // MARK: - Action
@@ -419,6 +419,7 @@ class NCCreateFormUploadScanDocument: XLFormViewController, NCSelectDelegate {
             
             for image in self.arrayImages {
                 
+                /*
                 guard let features = self.textDetector?.features(in: image, options: nil) as? [GMVTextBlockFeature] else {
                     continue
                 }
@@ -431,6 +432,7 @@ class NCCreateFormUploadScanDocument: XLFormViewController, NCSelectDelegate {
                     
                     textFile = textFile + text + "\n\n"
                 }
+                */
                 
                 do {
                     try textFile.write(to: NSURL(fileURLWithPath: fileNameGenerateExport) as URL  , atomically: true, encoding: .utf8)
@@ -459,6 +461,7 @@ class NCCreateFormUploadScanDocument: XLFormViewController, NCSelectDelegate {
                     UIGraphicsBeginPDFPageWithInfo(CGRect(x: 0, y: 0, width: image.size.width, height: image.size.height), nil)
                     UIImageView.init(image:image).layer.render(in: context!)
                     
+                    /*
                     if let features = self.textDetector?.features(in: image, options: nil) as? [GMVTextBlockFeature] {
                         for textBlock in features {
                             for textLine in textBlock.lines {
@@ -480,6 +483,7 @@ class NCCreateFormUploadScanDocument: XLFormViewController, NCSelectDelegate {
                             }
                         }
                     }
+                    */
                     
                 } else {