Browse Source

【2025】【Edit】水印模块处理,Store版本无法运行问题处理

niehaoyu 4 months ago
parent
commit
c8f257e710
13 changed files with 202 additions and 87 deletions
  1. 8 8
      PDF Office/KMComponentLibrary/KMComponentLibrary/View/Input/ComponentTextarea/ComponentTextarea.xib
  2. 4 0
      PDF Office/KMComponentLibrary/KMComponentLibrary/View/Select/ComponentSelect.swift
  3. 12 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Watermark/icon_folder.imageset/Contents.json
  4. BIN
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Watermark/icon_folder.imageset/icon_folder.pdf
  5. 12 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Watermark/icon_wm_template_save.imageset/Contents.json
  6. BIN
      PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Watermark/icon_wm_template_save.imageset/icon_wm_template_save.pdf
  7. 0 8
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideViews/Watermark/Base/KMWatermarkAdjectiveBaseModel.swift
  8. 122 20
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideViews/Watermark/New/Views/KMNWatermarkPropertyController.swift
  9. 40 1
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideViews/Watermark/New/Views/KMNWatermarkPropertyController.xib
  10. 4 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideViews/Watermark/Tools/KMWatermarkModel.swift
  11. 0 1
      PDF Office/PDF Master/PDF_Reader_Pro Edition-Bridging-Header.h
  12. 0 1
      PDF Office/PDF Master/PDF_Reader_Pro-Bridging-Header.h
  13. 0 48
      PDF Office/PDF Reader Pro.xcodeproj/xcuserdata/kdanmobile.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

+ 8 - 8
PDF Office/KMComponentLibrary/KMComponentLibrary/View/Input/ComponentTextarea/ComponentTextarea.xib

@@ -21,24 +21,24 @@
             <rect key="frame" x="0.0" y="0.0" width="320" height="80"/>
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
             <subviews>
-                <box boxType="custom" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="tTI-hd-O6M">
+                <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="tTI-hd-O6M">
                     <rect key="frame" x="0.0" y="0.0" width="320" height="80"/>
                     <view key="contentView" id="gyk-8e-DjO">
-                        <rect key="frame" x="1" y="1" width="318" height="78"/>
+                        <rect key="frame" x="0.0" y="0.0" width="320" height="80"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <scrollView borderType="none" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" hasVerticalScroller="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Tm5-i8-1qu">
-                                <rect key="frame" x="4" y="24" width="310" height="46"/>
+                                <rect key="frame" x="4" y="24" width="312" height="48"/>
                                 <clipView key="contentView" drawsBackground="NO" id="47F-UF-VwW">
-                                    <rect key="frame" x="0.0" y="0.0" width="310" height="46"/>
+                                    <rect key="frame" x="0.0" y="0.0" width="312" height="48"/>
                                     <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                     <subviews>
                                         <textView wantsLayer="YES" drawsBackground="NO" importsGraphics="NO" richText="NO" verticallyResizable="YES" spellingCorrection="YES" smartInsertDelete="YES" id="6ap-L2-IZG" customClass="ComponentTextView" customModule="KMComponentLibrary" customModuleProvider="target">
-                                            <rect key="frame" x="0.0" y="0.0" width="310" height="46"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="312" height="48"/>
                                             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                             <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
                                             <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                            <size key="minSize" width="310" height="46"/>
+                                            <size key="minSize" width="312" height="48"/>
                                             <size key="maxSize" width="385" height="10000000"/>
                                             <color key="insertionPointColor" name="textInsertionPointColor" catalog="System" colorSpace="catalog"/>
                                         </textView>
@@ -54,7 +54,7 @@
                                 </scroller>
                             </scrollView>
                             <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="BBq-kb-UpR">
-                                <rect key="frame" x="6" y="54" width="37" height="16"/>
+                                <rect key="frame" x="6" y="56" width="37" height="16"/>
                                 <textFieldCell key="cell" lineBreakMode="clipping" placeholderString="Label" id="aTc-ny-qsk">
                                     <font key="font" metaFont="system"/>
                                     <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -62,7 +62,7 @@
                                 </textFieldCell>
                             </textField>
                             <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="CsS-4i-87N">
