Browse Source

【2025】【转档】图片转PDF测试问题修复

lizhe 1 month ago
parent
commit
f3c7c80b40

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

@@ -123,10 +123,6 @@ class KMConvertOCRSettingItemView: KMConvertBaseView {
         super.awakeFromNib()
         
         self._checkAction()
-        
-#if VERSION_DMG
-        KMResourceDownloadManager.manager.downLoadOCRResource(window: self.window ?? NSWindow.currentWindow())
-#endif
     }
     
     override func initSubViews() {

+ 1 - 0
PDF Office/PDF Master/KMClass/NewBatch/View/KMBatchProcessingView/KMBatchProcessingView.swift

@@ -123,6 +123,7 @@ class KMBatchProcessingView: BaseXibView {
             self.lineView.isHidden = true
             self.deleteButton.properties.isDisabled = true
         }
+        self.deleteButton.reloadData()
         
         self.tableView.reloadData()
     }

+ 8 - 8
PDF Office/PDF Master/KMClass/NewBatch/View/KMBatchProcessingView/SelectedFiles/KMBatchSelectedFilesView.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="23504" 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="23504"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -21,10 +21,10 @@
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
             <subviews>
                 <customView translatesAutoresizingMaskIntoConstraints="NO" id="Ibq-pW-6fR">
-                    <rect key="frame" x="62" y="186" width="418" height="200"/>
+                    <rect key="frame" x="62" y="176" width="418" height="220"/>
                     <subviews>
                         <box boxType="custom" borderWidth="0.0" cornerRadius="4" translatesAutoresizingMaskIntoConstraints="NO" id="y5i-wB-Qel" customClass="KMBox" customModule="PDF_Reader_Pro" customModuleProvider="target">
-                            <rect key="frame" x="145" y="72" width="128" height="128"/>
+                            <rect key="frame" x="145" y="92" width="128" height="128"/>
                             <view key="contentView" id="aGb-yq-zUB">
                                 <rect key="frame" x="0.0" y="0.0" width="128" height="128"/>
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -35,7 +35,7 @@
                             </constraints>
                         </box>
                         <button translatesAutoresizingMaskIntoConstraints="NO" id="STJ-AT-hZ8">
-                            <rect key="frame" x="145" y="72" width="128" height="128"/>
+                            <rect key="frame" x="145" y="92" width="128" height="128"/>
                             <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="icon_empty_add_norm" imagePosition="only" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="6la-3i-h0B">
                                 <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                 <font key="font" metaFont="system"/>
@@ -49,7 +49,7 @@
                             </connections>
                         </button>
                         <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="sAL-Vd-XZZ">
-                            <rect key="frame" x="172" y="34" width="74" height="22"/>
+                            <rect key="frame" x="172" y="54" width="74" height="22"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="22" id="ZBC-vg-gHp"/>
                             </constraints>
@@ -60,7 +60,7 @@
                             </textFieldCell>
                         </textField>
                         <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="zH4-UK-9qG">
-                            <rect key="frame" x="39" y="-10" width="340" height="40"/>
+                            <rect key="frame" x="40" y="10" width="339" height="40"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="40" id="aPR-g2-3cm"/>
                             </constraints>
@@ -78,7 +78,7 @@
                         <constraint firstItem="y5i-wB-Qel" firstAttribute="centerX" secondItem="Ibq-pW-6fR" secondAttribute="centerX" id="Mjf-JJ-wUX"/>
                         <constraint firstItem="sAL-Vd-XZZ" firstAttribute="top" secondItem="y5i-wB-Qel" secondAttribute="bottom" constant="16" id="Ob1-Ag-hX5"/>
                         <constraint firstItem="STJ-AT-hZ8" firstAttribute="centerX" secondItem="Ibq-pW-6fR" secondAttribute="centerX" id="XRB-UH-BSM"/>
-                        <constraint firstAttribute="height" constant="200" id="dRa-O2-ZIE"/>
+                        <constraint firstAttribute="height" constant="220" id="dRa-O2-ZIE"/>
                         <constraint firstAttribute="width" constant="418" id="jX2-q2-wWm"/>
                         <constraint firstItem="y5i-wB-Qel" firstAttribute="top" secondItem="Ibq-pW-6fR" secondAttribute="top" id="sev-fp-PCp"/>
                         <constraint firstItem="zH4-UK-9qG" firstAttribute="top" secondItem="sAL-Vd-XZZ" secondAttribute="bottom" constant="4" id="zHD-xY-uIQ"/>

+ 12 - 1
PDF Office/PDF Master/KMClass/NewBatch/View/Setting/ImageToPDF/KMBatchImageToPDFView.swift

@@ -194,7 +194,12 @@ class KMBatchImageToPDFView: KMBatchSettingItemView {
         
         languageSelectButton.selectItemAtIndex(self.selectIndex)
         
-        
+        if self.filesData.count == 0 {
+            self.applyButton.properties.isDisabled = true
+        } else {
+            self.applyButton.properties.isDisabled = false
+        }
+        self.applyButton.reloadData()
     }
     
     func updateLanguages() {
@@ -344,6 +349,12 @@ extension KMBatchImageToPDFView {
     func OCRButtonAction() {
         self.model.isOCR = !self.model.isOCR
         self.reloadData()
+        
+        if self.model.isOCR {
+#if VERSION_DMG
+        KMResourceDownloadManager.manager.downLoadOCRResource(window: self.window ?? NSWindow.currentWindow())
+#endif
+        }
     }
     
     func OCRPlan1ButtonAction() {