Browse Source

【2025】【转档】整理代码

tangchao 4 months ago
parent
commit
8f4a239f27
21 changed files with 247 additions and 487 deletions
  1. 2 0
      PDF Office/PDF Master/Class/PDFTools/Convert/NewController/Common/Base/KMConvertBaseView.swift
  2. 0 1
      PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift
  3. 37 175
      PDF Office/PDF Master/KMClass/Convert/Base/KMConvertBaseWindowController.swift
  4. 75 75
      PDF Office/PDF Master/KMClass/Convert/Base/KMConvertBaseWindowController.xib
  5. 0 29
      PDF Office/PDF Master/KMClass/Convert/View/KMConvertCSVSettingView.swift
  6. 18 49
      PDF Office/PDF Master/KMClass/Convert/View/KMConvertExcelSettingView.swift
  7. 18 6
      PDF Office/PDF Master/KMClass/Convert/View/KMConvertHtmlSettingView.swift
  8. 4 5
      PDF Office/PDF Master/KMClass/Convert/View/KMConvertHtmlSettingView.xib
  9. 15 19
      PDF Office/PDF Master/KMClass/Convert/View/KMConvertImageSettingView.swift
  10. 13 13
      PDF Office/PDF Master/KMClass/Convert/View/KMConvertJsonSettingView.xib
  11. 2 35
      PDF Office/PDF Master/KMClass/Convert/View/KMConvertOCRSettingItemView.swift
  12. 11 4
      PDF Office/PDF Master/KMClass/Convert/View/KMConvertPPTsSettingView.swift
  13. 0 4
      PDF Office/PDF Master/KMClass/Convert/View/KMConvertPageRangeSettingItemView.swift
  14. 0 9
      PDF Office/PDF Master/KMClass/Convert/View/KMConvertSettingLimitTipView.swift
  15. 11 18
      PDF Office/PDF Master/KMClass/Convert/View/KMConvertSettingView.swift
  16. 7 30
      PDF Office/PDF Master/KMClass/Convert/View/KMConvertWordSettingView.swift
  17. 1 13
      PDF Office/PDF Master/KMClass/Convert/Window/KMConvertExcelWindowController.swift
  18. 0 1
      PDF Office/PDF Master/KMClass/Convert/Window/KMConvertHtmlWindowController.swift
  19. 12 1
      PDF Office/PDF Master/KMClass/Convert/Window/KMConvertWordWindowController.swift
  20. 15 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift
  21. 6 0
      PDF Office/PDF Master/KMClass/Tools/PDFPreview/KMNPreView.swift

+ 2 - 0
PDF Office/PDF Master/Class/PDFTools/Convert/NewController/Common/Base/KMConvertBaseView.swift

@@ -39,4 +39,6 @@ class KMConvertBaseView: NSView, NibLoadable {
     func initDefaultVlaue() {}
     func initSubViews() {}
     
+    func updateViewColor() {}
+    
 }

+ 0 - 1
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift

@@ -2536,7 +2536,6 @@ extension KMMainViewController {
         } else if type == .json {
             convertT = .Json
         }
-        windowController?.subscribeWaterMarkType = type.toSubscribeWaterMarkType()
         
         var url: URL?
         if (documentUrl != nil) {

+ 37 - 175
PDF Office/PDF Master/KMClass/Convert/Base/KMConvertBaseWindowController.swift

@@ -8,17 +8,10 @@
 import PDFKit
 import KMComponentLibrary
 
-typealias KMConvertBaseWindowControllerItemClick = (Int) -> ()
 class KMConvertBaseWindowController: KMNBaseWindowController {
     @IBOutlet weak var titleLabel: NSTextField!
     
     @IBOutlet weak var leftBox: NSBox!
-    @IBOutlet weak var prePDFView: KMNPDFPreView?
-    @IBOutlet weak var numberBox: NSView!
-    @IBOutlet weak var numberTextField: NSTextField!
-    @IBOutlet weak var perLabel: NSTextField!
-    @IBOutlet weak var totalNumberLabel: NSTextField!
-    
     @IBOutlet weak var rightScrollView: NSScrollView!
     
     @IBOutlet weak var batchButton: NSButton!
@@ -30,8 +23,6 @@ class KMConvertBaseWindowController: KMNBaseWindowController {
     private var cancelButton_: ComponentButton?
     private var convertButton_: ComponentButton?
     private var batchButton_: ComponentButton?
-
-    var itemClick: KMConvertBaseWindowControllerItemClick?
     
     var documentModel: KMDocumentModel?
     
@@ -55,17 +46,10 @@ class KMConvertBaseWindowController: KMNBaseWindowController {
     private var convert: KMPDFConvert?
     private var ocrLanguage_: COCRLanguage = .english
     
-    var limit = true
-    // 是否限制次数
-    var limitCount = true
     var oriDocumentUrl: URL?
-    var subscribeWaterMarkType: KMSubscribeWaterMarkType?
     
     deinit {
         KMPrint("KMConvertBaseWindowController 已释放")
-        
-        prePDFView?.removeFromSuperview()
-        prePDFView = nil
     }
     
     convenience init() {
@@ -83,6 +67,8 @@ class KMConvertBaseWindowController: KMNBaseWindowController {
     override func windowDidLoad() {
         super.windowDidLoad()
         
+        updateViewColor()
+        
         let view = KMNPreView.createFromNib()
         leftBox.contentView = view
         pdfPreView = view
@@ -90,22 +76,13 @@ class KMConvertBaseWindowController: KMNBaseWindowController {
         if (documentModel != nil) {
             pdfPreView?.setFileUrl(self.documentModel!.documentURL, password: self.documentModel?.password)
             
-            pdfPreView?.pdfPreView.pdfView.go(toPageIndex: self.documentModel?.currentIndex ?? 0, animated: false)
+            pdfPreView?.pdfView?.go(toPageIndex: self.documentModel?.currentIndex ?? 0, animated: false)
         }
 
         if let pageCount = pdfPreView?.pageCount {
             settingView?.pageCount = Int(pageCount)
         }
         
-        prePDFView?.currentPageDidChanged = { [weak self] preView, idx in
-            guard let pdfView = preView?.pdfView else {
-                return
-            }
-            let currentIndex = pdfView.currentPageIndex
-            self?.currentPageIndex = currentIndex + 1
-            self?.numberTextField.stringValue = "\(currentIndex+1)"
-        }
-        
         pdfPreView?.reloadUI()
     }
     
@@ -118,6 +95,7 @@ class KMConvertBaseWindowController: KMNBaseWindowController {
         rightScrollView.verticalScrollElasticity = .none
         rightScrollView.horizontalScrollElasticity = .none
         
+        
         view?.km_add_inset_constraint()
         
         view?.currentLanguage = self.getCurrentLanguage()
@@ -132,7 +110,7 @@ class KMConvertBaseWindowController: KMNBaseWindowController {
         view?.pageRangeDidChange = { [weak self] pageRange in
             self?.pageRange = pageRange
             if (pageRange != .custom) {
-                self?.updatePreView(pageRange: pageRange)
+                self?._updatePreView(pageRange: pageRange)
             }
         }
         view?.pageRangeDidInputFinishCallback = { [unowned self] string in
@@ -146,26 +124,13 @@ class KMConvertBaseWindowController: KMNBaseWindowController {
                 
                 self.settingView?.pageRangeItemView?.pageSizeVC?.stringValue = ""
             } else {
-                self.updatePreView(pageRange: .custom, pageString: string)
-            }
-        }
-        view?.tipView?.itemClick = { [unowned self] _, _ in
-#if VERSION_DMG
-            KMTools.openPurchaseProductWebsite()
-#else
-            Task { @MainActor in
-                if await (KMLightMemberManager.manager.canPayFunction() == false) {
-                    let _ = KMSubscribeWaterMarkWindowController.show(window: self.window!) { isSubscribeSuccess, isWaterMarkExport, isClose in
-                        if (isSubscribeSuccess) {
-                            self.refreshUI()
-                        }
-                    }
-                }
+                self._updatePreView(pageRange: .custom, pageString: string)
             }
-#endif
         }
+        
         settingView?.tipView?.isHidden = true
         
+        
         cancelButton_ = ComponentButton()
         cancelButton_?.properties = ComponentButtonProperty(type: .default_tertiary, size: .s, state: .normal, buttonText: KMLocalizedString("Cancel"))
         cancelButton_?.setTarget(self, action: #selector(cancelButtonAction))
@@ -186,16 +151,6 @@ class KMConvertBaseWindowController: KMNBaseWindowController {
     override func initDefaultValue() {
         super.initDefaultValue()
         
-        totalNumberLabel.lineBreakMode = .byTruncatingTail
-        
-        numberBox.wantsLayer = true
-        numberBox.layer?.backgroundColor = NSColor.white.cgColor
-        numberBox.layer?.borderWidth = 1
-        numberBox.layer?.cornerRadius = 4
-        numberTextField.focusRingType = .none
-        numberTextField.delegate = self
-        numberTextField.isBordered = false
-        
         canelBox.fillColor = .clear
         cancelButton_?.keyEquivalent = KMKeyEquivalent.esc.string()
         
@@ -211,20 +166,10 @@ class KMConvertBaseWindowController: KMNBaseWindowController {
         rightScrollView.hasVerticalScroller = false
         rightScrollView.hasHorizontalScroller = false
         
-        initUIProperty()
-    }
-    
-    private func initUIProperty() {
-        self.titleLabel.textColor = NSColor.titleColor()
-        self.titleLabel.font = .SFProTextSemiboldFont(16)
-        
-        self.leftBox.fillColor = NSColor.km_init(hex: "#F7F8FA")
-//        self.prePDFView?.backgroundColor = NSColor.km_init(hex: "#F7F8FA")
-        self.numberBox.layer?.borderColor = NSColor.km_init(hex: "#DFE1E5").cgColor
-        self.perLabel.textColor = NSColor.titleColor()
-        self.perLabel.font = .SFProTextRegularFont(12)
-        self.totalNumberLabel.textColor = NSColor.titleColor()
-        self.totalNumberLabel.font = .SFProTextRegularFont(12)
+        titleLabel.font =  ComponentLibrary.shared.getFontFromKey("mac/body-m-medium")
+        
+        leftBox.borderWidth = 1
+        leftBox.cornerRadius = ComponentLibrary.shared.getComponentValueFromKey("radius/m") as? CGFloat ?? 0
     }
     
     func initSettingView() -> KMConvertSettingView? {
@@ -236,7 +181,7 @@ class KMConvertBaseWindowController: KMNBaseWindowController {
         return KMPDFConvert()
     }
     
-    func setupContentHeight(height: CGFloat, animated: Bool = false) {
+    func setupContentHeight(height: CGFloat, animated: Bool = false) { // 391
         if (animated) {
             rightBoxHeightConst.animator().constant = height
         } else {
@@ -244,17 +189,22 @@ class KMConvertBaseWindowController: KMNBaseWindowController {
         }
     }
     
-    func refreshUI() {
-        
+    func updateViewColor() {
+        KMMainThreadExecute {
+            self.titleLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/1")
+            
+            self.leftBox.fillColor = ComponentLibrary.shared.getComponentColorFromKey("colorFill/4")
+            self.leftBox.borderColor = ComponentLibrary.shared.getComponentColorFromKey("colorBorder/4")
+            
+            self.settingView?.updateViewColor()
+        }
     }
     
     @objc func batchButtonAction() {
-//        guard let callback = itemClick else {
-//            return
-//        }
-//
-//        callback(1)
+        self._clearData()
         own_closeEndSheet()
+        
+        KMPrint("batchButtonAction")
     }
     
     @objc func cancelButtonAction() {
@@ -395,7 +345,7 @@ class KMConvertBaseWindowController: KMNBaseWindowController {
     
     // MARK: - Private Methods
     
-    internal func updatePreView(pageRange: KMPageRange, pageString: String = "") {
+    private func _updatePreView(pageRange: KMPageRange, pageString: String = "") {
         let pages = getPages(pageRange, pageString: pageString)
         if (pages == nil || pages!.isEmpty) {
             let alert = NSAlert()
@@ -411,16 +361,6 @@ class KMConvertBaseWindowController: KMNBaseWindowController {
         }
         document?.removePage(at: indexs)
 
-        #if DEBUG
-        let pageIndexs = getPageIndexs(pageRange, pageString: pageString)
-        if (pageIndexs != nil) {
-            for i in pageIndexs! {
-
-                KMPrint(i)
-            }
-        }
-        #endif
-//        self.prePDFView.document?.importPages(pageIndexs!, from: self.documentModel.document, at: 0)
         for page in pages! {
             document?.insertPageObject(page, at: document?.pageCount ?? 0)
         }
@@ -430,11 +370,7 @@ class KMConvertBaseWindowController: KMNBaseWindowController {
             prePDFView?.setNeedsDisplayForVisiblePages()
             prePDFView?.goToFirstPage(nil)
 
-            let number: Int = Int(prePDFView!.document!.pageCount)
-//            self.totalNumberLabel.stringValue = "\(number)"
             currentPageIndex = 1
-//            self.numberTextField.stringValue = "1"
-
             pdfPreView?.reloadUI()
         }
     }
@@ -550,29 +486,20 @@ class KMConvertBaseWindowController: KMNBaseWindowController {
         return pages
     }
     
-    private func _convertButtonAction(limit: Bool = false) {
+    private func _convertButtonAction() {
         var pages: [Int] = []
         let filePath = getConvertFileSavePath()
         if (FileManager.default.fileExists(atPath: filePath)) {
             try?FileManager.default.removeItem(atPath: filePath)
         }
-        if (limit) {
-//            if let _ = KMTools.saveWatermarkDocument(document: self.prePDFView!.document, to: URL(fileURLWithPath: filePath), removePWD: true) {
-//                for i in 0 ..< self.prePDFView!.document.pageCount {
-//                    if (i >= 10) {
-//                        break
-//                    }
-//                    pages.append(Int(i)+1)
-//                }
-//            }
-        } else {
-            let document = pdfPreView?.pdfPreView.pdfView.document
-            if ((document?.writeDecrypt(to: URL(fileURLWithPath: filePath)))!) {
-                for i in 0 ..< document!.pageCount {
-                    pages.append(Int(i)+1)
-                }
+
+        let document = pdfPreView?.pdfPreView.pdfView.document
+        if ((document?.writeDecrypt(to: URL(fileURLWithPath: filePath)))!) {
+            for i in 0 ..< document!.pageCount {
+                pages.append(Int(i)+1)
             }
         }
+
         
         if (pages.count <= 0) {
             let alert = NSAlert()
@@ -606,9 +533,7 @@ class KMConvertBaseWindowController: KMNBaseWindowController {
                 if (self.fileExtension.isEmpty) {
                     fileName = url!.lastPathComponent
                 }
-                //            if (fileName.isEmpty) {
-                //                fileName = NSLocalizedString("Untitled", comment: "")
-                //            }
+
                 convert.outputFileName = fileName
                 self.convertModelAppendParams(convert: convert)
                 
@@ -616,15 +541,7 @@ class KMConvertBaseWindowController: KMNBaseWindowController {
                     self.showProgressWindow()
                     self.progressController?.maxValue = Double(convert.pages.count)
                 }
-#if VERSION_DMG
-                if self.settingView?.ocrItemView?.checkVC?.state == .Checked {
-                    let bundlePath = kResourcePath?.stringByAppendingPathComponent("DocumentAI.bundle")
-                    CPDFConvertKit.setOCRModelPath(bundlePath)
-                }
-#else
-                let bundlePath = Bundle.main.path(forResource: "DocumentAI", ofType: "bundle")
-                CPDFConvertKit.setOCRModelPath(bundlePath)
-#endif
+
                 DispatchQueue.global().async {
                     KMPDFConvertManager.defaultManager.convert(convert: convert, progress: { index in
                         DispatchQueue.main.async {
@@ -916,7 +833,6 @@ class KMConvertBaseWindowController: KMNBaseWindowController {
     }
     
     func getCurrentLanguage() -> String {
-//        return Bundle.main.preferredLocalizations.first!
         let array: [String] = UserDefaults.standard.object(forKey: "AppleLanguages") as! [String]
         return array.first!
     }
@@ -929,63 +845,9 @@ class KMConvertBaseWindowController: KMNBaseWindowController {
     
     private func _clearData() {
         if let _ = self.oriDocumentUrl {
-//            if let data = self.prePDFView?.document.documentURL.path, FileManager.default.fileExists(atPath: data) {
-//                try?FileManager.default.removeItem(atPath: data)
-//            }
-        }
-    }
-}
-
-extension KMConvertBaseWindowController: NSTextFieldDelegate {
-    func controlTextDidChange(_ obj: Notification) {
-        if numberTextField.isEqual(to: obj.object) {
-            let textField: NSTextField = obj.object as! NSTextField
-            var value: String = ""
-            for ch in textField.stringValue {
-                if ch != "0" && ch != "1" && ch != "2" && ch != "3" && ch != "4" && ch != "5" && ch != "6" && ch != "7" && ch != "8" && ch != "9" {
-
-                } else {
-                    if value.isEmpty && ch == "0" {
-                        
-                    } else {
-                        value.append(ch)
-                    }
-                }
+            if let data = self.pdfPreView?.pdfView?.document.documentURL.path, FileManager.default.fileExists(atPath: data) {
+                try?FileManager.default.removeItem(atPath: data)
             }
-            
-            if value.isEmpty {
-                value.append("1")
-            } else {
-//                if Int(value)! <= 0 {
-//                    value = "1"
-//                } else if Int(value)! > self.prePDFView!.document!.pageCount {
-//                    let number: Int = Int(self.prePDFView!.document!.pageCount)
-//                    value = "\(number)"
-//                }
-            }
-            
-            numberTextField.stringValue = value
-        }
-    }
-    
-    func controlTextDidEndEditing(_ obj: Notification) {
-        if numberTextField.isEqual(to: obj.object) {
-            if (numberTextField.stringValue.isEmpty) {
-                numberTextField.stringValue = "1"
-//                self.prePDFView?.go(toPageIndex: 0, animated: false)
-                self.currentPageIndex = 1
-                
-                return
-            }
-            let number: Int = Int(numberTextField.stringValue)!
-//            if number > 0 && number <= self.prePDFView!.document!.pageCount {
-//                guard let page = self.prePDFView?.document?.page(at: UInt(number-1)) else {
-//                    return
-//                }
-//                self.prePDFView?.go(to: page)
-//                currentPageIndex = number
-//            }
         }
     }
 }
-

+ 75 - 75
PDF Office/PDF Master/KMClass/Convert/Base/KMConvertBaseWindowController.xib

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
         <capability name="System colors introduced in macOS 10.13" minToolsVersion="9.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -32,7 +32,7 @@
             <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
             <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
             <rect key="contentRect" x="196" y="240" width="586" height="483"/>
-            <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
+            <rect key="screenRect" x="0.0" y="0.0" width="1440" height="875"/>
             <value key="minSize" type="size" width="586" height="483"/>
             <value key="maxSize" type="size" width="586" height="483"/>
             <view key="contentView" id="se5-gp-TjO">
@@ -45,7 +45,7 @@
                             <rect key="frame" x="0.0" y="0.0" width="586" height="44"/>
                             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                             <subviews>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="FhR-40-9KK">
+                                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="FhR-40-9KK">
                                     <rect key="frame" x="14" y="10" width="44" height="19"/>
                                     <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="i7C-Qe-kqF">
                                         <font key="font" metaFont="system" size="16"/>
@@ -75,7 +75,7 @@
                                 <customView translatesAutoresizingMaskIntoConstraints="NO" id="XyN-M5-Ckr">
                                     <rect key="frame" x="56" y="16" width="56" height="24"/>
                                     <subviews>
-                                        <textField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="0fT-PL-boX">
+                                        <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="0fT-PL-boX">
                                             <rect key="frame" x="8" y="2" width="40" height="21"/>
                                             <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" id="PMO-9h-eKH">
                                                 <font key="font" usesAppearanceFont="YES"/>
@@ -92,7 +92,7 @@
                                         <constraint firstItem="0fT-PL-boX" firstAttribute="centerY" secondItem="XyN-M5-Ckr" secondAttribute="centerY" id="t3M-pb-lv4"/>
                                     </constraints>
                                 </customView>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="OjN-CY-T87">
+                                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="OjN-CY-T87">
                                     <rect key="frame" x="118" y="18" width="9" height="20"/>
                                     <textFieldCell key="cell" lineBreakMode="clipping" title="/" id="B2h-9Y-2H7">
                                         <font key="font" metaFont="system" size="17"/>
@@ -100,7 +100,7 @@
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     </textFieldCell>
                                 </textField>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="b9V-3O-PC8">
+                                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="b9V-3O-PC8">
                                     <rect key="frame" x="131" y="20" width="32" height="16"/>
                                     <constraints>
                                         <constraint firstAttribute="width" relation="lessThanOrEqual" constant="28" id="Iqf-l4-eTt"/>
@@ -168,21 +168,21 @@
                                 <scrollView borderType="none" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jkb-2v-6fa">
                                     <rect key="frame" x="0.0" y="0.0" width="358" height="391"/>
                                     <clipView key="contentView" id="tI2-Vq-Nms">
-                                        <rect key="frame" x="0.0" y="0.0" width="343" height="376"/>
+                                        <rect key="frame" x="0.0" y="0.0" width="358" height="391"/>
                                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                         <subviews>
                                             <view id="dBH-xr-mGL">
-                                                <rect key="frame" x="0.0" y="0.0" width="328" height="361"/>
+                                                <rect key="frame" x="0.0" y="0.0" width="343" height="376"/>
                                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                             </view>
                                         </subviews>
                                     </clipView>
                                     <scroller key="horizontalScroller" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="MLK-hj-eAf">
-                                        <rect key="frame" x="0.0" y="376" width="343" height="15"/>
+                                        <rect key="frame" x="0.0" y="375" width="358" height="16"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                     </scroller>
                                     <scroller key="verticalScroller" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="L4p-RZ-VGS">
-                                        <rect key="frame" x="343" y="0.0" width="15" height="376"/>
+                                        <rect key="frame" x="342" y="0.0" width="16" height="391"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                     </scroller>
                                 </scrollView>
@@ -209,14 +209,14 @@
                                 </box>
                                 <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="iFO-Ki-C0L">
                                     <rect key="frame" x="16" y="16" width="70" height="32"/>
-                                    <buttonCell key="cell" type="bevel" title="Button" bezelStyle="rounded" alignment="center" imageScaling="proportionallyDown" inset="2" id="d7s-3h-qfP">
-                                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                        <font key="font" metaFont="system"/>
-                                    </buttonCell>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="32" id="C1r-dK-Ys8"/>
                                         <constraint firstAttribute="width" constant="70" id="JwP-9x-Fn9"/>
                                     </constraints>
+                                    <buttonCell key="cell" type="bevel" title="Button" bezelStyle="rounded" alignment="center" imageScaling="proportionallyDown" inset="2" id="d7s-3h-qfP">
+                                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                        <font key="font" metaFont="system"/>
+                                    </buttonCell>
                                 </button>
                                 <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="Xgn-Dg-lq9">
                                     <rect key="frame" x="394" y="16" width="80" height="32"/>
@@ -290,7 +290,7 @@
                         <rect key="frame" x="0.0" y="0.0" width="276" height="88"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
-                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="whh-eW-WBM">
+                            <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="whh-eW-WBM">
                                 <rect key="frame" x="14" y="67" width="35" height="15"/>
                                 <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="ROy-KL-lN4">
                                     <font key="font" metaFont="cellTitle"/>
@@ -327,23 +327,23 @@
                     </constraints>
                 </box>
                 <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="oS9-mp-RTl">
-                    <rect key="frame" x="0.0" y="56" width="276" height="90"/>
+                    <rect key="frame" x="0.0" y="34" width="276" height="112"/>
                     <view key="contentView" id="bKQ-mM-Aps">
-                        <rect key="frame" x="0.0" y="0.0" width="276" height="90"/>
+                        <rect key="frame" x="0.0" y="0.0" width="276" height="112"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                     </view>
                     <constraints>
-                        <constraint firstAttribute="height" constant="90" id="4pf-TM-A0R"/>
+                        <constraint firstAttribute="height" constant="112" id="4pf-TM-A0R"/>
                     </constraints>
                 </box>
                 <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="zlB-1P-aoC">
-                    <rect key="frame" x="0.0" y="-12" width="276" height="60"/>
+                    <rect key="frame" x="0.0" y="-46" width="276" height="72"/>
                     <view key="contentView" id="0WM-4e-ju8">
-                        <rect key="frame" x="0.0" y="0.0" width="276" height="60"/>
+                        <rect key="frame" x="0.0" y="0.0" width="276" height="72"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                     </view>
                     <constraints>
-                        <constraint firstAttribute="height" constant="60" id="L45-uA-YPR"/>
+                        <constraint firstAttribute="height" constant="72" id="L45-uA-YPR"/>
                     </constraints>
                 </box>
             </subviews>
@@ -368,11 +368,11 @@
             <point key="canvasLocation" x="118" y="543"/>
         </customView>
         <customView id="rMz-DL-eLf" customClass="KMConvertOCRSettingItemView" customModule="PDF_Reader_Pro" customModuleProvider="target">
-            <rect key="frame" x="0.0" y="0.0" width="276" height="86"/>
+            <rect key="frame" x="0.0" y="0.0" width="276" height="112"/>
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
             <subviews>
-                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="hUX-cE-if5">
-                    <rect key="frame" x="14" y="71" width="35" height="15"/>
+                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="hUX-cE-if5">
+                    <rect key="frame" x="14" y="85" width="35" height="15"/>
                     <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="tdB-aW-iJn">
                         <font key="font" metaFont="cellTitle"/>
                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -380,14 +380,14 @@
                     </textFieldCell>
                 </textField>
                 <box boxType="custom" borderType="bezel" borderWidth="0.0" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="NQR-a4-Hap">
-                    <rect key="frame" x="16" y="41" width="244" height="22"/>
+                    <rect key="frame" x="16" y="41" width="244" height="32"/>
                     <view key="contentView" id="HRI-aP-ntI">
-                        <rect key="frame" x="0.0" y="0.0" width="244" height="22"/>
+                        <rect key="frame" x="0.0" y="0.0" width="244" height="32"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                     </view>
                     <constraints>
                         <constraint firstAttribute="width" constant="244" id="Adx-8t-Hxt"/>
-                        <constraint firstAttribute="height" constant="22" id="gwG-aj-fgK"/>
+                        <constraint firstAttribute="height" constant="32" id="gwG-aj-fgK"/>
                     </constraints>
                     <color key="fillColor" name="findHighlightColor" catalog="System" colorSpace="catalog"/>
                 </box>
@@ -410,8 +410,8 @@
                 <constraint firstAttribute="trailing" secondItem="NQR-a4-Hap" secondAttribute="trailing" constant="16" id="VoC-OC-IrL"/>
                 <constraint firstAttribute="trailing" secondItem="SQ2-Ew-VGy" secondAttribute="trailing" constant="16" id="Wwh-iu-yGK"/>
                 <constraint firstItem="SQ2-Ew-VGy" firstAttribute="leading" secondItem="rMz-DL-eLf" secondAttribute="leading" constant="16" id="b8d-1p-ppw"/>
-                <constraint firstItem="NQR-a4-Hap" firstAttribute="top" secondItem="hUX-cE-if5" secondAttribute="bottom" constant="8" id="ogb-Dp-rPy"/>
-                <constraint firstItem="hUX-cE-if5" firstAttribute="top" secondItem="rMz-DL-eLf" secondAttribute="top" id="tDK-4L-uzj"/>
+                <constraint firstItem="NQR-a4-Hap" firstAttribute="top" secondItem="hUX-cE-if5" secondAttribute="bottom" constant="12" id="ogb-Dp-rPy"/>
+                <constraint firstItem="hUX-cE-if5" firstAttribute="top" secondItem="rMz-DL-eLf" secondAttribute="top" constant="12" id="tDK-4L-uzj"/>
             </constraints>
             <connections>
                 <outlet property="checkBox" destination="NQR-a4-Hap" id="Ss4-FB-YN7"/>
@@ -424,8 +424,8 @@
             <rect key="frame" x="0.0" y="0.0" width="280" height="76"/>
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
             <subviews>
-                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="yO0-Oi-VYM">
-                    <rect key="frame" x="14" y="60" width="37" height="16"/>
+                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="yO0-Oi-VYM">
+                    <rect key="frame" x="14" y="48" width="37" height="16"/>
                     <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="Z4k-2p-kHi">
                         <font key="font" usesAppearanceFont="YES"/>
                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -433,7 +433,7 @@
                     </textFieldCell>
                 </textField>
                 <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="rW9-tS-eS8">
-                    <rect key="frame" x="16" y="20" width="248" height="32"/>
+                    <rect key="frame" x="16" y="4" width="248" height="32"/>
                     <view key="contentView" id="pid-i9-s2l">
                         <rect key="frame" x="0.0" y="0.0" width="248" height="32"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -447,9 +447,9 @@
             <constraints>
                 <constraint firstAttribute="trailing" secondItem="rW9-tS-eS8" secondAttribute="trailing" constant="16" id="Jbg-nY-Cdc"/>
                 <constraint firstItem="rW9-tS-eS8" firstAttribute="leading" secondItem="pQ2-zT-XVA" secondAttribute="leading" constant="16" id="KbN-Ie-X8m"/>
-                <constraint firstItem="yO0-Oi-VYM" firstAttribute="top" secondItem="pQ2-zT-XVA" secondAttribute="top" id="WZ7-pP-LIg"/>
+                <constraint firstItem="yO0-Oi-VYM" firstAttribute="top" secondItem="pQ2-zT-XVA" secondAttribute="top" constant="12" id="WZ7-pP-LIg"/>
                 <constraint firstItem="yO0-Oi-VYM" firstAttribute="leading" secondItem="pQ2-zT-XVA" secondAttribute="leading" constant="16" id="obs-yw-vzp"/>
-                <constraint firstItem="rW9-tS-eS8" firstAttribute="top" secondItem="yO0-Oi-VYM" secondAttribute="bottom" constant="8" id="qNe-Cn-8AL"/>
+                <constraint firstItem="rW9-tS-eS8" firstAttribute="top" secondItem="yO0-Oi-VYM" secondAttribute="bottom" constant="12" id="qNe-Cn-8AL"/>
             </constraints>
             <connections>
                 <outlet property="pageSizeBox" destination="rW9-tS-eS8" id="uou-Ce-T6v"/>
@@ -463,13 +463,13 @@
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
             <subviews>
                 <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="BdL-XS-WcI">
-                    <rect key="frame" x="0.0" y="162" width="276" height="80"/>
+                    <rect key="frame" x="0.0" y="178" width="276" height="64"/>
                     <view key="contentView" id="hsK-Lh-UaS">
-                        <rect key="frame" x="0.0" y="0.0" width="276" height="80"/>
+                        <rect key="frame" x="0.0" y="0.0" width="276" height="64"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
-                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Ezu-db-Vdi">
-                                <rect key="frame" x="14" y="65" width="35" height="15"/>
+                            <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Ezu-db-Vdi">
+                                <rect key="frame" x="14" y="49" width="35" height="15"/>
                                 <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="50D-1S-EUR">
                                     <font key="font" metaFont="cellTitle"/>
                                     <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -477,7 +477,7 @@
                                 </textFieldCell>
                             </textField>
                             <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="bdw-IP-gzr">
-                                <rect key="frame" x="16" y="23" width="244" height="32"/>
+                                <rect key="frame" x="16" y="7" width="244" height="32"/>
                                 <view key="contentView" id="8Ci-rA-CBy">
                                     <rect key="frame" x="0.0" y="0.0" width="244" height="32"/>
                                     <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -497,17 +497,17 @@
                         </constraints>
                     </view>
                     <constraints>
-                        <constraint firstAttribute="height" constant="80" id="v6N-X0-w3C"/>
+                        <constraint firstAttribute="height" constant="64" id="v6N-X0-w3C"/>
                     </constraints>
                 </box>
                 <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="Qeu-kB-TgR">
-                    <rect key="frame" x="0.0" y="82" width="276" height="80"/>
+                    <rect key="frame" x="0.0" y="134" width="276" height="44"/>
                     <view key="contentView" id="bks-fY-FWr">
-                        <rect key="frame" x="0.0" y="0.0" width="276" height="80"/>
+                        <rect key="frame" x="0.0" y="0.0" width="276" height="44"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
-                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="F2Q-wA-eBY">
-                                <rect key="frame" x="14" y="64" width="37" height="16"/>
+                            <textField hidden="YES" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="F2Q-wA-eBY">
+                                <rect key="frame" x="14" y="28" width="37" height="16"/>
                                 <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="bMK-zp-HOX">
                                     <font key="font" usesAppearanceFont="YES"/>
                                     <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -515,7 +515,7 @@
                                 </textFieldCell>
                             </textField>
                             <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="gLw-Yq-V5x">
-                                <rect key="frame" x="16" y="22" width="244" height="32"/>
+                                <rect key="frame" x="16" y="8" width="244" height="32"/>
                                 <view key="contentView" id="IDm-4H-2j5">
                                     <rect key="frame" x="0.0" y="0.0" width="244" height="32"/>
                                     <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -531,21 +531,21 @@
                             <constraint firstAttribute="trailing" secondItem="gLw-Yq-V5x" secondAttribute="trailing" constant="16" id="P7d-C2-nIp"/>
                             <constraint firstItem="F2Q-wA-eBY" firstAttribute="leading" secondItem="bks-fY-FWr" secondAttribute="leading" constant="16" id="a0k-es-8Oy"/>
                             <constraint firstItem="F2Q-wA-eBY" firstAttribute="top" secondItem="bks-fY-FWr" secondAttribute="top" id="gac-0i-Gvn"/>
-                            <constraint firstItem="gLw-Yq-V5x" firstAttribute="top" secondItem="F2Q-wA-eBY" secondAttribute="bottom" constant="10" id="jhK-GJ-A2o"/>
+                            <constraint firstItem="gLw-Yq-V5x" firstAttribute="top" secondItem="F2Q-wA-eBY" secondAttribute="bottom" constant="-12" id="jhK-GJ-A2o"/>
                         </constraints>
                     </view>
                     <constraints>
-                        <constraint firstAttribute="height" constant="80" id="j3F-Ys-RiF"/>
+                        <constraint firstAttribute="height" constant="44" id="j3F-Ys-RiF"/>
                     </constraints>
                 </box>
                 <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="X3f-Tt-Yj7">
-                    <rect key="frame" x="0.0" y="22" width="276" height="60"/>
+                    <rect key="frame" x="0.0" y="62" width="276" height="72"/>
                     <view key="contentView" id="saE-C0-GVL">
-                        <rect key="frame" x="0.0" y="0.0" width="276" height="60"/>
+                        <rect key="frame" x="0.0" y="0.0" width="276" height="72"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                     </view>
                     <constraints>
-                        <constraint firstAttribute="height" constant="60" id="BCA-ok-7Bb"/>
+                        <constraint firstAttribute="height" constant="72" id="BCA-ok-7Bb"/>
                     </constraints>
                 </box>
             </subviews>
@@ -586,8 +586,8 @@
                                     <font key="font" metaFont="system"/>
                                 </buttonCell>
                             </button>
-                            <comboBox hidden="YES" focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="uah-L1-IyT">
-                                <rect key="frame" x="31" y="-22" width="215" height="23"/>
+                            <comboBox hidden="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="uah-L1-IyT">
+                                <rect key="frame" x="32" y="-23" width="214" height="25"/>
                                 <comboBoxCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" completes="NO" numberOfVisibleItems="5" id="X1R-ss-GZO">
                                     <font key="font" metaFont="system"/>
                                     <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -658,23 +658,23 @@
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
             <subviews>
                 <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="cQW-WU-39i">
-                    <rect key="frame" x="0.0" y="152" width="276" height="90"/>
+                    <rect key="frame" x="0.0" y="130" width="276" height="112"/>
                     <view key="contentView" id="cJO-KL-2z0">
-                        <rect key="frame" x="0.0" y="0.0" width="276" height="90"/>
+                        <rect key="frame" x="0.0" y="0.0" width="276" height="112"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                     </view>
                     <constraints>
-                        <constraint firstAttribute="height" constant="90" id="Fyw-7A-nS7"/>
+                        <constraint firstAttribute="height" constant="112" id="Fyw-7A-nS7"/>
                     </constraints>
                 </box>
                 <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="VyH-O6-m3V">
-                    <rect key="frame" x="0.0" y="84" width="276" height="60"/>
+                    <rect key="frame" x="0.0" y="50" width="276" height="72"/>
                     <view key="contentView" id="VZT-JQ-a6L">
-                        <rect key="frame" x="0.0" y="0.0" width="276" height="60"/>
+                        <rect key="frame" x="0.0" y="0.0" width="276" height="72"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                     </view>
                     <constraints>
-                        <constraint firstAttribute="height" constant="60" id="mqH-eG-Uyt"/>
+                        <constraint firstAttribute="height" constant="72" id="mqH-eG-Uyt"/>
                     </constraints>
                 </box>
             </subviews>
@@ -697,13 +697,13 @@
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
             <subviews>
                 <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="J77-GL-ECh">
-                    <rect key="frame" x="0.0" y="162" width="270" height="200"/>
+                    <rect key="frame" x="0.0" y="172" width="270" height="190"/>
                     <view key="contentView" id="Qhg-fc-HIv">
-                        <rect key="frame" x="0.0" y="0.0" width="270" height="200"/>
+                        <rect key="frame" x="0.0" y="0.0" width="270" height="190"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
-                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="MHF-XE-yf0">
-                                <rect key="frame" x="14" y="184" width="37" height="16"/>
+                            <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="MHF-XE-yf0">
+                                <rect key="frame" x="14" y="174" width="37" height="16"/>
                                 <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="Z4s-Tq-fFY">
                                     <font key="font" usesAppearanceFont="YES"/>
                                     <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -711,7 +711,7 @@
                                 </textFieldCell>
                             </textField>
                             <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="u72-aS-gSj">
-                                <rect key="frame" x="16" y="114" width="238" height="32"/>
+                                <rect key="frame" x="16" y="104" width="238" height="32"/>
                                 <view key="contentView" id="vC5-po-CzR">
                                     <rect key="frame" x="0.0" y="0.0" width="238" height="32"/>
                                     <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -721,7 +721,7 @@
                                 </constraints>
                             </box>
                             <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="td0-i6-XZr">
-                                <rect key="frame" x="16" y="44" width="238" height="32"/>
+                                <rect key="frame" x="16" y="34" width="238" height="32"/>
                                 <view key="contentView" id="aek-8z-X0y">
                                     <rect key="frame" x="0.0" y="0.0" width="238" height="32"/>
                                     <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -731,7 +731,7 @@
                                 </constraints>
                             </box>
                             <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="coC-rc-dkG">
-                                <rect key="frame" x="16" y="154" width="238" height="22"/>
+                                <rect key="frame" x="16" y="144" width="238" height="22"/>
                                 <view key="contentView" id="euq-DT-i99">
                                     <rect key="frame" x="0.0" y="0.0" width="238" height="22"/>
                                     <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -742,7 +742,7 @@
                                 <color key="fillColor" red="0.92156862750000001" green="0.92156862750000001" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                             </box>
                             <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="RgG-op-QpY">
-                                <rect key="frame" x="16" y="84" width="238" height="22"/>
+                                <rect key="frame" x="16" y="74" width="238" height="22"/>
                                 <view key="contentView" id="IZf-Cd-1gO">
                                     <rect key="frame" x="0.0" y="0.0" width="238" height="22"/>
                                     <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -753,7 +753,7 @@
                                 <color key="fillColor" red="0.92156862750000001" green="0.92156862750000001" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                             </box>
                             <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="A5F-BN-csd">
-                                <rect key="frame" x="16" y="14" width="238" height="22"/>
+                                <rect key="frame" x="16" y="4" width="238" height="22"/>
                                 <view key="contentView" id="wT6-5J-NY2">
                                     <rect key="frame" x="0.0" y="0.0" width="238" height="22"/>
                                     <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -785,27 +785,27 @@
                         </constraints>
                     </view>
                     <constraints>
-                        <constraint firstAttribute="height" constant="200" id="UBd-Ue-F2e"/>
+                        <constraint firstAttribute="height" constant="190" id="UBd-Ue-F2e"/>
                     </constraints>
                 </box>
                 <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="w2v-Hy-YKp">
-                    <rect key="frame" x="0.0" y="72" width="270" height="90"/>
+                    <rect key="frame" x="0.0" y="60" width="270" height="112"/>
                     <view key="contentView" id="JcO-IP-Ka5">
-                        <rect key="frame" x="0.0" y="0.0" width="270" height="90"/>
+                        <rect key="frame" x="0.0" y="0.0" width="270" height="112"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                     </view>
                     <constraints>
-                        <constraint firstAttribute="height" constant="90" id="ps0-iI-Itf"/>
+                        <constraint firstAttribute="height" constant="112" id="ps0-iI-Itf"/>
                     </constraints>
                 </box>
                 <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="DgD-fL-8pQ">
-                    <rect key="frame" x="0.0" y="4" width="270" height="60"/>
+                    <rect key="frame" x="0.0" y="-20" width="270" height="72"/>
                     <view key="contentView" id="Y7N-eI-Xvk">
-                        <rect key="frame" x="0.0" y="0.0" width="270" height="60"/>
+                        <rect key="frame" x="0.0" y="0.0" width="270" height="72"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                     </view>
                     <constraints>
-                        <constraint firstAttribute="height" constant="60" id="J9g-ON-Lkv"/>
+                        <constraint firstAttribute="height" constant="72" id="J9g-ON-Lkv"/>
                     </constraints>
                 </box>
             </subviews>

+ 0 - 29
PDF Office/PDF Master/KMClass/Convert/View/KMConvertCSVSettingView.swift

@@ -22,11 +22,6 @@ class KMConvertCSVSettingView: KMConvertSettingView {
     
     override func awakeFromNib() {
         super.awakeFromNib()
-
-//        tableSheetComboBox.removeAllItems()
-//        tableSheetComboBox.addItems(withObjectValues: ["支持一个表格提取到单独的工作表","支持按页面提取表格到单独的工作表","支持将所有表格提取到一个工作表"])
-//        tableSheetComboBox.selectItem(at: 0)
-//        tableSheetComboBox.delegate = self
     }
     
     override func initSubViews() {
@@ -62,11 +57,6 @@ class KMConvertCSVSettingView: KMConvertSettingView {
         if (self.pageRangeItemView == nil) {
             self.pageRangeItemView = KMConvertPageRangeSettingItemView.createFromNib()
             self.pageRangeBox.contentView = self.pageRangeItemView
-            
-//            self.tipView?.km_add_left_constraint(constant: 8)
-//            self.tipView?.km_add_top_constraint(equalTo: self.pageRangeBox, attribute: .bottom, constant: -5)
-//            self.tipView?.km_add_right_constraint()
-//            self.tipView?.km_add_height_constraint(constant: 16+20+16)
         }
     }
     
@@ -81,12 +71,6 @@ class KMConvertCSVSettingView: KMConvertSettingView {
             }
         }
         
-//        if let state = self.onlyGetTableVC?.state, state == .Checked {
-//            self.tableSheetComboBox.isEnabled = true
-//        } else {
-//            self.tableSheetComboBox.isEnabled = false
-//        }
-        
         if let state = self.onlyGetTableVC?.state, state == .Checked {
             self.selectedSettingIndex = 1
         } else {
@@ -94,16 +78,3 @@ class KMConvertCSVSettingView: KMConvertSettingView {
         }
     }
 }
-
-//extension KMConvertCSVSettingView: NSComboBoxDelegate {
-//    func comboBoxSelectionDidChange(_ notification: Notification) {
-//        if (tableSheetComboBox.isEqual(to: notification.object)) {
-//            if tableSheetComboBox.indexOfSelectedItem < 0 {
-//                selectedTableFormatIndex = 0
-//                return
-//            }
-//
-//            selectedTableFormatIndex = tableSheetComboBox.indexOfSelectedItem
-//        }
-//    }
-//}

+ 18 - 49
PDF Office/PDF Master/KMClass/Convert/View/KMConvertExcelSettingView.swift

@@ -20,12 +20,6 @@ class KMConvertExcelSettingView: KMConvertSettingView {
     
     @IBOutlet weak var ocrBox: NSBox!
     @IBOutlet weak var pageRangeBox: NSBox!
-    
-//    var sheetView: KMDesignSelect?
-//    var tableFormatView: KMDesignSelect?
-//    var allContentsVC: KMDesignButton?
-//    var onlyTableVC: KMDesignButton?
-//    var onlyTextVC: KMDesignButton?
 
     var selectedSettingIndex: Int = 0
     var selectedTableFormatIndex: Int = 0
@@ -130,7 +124,7 @@ class KMConvertExcelSettingView: KMConvertSettingView {
         
         sheetSelect_.selectItemAtIndex(0)
         sheetSelect_.properties.creatable = false
-        sheetSelect_.properties.text = ""
+        sheetSelect_.properties.text = NSLocalizedString("Create Sheet for each Page", comment: "")
         sheetSelect_.reloadData()
         
         self.tableFormatBox.contentView = self.tableFormatSelect_
@@ -149,7 +143,7 @@ class KMConvertExcelSettingView: KMConvertSettingView {
         
         tableFormatSelect_.selectItemAtIndex(0)
         tableFormatSelect_.properties.creatable = false
-        tableFormatSelect_.properties.text = ""
+        tableFormatSelect_.properties.text = NSLocalizedString("Create Sheet for each Table", comment: "")
         tableFormatSelect_.reloadData()
         
         self.tipView?.km_add_left_constraint(constant: 8)
@@ -162,8 +156,7 @@ class KMConvertExcelSettingView: KMConvertSettingView {
         super.initDefaultVlaue()
         
         self.excelSettingTitleLabel.stringValue = NSLocalizedString("Excel Worksheet Settings", comment: "")
-        self.excelSettingTitleLabel.textColor = NSColor.km_init(hex: "#616469")
-        self.excelSettingTitleLabel.font = .SFProTextSemiboldFont(12)
+        self.excelSettingTitleLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
         
         self.allContentsBox.fillColor = .clear
         self.onlyTableBox.fillColor = .clear
@@ -178,6 +171,9 @@ class KMConvertExcelSettingView: KMConvertSettingView {
         if (self.ocrItemView == nil) {
             self.ocrItemView = KMConvertOCRSettingItemView.createFromNib()
             self.ocrBox.contentView = self.ocrItemView
+            
+            self.ocrItemView?.titleLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
+            updateViewColor()
         }
         self.ocrItemView?.languageIndex = self.ocrLanuguageIndex
 
@@ -185,10 +181,17 @@ class KMConvertExcelSettingView: KMConvertSettingView {
             self.pageRangeItemView = KMConvertPageRangeSettingItemView.createFromNib()
             self.pageRangeBox.contentView = self.pageRangeItemView
             
-//            self.tipView?.km_add_left_constraint(constant: 8)
-//            self.tipView?.km_add_top_constraint(equalTo: self.pageRangeBox, attribute: .bottom, constant: -5)
-//            self.tipView?.km_add_right_constraint()
-//            self.tipView?.km_add_height_constraint(constant: 16+20+16)
+            self.pageRangeItemView?.titleLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
+            self.pageRangeItemView?.titleLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/2")
+            updateViewColor()
+        }
+    }
+    
+    override func updateViewColor() {
+        super.updateViewColor()
+        
+        KMMainThreadExecute {
+            self.excelSettingTitleLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/2")
         }
     }
         
@@ -209,18 +212,10 @@ class KMConvertExcelSettingView: KMConvertSettingView {
             self.sheetSelect_.properties.isDisabled = true
             self.sheetSelect_.reloadData()
             
-//#if VERSION_DMG
-//            let isExist = KMResourceDownload.manager().documentAIBundleIsExist()
-//            if isExist {
-//                self.ocrItemView?.checkVC?.state = .None
-//                self.ocrItemView?.checkVC?.enabled = false
-//                self.ocrItemView?.checkAction()
-//            }
-//#else
             self.ocrItemView?.checkVC?.state = .None
             self.ocrItemView?.checkVC?.enabled = false
             self.ocrItemView?.checkAction()
-//#endif
+            
             self.selectedSettingIndex = 1
         } else {
             if self.allContentRadio_.properties.checkboxType == .selected {
@@ -239,38 +234,12 @@ class KMConvertExcelSettingView: KMConvertSettingView {
                 self.selectedSettingIndex = 2
             }
             
-//#if VERSION_DMG
-//            let isExist = KMResourceDownload.manager().documentAIBundleIsExist()
-//            if isExist {
-//                self.ocrItemView?.checkVC?.enabled = true
-//                self.ocrItemView?.checkVC?.state = .Checked
-//                self.ocrItemView?.checkAction()
-//            }
-//#else
             self.ocrItemView?.checkVC?.enabled = true
-//            self.ocrItemView?.checkVC?.state = .Checked
             self.ocrItemView?.checkAction()
-//#endif
         }
     }
 }
 
-//extension KMConvertExcelSettingView: KMSelectPopButtonDelegate {
-//    func km_comboBoxSelectionDidChange(_ obj: KMDesignSelect) {
-//        if (obj.isEqual(to: self.tableFormatView)) {
-//            if let index = self.tableFormatView?.indexOfSelectedItem, index >= 0 {
-//                self.selectedTableFormatIndex = index
-//                return
-//            }
-//            self.selectedTableFormatIndex = 0
-//        } else if (obj.isEqual(to: self.sheetView)) {
-//            if let view = self.sheetView {
-//                self.selectedSheetIndex = max(view.indexOfSelectedItem, 0)
-//            }
-//        }
-//    }
-//}
-
 extension KMConvertExcelSettingView: ComponentSelectDelegate {
     func componentSelectDidSelect(view: ComponentSelect?, menuItemProperty: ComponentMenuitemProperty?) {
         guard let index = view?.indexOfSelect(), index >= 0 else {

+ 18 - 6
PDF Office/PDF Master/KMClass/Convert/View/KMConvertHtmlSettingView.swift

@@ -69,8 +69,8 @@ class KMConvertHtmlSettingView: KMConvertSettingView {
         pageSelect_.updateMenuItemsArr(menuItemArr)
         
         pageSelect_.selectItemAtIndex(0)
+        pageSelect_.properties.text = NSLocalizedString("Single Page", comment: "")
         pageSelect_.properties.creatable = false
-        pageSelect_.properties.text = ""
         pageSelect_.reloadData()
     }
     
@@ -78,8 +78,7 @@ class KMConvertHtmlSettingView: KMConvertSettingView {
         super.initDefaultVlaue()
         
         self.titleLabel.stringValue = NSLocalizedString("Page Options", comment: "")
-        self.titleLabel.textColor = NSColor.km_init(hex: "#616469")
-        self.titleLabel.font = .SFProTextRegularFont(12)
+        self.titleLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
         
         self.box.borderWidth = 0
         self.pageBox.borderWidth = 0
@@ -90,15 +89,28 @@ class KMConvertHtmlSettingView: KMConvertSettingView {
     override func viewDidMoveToWindow() {
         super.viewDidMoveToWindow()
         
-        if (self.ocrItemView == nil) {
-            self.ocrItemView = KMConvertOCRSettingItemView.createFromNib()
-            self.ocrBox.contentView = self.ocrItemView
+        if (ocrItemView == nil) {
+            ocrItemView = KMConvertOCRSettingItemView.createFromNib()
+            ocrBox.contentView = self.ocrItemView
+            
+            ocrItemView?.titleLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
+            updateViewColor()
         }
         self.ocrItemView?.languageIndex = self.ocrLanuguageIndex
 
         if (self.pageRangeItemView == nil) {
             self.pageRangeItemView = KMConvertPageRangeSettingItemView.createFromNib()
             self.pageRangeBox.contentView = self.pageRangeItemView
+            
+            pageRangeItemView?.titleLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
+        }
+    }
+    
+    override func updateViewColor() {
+        super.updateViewColor()
+        
+        KMMainThreadExecute {
+            self.titleLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/2")
         }
     }
 }

+ 4 - 5
PDF Office/PDF Master/KMClass/Convert/View/KMConvertHtmlSettingView.xib

@@ -51,24 +51,23 @@
                     </constraints>
                 </box>
                 <box boxType="custom" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="3bW-sv-LWh">
-                    <rect key="frame" x="0.0" y="112" width="480" height="90"/>
+                    <rect key="frame" x="0.0" y="90" width="480" height="112"/>
                     <view key="contentView" id="Bfk-8k-T9J">
-                        <rect key="frame" x="1" y="1" width="478" height="88"/>
+                        <rect key="frame" x="1" y="1" width="478" height="110"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                     </view>
                     <constraints>
-                        <constraint firstAttribute="height" constant="90" id="yxw-gG-iHj"/>
+                        <constraint firstAttribute="height" constant="112" id="yxw-gG-iHj"/>
                     </constraints>
                 </box>
                 <box boxType="custom" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="wxi-AZ-JyX">
-                    <rect key="frame" x="0.0" y="13" width="480" height="90"/>
+                    <rect key="frame" x="0.0" y="-9" width="480" height="90"/>
                     <view key="contentView" id="ZRe-jk-rWb">
                         <rect key="frame" x="1" y="1" width="478" height="88"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                     </view>
                     <constraints>
                         <constraint firstAttribute="height" constant="90" id="Hq8-h1-UG3"/>
-                        <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="60" id="LSG-VL-1go"/>
                     </constraints>
                 </box>
             </subviews>

+ 15 - 19
PDF Office/PDF Master/KMClass/Convert/View/KMConvertImageSettingView.swift

@@ -66,7 +66,7 @@ class KMConvertImageSettingView: KMConvertSettingView {
         
         formatSelect_.selectItemAtIndex(0)
         formatSelect_.properties.creatable = false
-        formatSelect_.properties.text = ""
+        formatSelect_.properties.text = "JPEG"
         formatSelect_.reloadData()
         
         self.dpiSelectBox.contentView = self.dpiSelect_
@@ -83,9 +83,9 @@ class KMConvertImageSettingView: KMConvertSettingView {
         
         dpiSelect_.updateMenuItemsArr(menuItemArr2)
         
-        dpiSelect_.selectItemAtIndex(0)
+        dpiSelect_.selectItemAtIndex(3)
         dpiSelect_.properties.creatable = false
-        dpiSelect_.properties.text = ""
+        dpiSelect_.properties.text = "150 dpi"
         dpiSelect_.reloadData()
         
         self.tipView?.km_add_left_constraint(constant: 8)
@@ -98,14 +98,8 @@ class KMConvertImageSettingView: KMConvertSettingView {
         self.formatBox.fillColor = .clear
         
         self.fileTypeTitleLabel.stringValue = NSLocalizedString("Format", comment: "")
-        self.fileTypeTitleLabel.textColor = NSColor.km_init(hex: "#616469")
-        self.fileTypeTitleLabel.font = .SFProTextSemiboldFont(12)
-        
+        self.fileTypeTitleLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
         self.formatBox.fillColor = .clear
-        
-        self.dpiTitleLabel.stringValue = NSLocalizedString("Resolution", comment: "")
-        self.dpiTitleLabel.textColor = NSColor.km_init(hex: "#616469")
-        self.dpiTitleLabel.font = .SFProTextBoldFont(12)
     }
     
     override func viewDidMoveToWindow() {
@@ -115,10 +109,8 @@ class KMConvertImageSettingView: KMConvertSettingView {
             self.pageRangeItemView = KMConvertPageRangeSettingItemView.createFromNib()
             self.pageRangeBox.contentView = self.pageRangeItemView
             
-//            self.tipView?.km_add_left_constraint(constant: 8)
-//            self.tipView?.km_add_top_constraint(equalTo: self.pageRangeBox, attribute: .bottom, constant: -5)
-//            self.tipView?.km_add_right_constraint()
-//            self.tipView?.km_add_height_constraint(constant: 16+20+16)
+            self.pageRangeItemView?.titleLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
+            self.updateViewColor()
         }
         self.pageRangeItemView?.pageCount = self.pageCount
     }
@@ -129,6 +121,15 @@ class KMConvertImageSettingView: KMConvertSettingView {
         }
         return ""
     }
+    
+    override func updateViewColor() {
+        super.updateViewColor()
+        
+        KMMainThreadExecute {
+            self.fileTypeTitleLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/2")
+            self.pageRangeItemView?.titleLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/2")
+        }
+    }
 }
 
 extension KMConvertImageSettingView: ComponentSelectDelegate {
@@ -139,11 +140,6 @@ extension KMConvertImageSettingView: ComponentSelectDelegate {
         
         if self.formatSelect_.isEqual(to: view) {
             self.selectedFormatIndex = index
-//            if (index == 0 || index == 2) { // JPEG & PNG
-//                self.dpiVC?.enabled = true
-//            } else {
-//                self.dpiVC?.enabled = false
-//            }
         } else if self.dpiSelect_.isEqual(to: view) {
             self.selectedResolutionIndex = max(index, 0)
         }

+ 13 - 13
PDF Office/PDF Master/KMClass/Convert/View/KMConvertJsonSettingView.xib

@@ -14,13 +14,13 @@
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
             <subviews>
                 <box boxType="custom" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="J9I-Z0-aBC">
-                    <rect key="frame" x="0.0" y="225" width="480" height="120"/>
+                    <rect key="frame" x="0.0" y="245" width="480" height="100"/>
                     <view key="contentView" id="hYH-NR-2a1">
-                        <rect key="frame" x="1" y="1" width="478" height="118"/>
+                        <rect key="frame" x="1" y="1" width="478" height="98"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Lnf-WO-SVE">
-                                <rect key="frame" x="14" y="94" width="37" height="16"/>
+                                <rect key="frame" x="14" y="74" width="37" height="16"/>
                                 <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="Kly-qe-zid">
                                     <font key="font" usesAppearanceFont="YES"/>
                                     <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -28,13 +28,13 @@
                                 </textFieldCell>
                             </textField>
                             <customView translatesAutoresizingMaskIntoConstraints="NO" id="TXI-RA-BC6" customClass="ComponentRadio" customModule="KMComponentLibrary">
-                                <rect key="frame" x="16" y="54" width="446" height="24"/>
+                                <rect key="frame" x="16" y="34" width="446" height="24"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="24" id="Vbg-NF-gUG"/>
                                 </constraints>
                             </customView>
                             <customView translatesAutoresizingMaskIntoConstraints="NO" id="cFV-cc-a3r" customClass="ComponentRadio" customModule="KMComponentLibrary">
-                                <rect key="frame" x="16" y="24" width="446" height="24"/>
+                                <rect key="frame" x="16" y="4" width="446" height="24"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="24" id="DvP-HQ-RdW"/>
                                 </constraints>
@@ -52,27 +52,27 @@
                         </constraints>
                     </view>
                     <constraints>
-                        <constraint firstAttribute="height" constant="120" id="vkf-e9-BxB"/>
+                        <constraint firstAttribute="height" constant="100" id="vkf-e9-BxB"/>
                     </constraints>
                 </box>
                 <box boxType="custom" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="ceM-RS-vem">
-                    <rect key="frame" x="0.0" y="105" width="480" height="120"/>
+                    <rect key="frame" x="0.0" y="133" width="480" height="112"/>
                     <view key="contentView" id="ahb-Hl-HyI">
-                        <rect key="frame" x="1" y="1" width="478" height="118"/>
+                        <rect key="frame" x="1" y="1" width="478" height="110"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                     </view>
                     <constraints>
-                        <constraint firstAttribute="height" constant="120" id="K5e-me-ZDa"/>
+                        <constraint firstAttribute="height" constant="112" id="K5e-me-ZDa"/>
                     </constraints>
                 </box>
                 <box boxType="custom" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="Fgg-r2-5Kw">
-                    <rect key="frame" x="0.0" y="36" width="480" height="60"/>
+                    <rect key="frame" x="0.0" y="53" width="480" height="72"/>
                     <view key="contentView" id="NZp-on-ku2">
-                        <rect key="frame" x="1" y="1" width="478" height="58"/>
+                        <rect key="frame" x="1" y="1" width="478" height="70"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                     </view>
                     <constraints>
-                        <constraint firstAttribute="height" constant="60" id="Mz7-sT-094"/>
+                        <constraint firstAttribute="height" constant="72" id="Mz7-sT-094"/>
                     </constraints>
                 </box>
             </subviews>
@@ -83,7 +83,7 @@
                 <constraint firstItem="J9I-Z0-aBC" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" id="RGg-Ki-1wY"/>
                 <constraint firstAttribute="trailing" secondItem="ceM-RS-vem" secondAttribute="trailing" id="Ssq-3o-msE"/>
                 <constraint firstAttribute="trailing" secondItem="Fgg-r2-5Kw" secondAttribute="trailing" id="ksh-Wd-L4e"/>
-                <constraint firstItem="Fgg-r2-5Kw" firstAttribute="top" secondItem="ceM-RS-vem" secondAttribute="bottom" constant="9" id="lFM-Pj-8fI"/>
+                <constraint firstItem="Fgg-r2-5Kw" firstAttribute="top" secondItem="ceM-RS-vem" secondAttribute="bottom" constant="8" id="lFM-Pj-8fI"/>
                 <constraint firstItem="ceM-RS-vem" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" id="ltZ-Er-rej"/>
                 <constraint firstAttribute="trailing" secondItem="J9I-Z0-aBC" secondAttribute="trailing" id="nxn-38-84Q"/>
             </constraints>

+ 2 - 35
PDF Office/PDF Master/KMClass/Convert/View/KMConvertOCRSettingItemView.swift

@@ -105,6 +105,7 @@ class KMConvertOCRSettingItemView: KMConvertBaseView {
         set {
             self._languageIndex = newValue
             
+            self.languageView_.properties.text = self.languages_.safe_element(for: newValue) as? String ?? ""
             self.languageView_.selectItemAtIndex(newValue)
         }
     }
@@ -130,7 +131,7 @@ class KMConvertOCRSettingItemView: KMConvertBaseView {
     override func initDefaultVlaue() {
         super.initDefaultVlaue()
         
-        self.titleLabel.stringValue = NSLocalizedString("OCR Settings", comment: "")
+        self.titleLabel.stringValue = NSLocalizedString("Text Recognition Settings", comment: "")
         self.titleLabel.textColor = NSColor.km_init(hex: "#616469")
         self.titleLabel.font = .SFProTextRegularFont(12)
         
@@ -156,41 +157,12 @@ class KMConvertOCRSettingItemView: KMConvertBaseView {
         languageView_.selectItemAtIndex(0)
         languageView_.properties.creatable = false
         languageView_.properties.text = ""
-//        KMNTools.parseIndexPathsSet(indexSets: selectionIndexPaths)
         languageView_.reloadData()
         
     }
     
     @objc func checkBoxAction(sender: NSButton) {
-#if VERSION_DMG
-//        let isExist = KMResourceDownloadManager.manager.documentAIBundleExists()
-//        if isExist || self._checkVC?.state == .Checked {
-//            if let state = self._checkVC?.state {
-//                self._checkVC?.state = state == .Checked ? .Norm : .Checked
-//            }
-            
-            self._checkAction()
-//        } else {
-//            let alert = NSAlert()
-//            alert.messageText = NSLocalizedString("Download OCR", comment: "")
-//            alert.informativeText = NSLocalizedString("Using OCR requires downloading additional resource pack. Do you want to continue?", comment: "")
-//            alert.addButton(withTitle: NSLocalizedString("Yes", comment: ""))
-//            alert.addButton(withTitle: NSLocalizedString("No", comment: ""))
-//            alert.beginSheetModal(for: self.window!) { [weak self] result in
-//                if (result == .alertFirstButtonReturn) { /// 取消
-//                    self?.downLoad()
-//                } else if result == .alertSecondButtonReturn {
-//                    return
-//                }
-//            }
-//        }
-#else
-        if let state = self._checkVC?.state {
-            self._checkVC?.state = state == .Checked ? .Norm : .Checked
-        }
-        
         self._checkAction()
-#endif
     }
     
 #if VERSION_DMG
@@ -231,11 +203,6 @@ class KMConvertOCRSettingItemView: KMConvertBaseView {
     }
     
     private func _checkAction() {
-//        guard let state = self._checkVC?.state else {
-//            return
-//        }
-//
-//        self._languageVC?.enabled = state == .Checked
         let state = self.checkView_.properties.checkboxType
         languageView_.properties.isDisabled = state != .selected
         languageView_.reloadData()

+ 11 - 4
PDF Office/PDF Master/KMClass/Convert/View/KMConvertPPTsSettingView.swift

@@ -5,6 +5,8 @@
 //  Created by tangchao on 2022/12/6.
 //
 
+import KMComponentLibrary
+
 class KMConvertPPTsSettingView: KMConvertSettingView {
     @IBOutlet weak var ocrBox: NSBox!
     @IBOutlet weak var pageRangeBox: NSBox!
@@ -24,6 +26,9 @@ class KMConvertPPTsSettingView: KMConvertSettingView {
         if (self.ocrItemView == nil) {
             self.ocrItemView = KMConvertOCRSettingItemView.createFromNib()
             self.ocrBox.contentView = self.ocrItemView
+            
+            self.ocrItemView?.titleLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
+            self.updateViewColor()
         }
         self.ocrItemView?.languageIndex = self.ocrLanuguageIndex
 
@@ -31,10 +36,12 @@ class KMConvertPPTsSettingView: KMConvertSettingView {
             self.pageRangeItemView = KMConvertPageRangeSettingItemView.createFromNib()
             self.pageRangeBox.contentView = self.pageRangeItemView
             
-//            self.tipView?.km_add_left_constraint(constant: 8)
-//            self.tipView?.km_add_top_constraint(equalTo: self.pageRangeBox, attribute: .bottom, constant: -5)
-//            self.tipView?.km_add_right_constraint()
-//            self.tipView?.km_add_height_constraint(constant: 16+20+16)
+            self.pageRangeItemView?.titleLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
+            self.updateViewColor()
         }
     }
+    
+    override func updateViewColor() {
+        super.updateViewColor()
+    }
 }

+ 0 - 4
PDF Office/PDF Master/KMClass/Convert/View/KMConvertPageRangeSettingItemView.swift

@@ -69,7 +69,6 @@ class KMConvertPageRangeSettingItemView: KMConvertBaseView {
         pageRangeView_.selectItemAtIndex(0)
         pageRangeView_.properties.creatable = false
         pageRangeView_.properties.text = menuItemArr.first?.text
-//        KMNTools.parseIndexPathsSet(indexSets: selectionIndexPaths)
         pageRangeView_.reloadData()
     }
     
@@ -151,9 +150,6 @@ extension KMConvertPageRangeSettingItemView: ComponentSelectDelegate {
             let pageRangeSelectIndex = pageRangeView_.indexOfSelect()
             var isEditIndex:Int = 4
 
-//            if(orgDocument?.pageCount ?? 0 <= 1) {
-//                isEditIndex = 1
-//            }
             if (pageRangeSelectIndex == isEditIndex) {
                 pageRangeView_.properties.text = ""
 

+ 0 - 9
PDF Office/PDF Master/KMClass/Convert/View/KMConvertSettingLimitTipView.swift

@@ -13,8 +13,6 @@ class KMConvertSettingLimitTipView: NSView {
     private var _textField = NSTextField(labelWithString: "")
     private var _funcBox = NSBox()
     
-//    private var _funcButtonVC: KMDesignButton?
-    
     var contentView: NSView {
         get {
             return self._contentView
@@ -44,13 +42,6 @@ class KMConvertSettingLimitTipView: NSView {
         self.contentView.addSubview(self._textField)
         self.contentView.addSubview(self._funcBox)
         
-//        self._funcButtonVC = KMDesignButton(withType: .Text)
-//        self._funcBox.contentView = self._funcButtonVC!.view
-//        self._funcButtonVC?.stringValue = NSLocalizedString("Unlock", comment: "")
-//        self._funcButtonVC?.button(type: .Text, size: .m)
-//        self._funcButtonVC?.target = self
-//        self._funcButtonVC?.action = #selector(funcAction)
-        
         self.contentView.km_add_inset_constraint()
         
         self._iconIv.km_add_leading_constraint(constant: 10)

+ 11 - 18
PDF Office/PDF Master/KMClass/Convert/View/KMConvertSettingView.swift

@@ -5,6 +5,8 @@
 //  Created by tangchao on 2023/5/9.
 //
 
+import KMComponentLibrary
+
 let kKMConvertLanugageSelectedIndex: String = "KMConvertLanugageSelectedIndex"
 
 typealias KMConvertSettingViewPageRangeDidChangeCallback = (_ pageRange: KMPageRange) -> Void
@@ -24,16 +26,6 @@ class KMConvertSettingView: KMConvertBaseView {
                 self.ocrLanuguageIndex = index
                 return
             }
-
-//            var language: COCRLanguage = .english
-//            if let _language = KMPDFConvertManager.defaultManager.ocrLanguage(appleLanguage: self._currentLanguage) {
-//                language = _language
-//            }
-//            if let index = KMPDFConvertManager.defaultManager.languages_asc.firstIndex(of: language) {
-//                self.ocrLanuguageIndex = index
-//            } else {
-//                self.ocrLanuguageIndex = 2
-//            }
         }
     }
     
@@ -115,18 +107,10 @@ class KMConvertSettingView: KMConvertBaseView {
     
     override func initSubViews() {
         super.initSubViews()
-        
-//        let tipView = KMConvertSettingLimitTipView()
-//        self.addSubview(tipView)
-//        self.tipView = tipView
     }
     
     override func layout() {
         super.layout()
-        
-//        let width = NSWidth(self.bounds)
-//        let height = NSHeight(self.bounds)
-//        self.tipView?.frame = NSMakeRect(0, 10, width, 16+20+16)
     }
     
     var pageCount = 0 {
@@ -150,4 +134,13 @@ class KMConvertSettingView: KMConvertBaseView {
         }
         return ""
     }
+    
+    override func updateViewColor() {
+        super.updateViewColor()
+        
+        KMMainThreadExecute {
+            self.ocrItemView?.titleLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/2")
+            self.pageRangeItemView?.titleLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/2")
+        }
+    }
 }

+ 7 - 30
PDF Office/PDF Master/KMClass/Convert/View/KMConvertWordSettingView.swift

@@ -17,9 +17,6 @@ class KMConvertWordSettingView: KMConvertSettingView {
     @IBOutlet weak var textOCRBox: NSBox!
     @IBOutlet weak var pageRangeBox: NSBox!
     
-    private var flowTextVC: KMDesignButton?
-    private var pageLayoutVC: KMDesignButton?
-    
     // 流排 0 框排 1
     var pageSettingSelectedIndex: Int = 0
     
@@ -48,28 +45,9 @@ class KMConvertWordSettingView: KMConvertSettingView {
     override func initSubViews() {
         super.initSubViews()
         
-//        self.flowTextVC = KMDesignButton.init(withType: .RadioButton)
-//        self.saveFlowTextRadio.addSubview(self.flowTextVC!.view)
-//        self.flowTextVC?.view.frame = self.saveFlowTextRadio.bounds
-//        self.flowTextVC?.view.autoresizingMask = [.width, .height]
-//        self.flowTextVC?.target = self
-//        self.flowTextVC?.action = #selector(saveFlowTextRadioAction)
-//        self.flowTextVC?.stringValue = NSLocalizedString("Retain Flowing Text", comment: "")
-//        self.flowTextVC?.checkbox_radio()
-        
-//        self.pageLayoutVC = KMDesignButton.init(withType: .RadioButton)
-//        self.savePageLayoutRadio.addSubview(self.pageLayoutVC!.view)
-//        self.pageLayoutVC?.view.frame = self.savePageLayoutRadio.bounds
-//        self.pageLayoutVC?.view.autoresizingMask = [.width, .height]
-//        self.pageLayoutVC?.target = self
-//        self.pageLayoutVC?.action = #selector(savePageLayoutRadioAction)
-//        self.pageLayoutVC?.stringValue = NSLocalizedString("Retain Page Layout", comment: "")
-//        self.pageLayoutVC?.checkbox_radio()
-        
         self.tipView?.km_add_left_constraint(constant: 8)
         self.tipView?.km_add_top_constraint(equalTo: self.pageRangeBox, attribute: .bottom, constant: -5)
         self.tipView?.km_add_right_constraint()
-//        self.tipView?.km_add_width_constraint(constant: 300)
         self.tipView?.km_add_height_constraint(constant: 16+20+16)
     }
     
@@ -77,8 +55,7 @@ class KMConvertWordSettingView: KMConvertSettingView {
         super.initDefaultVlaue()
         
         self.pageSettingTitleLabel.stringValue = NSLocalizedString("Layout Settings", comment: "")
-        self.pageSettingTitleLabel.textColor = NSColor.km_init(hex: "#616469")
-        self.pageSettingTitleLabel.font = .SFProTextRegularFont(12)
+        self.pageSettingTitleLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
     }
     
     override func viewDidMoveToWindow() {
@@ -87,12 +64,18 @@ class KMConvertWordSettingView: KMConvertSettingView {
         if (self.ocrItemView == nil) {
             self.ocrItemView = KMConvertOCRSettingItemView.createFromNib()
             self.textOCRBox.contentView = self.ocrItemView
+            
+            self.ocrItemView?.titleLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
+            self.ocrItemView?.titleLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/2")
         }
         self.ocrItemView?.languageIndex = self.ocrLanuguageIndex
 
         if (self.pageRangeItemView == nil) {
             self.pageRangeItemView = KMConvertPageRangeSettingItemView.createFromNib()
             self.pageRangeBox.contentView = self.pageRangeItemView
+            
+            self.pageRangeItemView?.titleLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
+            self.pageRangeItemView?.titleLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/2")
         }
     }
     
@@ -107,9 +90,6 @@ class KMConvertWordSettingView: KMConvertSettingView {
     // MARK: - Private Methods
     
     private func _flowTextAction() {
-        self.flowTextVC?.state = .Checked
-        self.pageLayoutVC?.state = .Norm
-
         self.saveFlowTextRadio.properties.checkboxType = .selected
         self.saveFlowTextRadio.reloadData()
         
@@ -120,9 +100,6 @@ class KMConvertWordSettingView: KMConvertSettingView {
     }
     
     private func _pageLayoutAction() {
-        self.pageLayoutVC?.state = .Checked
-        self.flowTextVC?.state = .Norm
-        
         self.savePageLayoutRadio.properties.checkboxType = .selected
         self.savePageLayoutRadio.reloadData()
         

+ 1 - 13
PDF Office/PDF Master/KMClass/Convert/Window/KMConvertExcelWindowController.swift

@@ -23,7 +23,7 @@ class KMConvertExcelWindowController: KMConvertBaseWindowController {
     override func initSubViews() {
         super.initSubViews()
         
-        self.refreshUI()
+        self.setupContentHeight(height: 391+20)
     }
     
     override func initSettingView() -> KMConvertSettingView? {
@@ -34,18 +34,6 @@ class KMConvertExcelWindowController: KMConvertBaseWindowController {
         return KMPDFConvertExcel()
     }
     
-    override func refreshUI() {
-        super.refreshUI()
-        
-        Task { @MainActor in
-            if await (KMLightMemberManager.manager.canPayFunction() == false) {
-                self.setupContentHeight(height: 391+20, animated: true)
-                return
-            }
-            self.setupContentHeight(height: 391)
-        }
-    }
-    
     override func convertModelAppendParams(convert: KMPDFConvert) {
         super.convertModelAppendParams(convert: convert)
         

+ 0 - 1
PDF Office/PDF Master/KMClass/Convert/Window/KMConvertHtmlWindowController.swift

@@ -44,5 +44,4 @@ class KMConvertHtmlWindowController: KMConvertBaseWindowController {
             }
         }
     }
-
 }

+ 12 - 1
PDF Office/PDF Master/KMClass/Convert/Window/KMConvertWordWindowController.swift

@@ -7,6 +7,7 @@
 
 import Cocoa
 import ComPDFKit_Conversion
+import KMComponentLibrary
 
 // 转档 Word 窗口
 class KMConvertWordWindowController: KMConvertBaseWindowController {
@@ -35,7 +36,6 @@ class KMConvertWordWindowController: KMConvertBaseWindowController {
         if let _convert = convert as? KMPDFConvertWord {
             let settingView: KMConvertWordSettingView = self.settingView as! KMConvertWordSettingView
             if (settingView.pageSettingSelectedIndex == 0) {
-//                convert.isAllInOneSheet = false
                 _convert.layoutOptions = .retainFlowingText
             } else {
                 /// 流排
@@ -43,4 +43,15 @@ class KMConvertWordWindowController: KMConvertBaseWindowController {
             }
         }
     }
+    
+    override func updateViewColor() {
+        super.updateViewColor()
+        
+        KMMainThreadExecute {
+            let settingV = self.settingView as? KMConvertWordSettingView
+            settingV?.pageSettingTitleLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/2")
+            
+            self.settingView?.updateViewColor()
+        }
+    }
 }

+ 15 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift

@@ -810,6 +810,21 @@ extension KMMainViewController: KMPDFToolbarControllerDelegate {
             let model = KMDocumentModel(url: listView.document.documentURL)
             winC.documentModel = model
             winC.own_beginSheetModal(for: self.view.window, completionHandler: nil)
+        } else if itemIdentifier == KMPDFToolbar_convert_HTML_Identifier {
+            let winC = KMConvertHtmlWindowController()
+            let model = KMDocumentModel(url: listView.document.documentURL)
+            winC.documentModel = model
+            winC.own_beginSheetModal(for: self.view.window, completionHandler: nil)
+        } else if itemIdentifier == KMPDFToolbar_convert_Json_Identifier {
+            let winC = KMConvertJsonWindowController()
+            let model = KMDocumentModel(url: listView.document.documentURL)
+            winC.documentModel = model
+            winC.own_beginSheetModal(for: view.window, completionHandler: nil)
+        } else if itemIdentifier == KMPDFToolbar_convert_image_Identifier {
+            let winC = KMConvertImageWindowController()
+            let model = KMDocumentModel(url: listView.document.documentURL)
+            winC.documentModel = model
+            winC.own_beginSheetModal(for: view.window, completionHandler: nil)
         } else if itemIdentifier == KMPDFToolbar_PageEdit_InsertFile_Identifier {
             pageEditViewController?.insertFromPDFAction()
         } else if itemIdentifier == KMPDFToolbar_PageEdit_InsertBlank_Identifier {

+ 6 - 0
PDF Office/PDF Master/KMClass/Tools/PDFPreview/KMNPreView.swift

@@ -33,6 +33,12 @@ class KMNPreView: NSView, NibLoadable {
     
     private var pagination_ = ComponentPagination()
     
+    var pdfView: CPDFView? {
+        get {
+            return self.pdfPreView.pdfView
+        }
+    }
+    
     var pageCount: Int {
         get {
             return Int(self.pdfPreView.pdfView.document?.pageCount ?? 0)