Browse Source

【转档】- 转档

liujiajie 10 months ago
parent
commit
2959b5976e

+ 1 - 1
PDF Office/PDF Master/Class/Batch/Operation/KMBatchConvertOperation.swift

@@ -151,7 +151,7 @@ class KMBatchConvertOperation: KMBatchOperation, CPDFConverterDelegate, CPDFConv
                 self.converter = CPDFConverterTxt.init(url: URL(fileURLWithPath: operateFile?.filePath ?? ""), password: operateFile?.password)
                 self.converter!.delegate = self
                 let options = CPDFConvertTxtOptions()
-                options.isAllowOCR = true
+//                options.isAllowOCR = true
                 
                 self.converter!.convert(toFilePath: operateFile?.outputFilePath, pageIndexs: operateFile?.currentConvertParameter?.pagesArray, options: options)
                 return

+ 8 - 8
PDF Office/PDF Master/Class/PDFTools/Convert/NewController/Common/KMPDFConvert.swift

@@ -328,14 +328,14 @@ class KMPDFConvert: Operation {
             self.converter = CPDFConverterTxt.init(url: URL(fileURLWithPath: filePath), password: self.password)
             self.converter.delegate = self
             let options = CPDFConvertTxtOptions()
-            options.isAllowOCR = self.isAllowOCR
-            if (self.isAllowOCR) {
-                if let language = self.ocrLanguage {
-                    options.language = language
-                } else {
-                    options.language = .english
-                }
-            }
+//            options.isAllowOCR = self.isAllowOCR
+//            if (self.isAllowOCR) {
+//                if let language = self.ocrLanguage {
+//                    options.language = language
+//                } else {
+//                    options.language = .english
+//                }
+//            }
             self.converter.convert(toFilePath: self.outputFilePath, pageIndexs: self.pages, options: options)
             return
         }

+ 2 - 2
PDF Office/PDF Master/Class/PDFTools/Crop/KMPDFCropWindowController.swift

@@ -95,7 +95,7 @@ class KMPDFCropWindowController: NSWindowController, CPDFViewDelegate, NSWindowD
         if selectPageString.count > 0 {
             self.pagesString = String(format: "%ld", (Int(selectPageString) ?? 0) + 1)
             self.pageType = .PagesString
-            let nu: NSNumber = Int(self.pagesString)! as NSNumber
+            let nu: NSNumber = Int(selectPageString)! as NSNumber
             self.selectPages.add(nu)
         }else {
             self.pageType = .AllPages
@@ -109,7 +109,7 @@ class KMPDFCropWindowController: NSWindowController, CPDFViewDelegate, NSWindowD
         if selectPages.count > 0 {
             self.pagesString = String(format: "%ld", (Int(selectPages) ?? 0) + 1)
             self.pageType = .PagesString
-            let nu: NSNumber = Int(self.pagesString)! as NSNumber
+            let nu: NSNumber = Int(selectPages)! as NSNumber
             self.selectPages.add(nu)
         }else {
             self.pageType = .AllPages

+ 6 - 0
PDF Office/PDF Reader Pro.xcodeproj/project.pbxproj

@@ -3370,6 +3370,9 @@
 		BB3D971A2B3060B5007094C8 /* KMPDFAnnotationRedactConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB3D97192B3060B5007094C8 /* KMPDFAnnotationRedactConfig.swift */; };
 		BB3D971B2B3060B5007094C8 /* KMPDFAnnotationRedactConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB3D97192B3060B5007094C8 /* KMPDFAnnotationRedactConfig.swift */; };
 		BB3D971C2B3060B5007094C8 /* KMPDFAnnotationRedactConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB3D97192B3060B5007094C8 /* KMPDFAnnotationRedactConfig.swift */; };
+		BB3E4E102BD0EECC007321FE /* DocumentAI.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 9FC444FC2AA7057B00D7187C /* DocumentAI.bundle */; };
+		BB3E4E112BD0EECE007321FE /* DocumentAI.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 9FC444FC2AA7057B00D7187C /* DocumentAI.bundle */; };
+		BB3E4E122BD0EECF007321FE /* DocumentAI.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 9FC444FC2AA7057B00D7187C /* DocumentAI.bundle */; };
 		BB3EAEAD293E3D6000D92407 /* KMConvertBaseWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB3EAEAB293E3D6000D92407 /* KMConvertBaseWindowController.swift */; };
 		BB3EAEAE293E3D6000D92407 /* KMConvertBaseWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB3EAEAB293E3D6000D92407 /* KMConvertBaseWindowController.swift */; };
 		BB3EAEAF293E3D6000D92407 /* KMConvertBaseWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB3EAEAB293E3D6000D92407 /* KMConvertBaseWindowController.swift */; };
@@ -14008,6 +14011,7 @@
 				9FB220DA2B0F4ED400A5B208 /* KMAnnotationSelectLinkViewController.xib in Resources */,
 				89752DED293875FC003FF08E /* KMMainToolbarController.xib in Resources */,
 				9FAAA335290BD0A20046FFCE /* KMHistoryFileCollectionViewItem.xib in Resources */,
+				BB3E4E102BD0EECC007321FE /* DocumentAI.bundle in Resources */,
 				ADD1B6CB2942E85300C3FFF7 /* KMPrintBottomView.xib in Resources */,
 				89752DB02936F505003FF08E /* KMCustomButtonPopMenuViewController.xib in Resources */,
 				BB1B0B012B4FC6E900889528 /* KMConvertGuideView.xib in Resources */,
@@ -14284,6 +14288,7 @@
 				9F03900A2B426F3300302D1D /* KMPageDisplayPropertiesViewController.xib in Resources */,
 				ADF1569829A62D31001D1018 /* KMLoginLeftImageView.xib in Resources */,
 				89316856296E45CA0073EA59 /* KMImageAccessoryController.xib in Resources */,
+				BB3E4E112BD0EECE007321FE /* DocumentAI.bundle in Resources */,
 				BBC3483F2955A60B008D2CD1 /* KMBackgroundPropertyInfoController.xib in Resources */,
 				9F02018A2A1DA28B00C9B673 /* KMAILanguagePopVC.xib in Resources */,
 				9FA693AC2987C0590055488A /* KMStepperView.xib in Resources */,
@@ -14984,6 +14989,7 @@
 				9FD0FA5029D43D6800F2AB0D /* KMDeviceBrowserWindowController.xib in Resources */,
 				AD055E922B88304E0035F824 /* BookmarksWindow.xib in Resources */,
 				ADC63E3C2A49813E00854E02 /* KMSubscribeSuccessWindowController.xib in Resources */,
+				BB3E4E122BD0EECF007321FE /* DocumentAI.bundle in Resources */,
 				AD68783A29A60FC0005B5210 /* KMLoginView.xib in Resources */,
 				BBEFD0222AF9E5BC003FABD8 /* KMBatchOperateAddHeaderFooterViewController.xib in Resources */,
 				899700ED28F3E4D3009AF911 /* MainWindowController.xib in Resources */,