-                                <rect key="frame" x="279" y="8" width="33" height="16"/>
+                                <rect key="frame" x="281" y="8" width="33" height="16"/>
                                 <textFieldCell key="cell" lineBreakMode="clipping" title="0/50" id="Y4G-Z9-Qd2">
                                     <font key="font" usesAppearanceFont="YES"/>
                                     <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>

+ 4 - 0
PDF Office/KMComponentLibrary/KMComponentLibrary/View/Select/ComponentSelect.swift

@@ -230,6 +230,10 @@ public class ComponentSelect: ComponentBaseXibView {
             }
         }
         
+        if viewHeight > 448 {
+            viewHeight = 448
+        }
+        
         var point = convert(contendBox.frame.origin, to: nil)
         point.y -= viewHeight
         

+ 12 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Watermark/icon_folder.imageset/Contents.json

@@ -0,0 +1,12 @@
+{
+  "images" : [
+    {
+      "filename" : "icon_folder.pdf",
+      "idiom" : "universal"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Watermark/icon_folder.imageset/icon_folder.pdf


+ 12 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Watermark/icon_wm_template_save.imageset/Contents.json

@@ -0,0 +1,12 @@
+{
+  "images" : [
+    {
+      "filename" : "icon_wm_template_save.pdf",
+      "idiom" : "universal"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
PDF Office/PDF Master/KMClass/KMPDFViewController/PDFImages.xcassets/Watermark/icon_wm_template_save.imageset/icon_wm_template_save.pdf


+ 0 - 8
PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideViews/Watermark/Base/KMWatermarkAdjectiveBaseModel.swift

@@ -30,13 +30,6 @@ enum KMWatermarkAdjectiveText {
     var textColor: KMWatermarkAdjectiveText!
     var tempTextColor: NSColor = NSColor.black {
         didSet {
-//            var red: CGFloat = 0.0
-//            var greed: CGFloat = 0.0
-//            var blue: CGFloat = 0.0
-//            NSColor * oldStrokeColor = [config.oldStrokeColor colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
-//            [oldStrokeColor getRed:&red green:&green blue:&blue alpha:NULL];
-//            oldStrokeColor = [NSColor colorWithRed:red green:green blue:blue alpha:config.oldStrokeOpacity];
-            
             var red: CGFloat = 0
             var green: CGFloat = 0
             var blue: CGFloat = 0
@@ -44,7 +37,6 @@ enum KMWatermarkAdjectiveText {
 
             let oldStrokeColor = tempTextColor.usingColorSpace(NSColorSpace.deviceRGB)
             oldStrokeColor?.getRed(&red, green: &green, blue: &blue, alpha: &alpha)
-//            let newStrokeColor = NSColor(red: red, green: green, blue: blue, alpha: alpha)
             
             textColor = KMWatermarkAdjectiveText.color(red: red, green: green, blue: blue, alpha: alpha)
         }

+ 122 - 20
PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideViews/Watermark/New/Views/KMNWatermarkPropertyController.swift

@@ -9,7 +9,7 @@ import Cocoa
 import KMComponentLibrary
 
 class KMNWatermarkPropertyController: NSViewController {
-
+    
     @IBOutlet var contendView: NSView!
     @IBOutlet var titleLabel: NSTextField!
     @IBOutlet var templateButton: ComponentButton!
@@ -17,23 +17,28 @@ class KMNWatermarkPropertyController: NSViewController {
     @IBOutlet var typeTabs: ComponentTabs!
     
     //Text
+    @IBOutlet var textBGView: NSView!
+    @IBOutlet var text_textareaView: ComponentTextarea!
     @IBOutlet var fontNameSelect: ComponentSelect!
     @IBOutlet var fontStyleSelect: ComponentSelect!
     @IBOutlet var fontSizeSelect: ComponentSelect!
     @IBOutlet var fontColorGroup: ComponentCColorGroup!
-    
-    
+     
     //File
-    
-    
+    @IBOutlet var fileBGView: NSView!
+    @IBOutlet var fileInputView: ComponentInput!
+    @IBOutlet var fileInputAddonView: ComponentInputAddon!
     
     //Appearance
     @IBOutlet var appearanceBGView: NSView!
     @IBOutlet var appearanceLabel: NSTextField!
+    @IBOutlet var appearance_RotateSelect: ComponentSelect!
+    @IBOutlet var appearance_OpacitySelect: ComponentSelect!
     @IBOutlet var appearanceScaleCheckbox: ComponentCheckBox!
     @IBOutlet var appearanceScaleSelect: ComponentSelect!
     @IBOutlet var appearanceTopPageRadio: ComponentRadio!
     @IBOutlet var appearanceBottomPageRadio: ComponentRadio!
+    @IBOutlet var appearanceBGTopConst: NSLayoutConstraint!
     
     //Position
     @IBOutlet var positionBGView: NSView!
@@ -47,10 +52,17 @@ class KMNWatermarkPropertyController: NSViewController {
     @IBOutlet var positionTileVertImage: NSImageView!
     @IBOutlet var positionTileHoriInput: ComponentInputNumber!
     @IBOutlet var positionTileVertInput: ComponentInputNumber!
+    
+    //Save
+    @IBOutlet var saveTemplateBGView: NSView!
+    @IBOutlet var saveButton: ComponentButton!
      
     private var textTabProperty = ComponentTabsProperty(tabsType: .underline_Fill, state: .normal, showIcon: false, title: KMLocalizedString("Text"))
     private var fileTabProperty = ComponentTabsProperty(tabsType: .underline_Fill, state: .normal, showIcon: false, title: KMLocalizedString("File"))
     
+    private var familyNames = CPDFFont.familyNames
+    
+    
     var watermarkModel: KMWatermarkModel = KMWatermarkModel()
     
     override func viewDidLoad() {
@@ -58,7 +70,7 @@ class KMNWatermarkPropertyController: NSViewController {
         // Do view setup here.
         
         setupProperty()
-     
+        
         reloadData()
     }
     
@@ -69,14 +81,15 @@ class KMNWatermarkPropertyController: NSViewController {
         titleLabel.stringValue = KMLocalizedString("Add Watermark")
         titleLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/2")
         titleLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-m-bold")
-
+        
         templateButton.properties = ComponentButtonProperty(type: .text_gray, size: .xxs, onlyIcon: true, icon: NSImage(named: "icon_wm_template"))
         
         typeTabs.updateItemProperty([textTabProperty, fileTabProperty])
+        typeTabs.delegate = self
         
         
         //Text
-        let familyNames = CPDFFont.familyNames
+        text_textareaView.properties = ComponentTextareaProperty(size: .s, placeholderString: KMLocalizedString("Please enter..."), totalCount: -1, text: "")
         
         fontNameSelect.properties = ComponentSelectProperties(size: .s,
                                                               state: .normal,
@@ -88,21 +101,47 @@ class KMNWatermarkPropertyController: NSViewController {
             menuItemArr.append(item)
         }
         fontNameSelect.updateMenuItemsArr(menuItemArr)
+        fontNameSelect.selectItemAtIndex(0)
+        
+        fontStyleSelect.properties = ComponentSelectProperties(size: .s,
+                                                               state: .normal,
+                                                               text: "")
+        
         
+        fontSizeSelect.properties = ComponentSelectProperties(size: .s,
+                                                              state: .normal,
+                                                              text: "")
         
         //File
+        fileInputView.properties = ComponentInputProperty(size: .s,
+                                                          state:.pressed ,
+                                                          placeholder: "",
+                                                          text: "Select Source File...",
+                                                          creatable: false)
+        fileInputView.properties.propertyInfo.cornerRadius_topLeft = 0
+        fileInputView.properties.propertyInfo.cornerRadius_topRight = 0
+        fileInputView.properties.propertyInfo.cornerRadius_bottomLeft = 0
+        fileInputView.properties.propertyInfo.cornerRadius_bottomRight = 0
+        fileInputView.reloadData()
+        
+        fileInputAddonView.properties = ComponentInputAddonProperty(size: .s,
+                                                                    state: .normal,
+                                                                    addOnBefore: false,
+                                                                    onlyRead: false,
+                                                                    addonType: .imageWithColor,
+                                                                    iconImage: NSImage(named: "icon_folder"))
+        
         
-
         //Appearance
         appearanceLabel.stringValue = KMLocalizedString("Appearance")
         appearanceLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/2")
         appearanceLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
-
+        
         appearanceScaleCheckbox.properties = ComponentCheckBoxProperty(size: .s, text: KMLocalizedString("Scale relative to target page"), checkboxType: .normal)
         
         appearanceTopPageRadio.properties = ComponentCheckBoxProperty(size: .s, text: KMLocalizedString("At the top of the page"), checkboxType: .normal)
         appearanceBottomPageRadio.properties = ComponentCheckBoxProperty(size: .s, text: KMLocalizedString("At the bottom of the page"), checkboxType: .normal)
-
+        
         let colorAProperty = ComponentCColorProperty(colorType: .color, state: .normal, isCustom: false, color: NSColor(red: 205/255, green: 205/255, blue: 205/255, alpha: 1))
         let colorBProperty = ComponentCColorProperty(colorType: .color, state: .normal, isCustom: false, color: NSColor(red: 255/255, green: 173/255, blue: 173/255, alpha: 1))
         let colorCProperty = ComponentCColorProperty(colorType: .color, state: .normal, isCustom: false, color: NSColor(red: 146/255, green: 222/255, blue: 255/255, alpha: 1))
@@ -112,24 +151,36 @@ class KMNWatermarkPropertyController: NSViewController {
         fontColorGroup.setUpWithColorPropertys([colorAProperty, colorBProperty, colorCProperty, colorDProperty], customItemProperty: colorEProperty)
         
         
+        appearanceScaleSelect.properties = ComponentSelectProperties(size: .s,
+                                                              state: .normal,
+                                                              text: "")
+        
+        appearance_RotateSelect.properties = ComponentSelectProperties(size: .s,
+                                                              state: .normal,
+                                                              text: "")
+        
+        appearance_OpacitySelect.properties = ComponentSelectProperties(size: .s,
+                                                              state: .normal,
+                                                              text: "")
+ 
         //Position
         positionLabel.stringValue = KMLocalizedString("Position (mm)")
         positionLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/2")
         positionLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
-
+        
         positionItemView.properties = ComponentCPositionProperty(rowCount: 3, columnCount: 3, dash: false, selRow: 1, selColumn: 1)
         
         positionXInput.properties = ComponentInputNumberProperty(alignment: .left,
-                                                                        size: .s,
-                                                                        minSize: -1000,
-                                                                        maxSize: 1000,
-                                                                        text: "0")
+                                                                 size: .s,
+                                                                 minSize: -1000,
+                                                                 maxSize: 1000,
+                                                                 text: "0")
         
         positionYInput.properties = ComponentInputNumberProperty(alignment: .left,
-                                                                        size: .s,
-                                                                        minSize: -1000,
-                                                                        maxSize: 1000,
-                                                                        text: "0")
+                                                                 size: .s,
+                                                                 minSize: -1000,
+                                                                 maxSize: 1000,
+                                                                 text: "0")
         
         positionTileCheckbox.properties = ComponentCheckBoxProperty(size: .s, text: KMLocalizedString("Tile"), checkboxType: .normal)
         positionTileCheckbox.setTarget(self, action: #selector(checkBoxClicked(_:)))
@@ -146,10 +197,46 @@ class KMNWatermarkPropertyController: NSViewController {
                                                                         text: "0")
         
         
+        //Save
+        saveTemplateBGView.wantsLayer = true
+        saveTemplateBGView.layer?.backgroundColor = ComponentLibrary.shared.getComponentColorFromKey("colorBg/layout-middle").cgColor
+        saveButton.properties = ComponentButtonProperty(type: .default_tertiary, size: .m, showLeftIcon: true, buttonText: KMLocalizedString("Save as Template"), icon: NSImage(named: "icon_wm_template_save"))
+        saveButton.setTarget(self, action: #selector(saveButtonClicked(_:)))
+        
     }
     
     func reloadData() {
         
+        fileBGView.isHidden = true
+        textBGView.isHidden = true
+        if watermarkModel.type == 0 {
+            textBGView.isHidden = false
+            appearanceBGTopConst.constant = 200
+        } else if watermarkModel.type == 1 {
+            fileBGView.isHidden = false
+            appearanceBGTopConst.constant = 48
+        }
+        
+        //Text
+        if let familyName = familyNames.first {
+            let fontNames = CPDFFont.fontNames(forFamilyName: "Helvetica")
+            
+            var menuItemArr: [ComponentMenuitemProperty] = []
+            for string in fontNames {
+                let item = ComponentMenuitemProperty(type: .normal, text: string, identifier: string)
+                menuItemArr.append(item)
+            }
+            fontStyleSelect.updateMenuItemsArr(menuItemArr)
+            
+        }
+        
+        
+        //File
+        
+        
+        
+        //Appearance
+        
         
         
         //Position
@@ -179,4 +266,19 @@ class KMNWatermarkPropertyController: NSViewController {
         reloadData()
     }
     
+    @objc func saveButtonClicked(_ sender: ComponentButton) {
+        
+    }
+    
+}
+
+extension KMNWatermarkPropertyController: ComponentTabsDelegate {
+    func componentTabsDidSelected(_ view: ComponentTabs, _ property: ComponentTabsProperty) {
+        if property == textTabProperty {
+            watermarkModel.type = 0
+        } else if property == fileTabProperty {
+            watermarkModel.type = 1
+        }
+        reloadData()
+    }
 }

+ 40 - 1
PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideViews/Watermark/New/Views/KMNWatermarkPropertyController.xib

@@ -8,13 +8,19 @@
     <objects>
         <customObject id="-2" userLabel="File's Owner" customClass="KMNWatermarkPropertyController" customModule="PDF_Reader_Pro" customModuleProvider="target">
             <connections>
+                <outlet property="appearanceBGTopConst" destination="bvk-BP-OWQ" id="ZaQ-Nb-eUV"/>
                 <outlet property="appearanceBGView" destination="N3S-NU-dUK" id="55y-rO-URC"/>
                 <outlet property="appearanceBottomPageRadio" destination="gcz-v6-Is9" id="t8W-Rr-Ii2"/>
                 <outlet property="appearanceLabel" destination="Zph-wi-6i3" id="9qx-Kt-bif"/>
                 <outlet property="appearanceScaleCheckbox" destination="Gff-0V-jaD" id="yed-lH-ruw"/>
                 <outlet property="appearanceScaleSelect" destination="i03-pW-pQc" id="tYp-YD-zfS"/>
                 <outlet property="appearanceTopPageRadio" destination="wOL-XJ-9hB" id="pEx-Gt-18s"/>
+                <outlet property="appearance_OpacitySelect" destination="76y-LT-L3w" id="sl9-Yx-Ct4"/>
+                <outlet property="appearance_RotateSelect" destination="uWb-rG-ugv" id="1Oe-KP-wnq"/>
                 <outlet property="contendView" destination="WSD-S7-Nbi" id="j01-hS-70A"/>
+                <outlet property="fileBGView" destination="cky-Rj-cPG" id="h2i-7o-QhW"/>
+                <outlet property="fileInputAddonView" destination="rBq-tq-cdo" id="07E-Yf-sab"/>
+                <outlet property="fileInputView" destination="miK-bJ-Wye" id="Ggd-9f-SjG"/>
                 <outlet property="fontColorGroup" destination="vsn-3z-gA0" id="FxX-9V-Tqn"/>
                 <outlet property="fontNameSelect" destination="YYQ-vV-Qfw" id="Q27-LU-02w"/>
                 <outlet property="fontSizeSelect" destination="dlH-9Z-5E0" id="Mhe-CQ-JDO"/>
@@ -29,7 +35,11 @@
                 <outlet property="positionTileVertInput" destination="HhP-72-8ZC" id="ry1-P4-PaB"/>
                 <outlet property="positionXInput" destination="wjG-88-KWP" id="leY-Nf-1LY"/>
                 <outlet property="positionYInput" destination="58l-A1-2Kk" id="BHh-mu-b9b"/>
+                <outlet property="saveButton" destination="lPB-Zu-EtY" id="9nx-Ne-TFz"/>
+                <outlet property="saveTemplateBGView" destination="dTL-It-CfQ" id="6Ck-ec-6aM"/>
                 <outlet property="templateButton" destination="WMO-rB-mGc" id="XBD-O9-HlP"/>
+                <outlet property="textBGView" destination="l8C-Vk-idO" id="bbH-9A-pV4"/>
+                <outlet property="text_textareaView" destination="wJd-KI-caZ" id="Lnu-Rh-fNi"/>
                 <outlet property="titleLabel" destination="jkG-Uv-4gv" id="0Ao-BB-7UZ"/>
                 <outlet property="typeTabs" destination="3ld-PC-yBt" id="3ZC-KK-o1W"/>
                 <outlet property="view" destination="Hz6-mo-xeY" id="0bl-1N-x8E"/>
@@ -103,7 +113,7 @@
                                 <customView translatesAutoresizingMaskIntoConstraints="NO" id="l8C-Vk-idO">
                                     <rect key="frame" x="21" y="482" width="232" height="184"/>
                                     <subviews>
-                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="wJd-KI-caZ">
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="wJd-KI-caZ" customClass="ComponentTextarea" customModule="KMComponentLibrary">
                                             <rect key="frame" x="0.0" y="120" width="232" height="64"/>
                                             <constraints>
                                                 <constraint firstAttribute="height" constant="64" id="WDx-tX-R5I"/>
@@ -154,6 +164,33 @@
                                         <constraint firstAttribute="trailing" secondItem="YYQ-vV-Qfw" secondAttribute="trailing" id="w6Y-2h-wG1"/>
                                     </constraints>
                                 </customView>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="cky-Rj-cPG">
+                                    <rect key="frame" x="21" y="634" width="232" height="32"/>
+                                    <subviews>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="miK-bJ-Wye" customClass="ComponentInput" customModule="KMComponentLibrary">
+                                            <rect key="frame" x="0.0" y="0.0" width="199" height="32"/>
+                                            <constraints>
+                                                <constraint firstAttribute="width" constant="199" id="bhN-eC-Eqv"/>
+                                                <constraint firstAttribute="height" constant="32" id="tTJ-La-RCq"/>
+                                            </constraints>
+                                        </customView>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="rBq-tq-cdo" customClass="ComponentInputAddon" customModule="KMComponentLibrary">
+                                            <rect key="frame" x="200" y="0.0" width="32" height="32"/>
+                                            <constraints>
+                                                <constraint firstAttribute="height" constant="32" id="4eG-GC-VNw"/>
+                                                <constraint firstAttribute="width" constant="32" id="ipa-yI-sXe"/>
+                                            </constraints>
+                                        </customView>
+                                    </subviews>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="32" id="Cv6-3M-8jQ"/>
+                                        <constraint firstItem="miK-bJ-Wye" firstAttribute="leading" secondItem="cky-Rj-cPG" secondAttribute="leading" id="Ffw-Up-6Ol"/>
+                                        <constraint firstItem="miK-bJ-Wye" firstAttribute="centerY" secondItem="cky-Rj-cPG" secondAttribute="centerY" id="Ix5-yq-ebe"/>
+                                        <constraint firstAttribute="width" constant="232" id="QAy-f0-ErH"/>
+                                        <constraint firstAttribute="trailing" secondItem="rBq-tq-cdo" secondAttribute="trailing" id="gKE-03-eh9"/>
+                                        <constraint firstItem="rBq-tq-cdo" firstAttribute="centerY" secondItem="cky-Rj-cPG" secondAttribute="centerY" id="ife-vH-22r"/>
+                                    </constraints>
+                                </customView>
                                 <customView translatesAutoresizingMaskIntoConstraints="NO" id="N3S-NU-dUK">
                                     <rect key="frame" x="21" y="242" width="232" height="224"/>
                                     <subviews>
@@ -407,12 +444,14 @@
                             </subviews>
                             <constraints>
                                 <constraint firstItem="l8C-Vk-idO" firstAttribute="centerX" secondItem="0BT-YI-uuZ" secondAttribute="centerX" id="F7K-z5-caA"/>
+                                <constraint firstItem="cky-Rj-cPG" firstAttribute="top" secondItem="0BT-YI-uuZ" secondAttribute="top" id="MyY-Nj-q6F"/>
                                 <constraint firstItem="nTM-xd-HIx" firstAttribute="centerX" secondItem="0BT-YI-uuZ" secondAttribute="centerX" id="bvC-pX-cza"/>
                                 <constraint firstItem="N3S-NU-dUK" firstAttribute="top" secondItem="0BT-YI-uuZ" secondAttribute="top" constant="200" id="bvk-BP-OWQ"/>
                                 <constraint firstItem="l8C-Vk-idO" firstAttribute="top" secondItem="0BT-YI-uuZ" secondAttribute="top" id="cl5-ia-LSH"/>
                                 <constraint firstItem="N3S-NU-dUK" firstAttribute="centerX" secondItem="0BT-YI-uuZ" secondAttribute="centerX" id="e6U-iS-g2w"/>
                                 <constraint firstItem="nTM-xd-HIx" firstAttribute="top" secondItem="N3S-NU-dUK" secondAttribute="bottom" constant="16" id="gCW-v1-Bqm"/>
                                 <constraint firstAttribute="height" constant="666" id="hYg-29-sBG"/>
+                                <constraint firstItem="cky-Rj-cPG" firstAttribute="centerX" secondItem="0BT-YI-uuZ" secondAttribute="centerX" id="rwG-C9-o2d"/>
                             </constraints>
                         </customView>
                         <customView translatesAutoresizingMaskIntoConstraints="NO" id="dTL-It-CfQ">

+ 4 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideViews/Watermark/Tools/KMWatermarkModel.swift

@@ -8,6 +8,9 @@
 import Cocoa
 
 @objcMembers class KMWatermarkModel: KMWatermarkAdjectiveBaseModel {
+    //0:Text, 1:File
+    var type: Int = 0
+    
     var text: String = NSLocalizedString("Watermark", comment: "")
     var image: NSImage!
     var imagePath: String = ""
@@ -46,6 +49,7 @@ import Cocoa
     
     override func copy() -> Any {
         let model = KMWatermarkModel()
+        model.type = self.type
         model.text = self.text
         model.image = self.image
         model.imagePath = self.imagePath

+ 0 - 1
PDF Office/PDF Master/PDF_Reader_Pro Edition-Bridging-Header.h

@@ -33,7 +33,6 @@
 #import "KMCloudServer.h"
 #import <ObjectiveDropboxOfficial/ObjectiveDropboxOfficial.h>
 #import "KMCloudOperation.h"
-#import "KMSecondaryViewController.h"
 //
 #import "KMPrintAccessoryController_OC.h"
 

+ 0 - 1
PDF Office/PDF Master/PDF_Reader_Pro-Bridging-Header.h

@@ -33,7 +33,6 @@
 #import "KMCloudServer.h"
 #import <ObjectiveDropboxOfficial/ObjectiveDropboxOfficial.h>
 #import "KMCloudOperation.h"
-#import "KMSecondaryViewController.h"
 //
 #import "KMPrintAccessoryController_OC.h"
 

+ 0 - 48
PDF Office/PDF Reader Pro.xcodeproj/xcuserdata/kdanmobile.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -1868,54 +1868,6 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "D45FCAB1-E35F-45CE-9CD2-185A46AD279B"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KMComponentLibrary/KMComponentLibrary/View/Input/ComponentInputAddon/ComponentInputAddon.swift"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "219"
-            endingLineNumber = "219"
-            landmarkName = "mouseEntered(with:)"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "CFDD79E9-E473-4134-BDA2-BBBEDEFC23E2"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KMComponentLibrary/KMComponentLibrary/View/Input/ComponentInputAddon/ComponentInputAddon.swift"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "245"
-            endingLineNumber = "245"
-            landmarkName = "mouseDown(with:)"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "84D3A772-1F2B-4460-B416-D8BD58D042AB"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KMComponentLibrary/KMComponentLibrary/View/Input/ComponentTextarea/ComponentTextarea.swift"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "187"
-            endingLineNumber = "187"
-            landmarkName = "mouseDown(with:)"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent