Bladeren bron

【综合】签名数据兼容

tangchao 1 jaar geleden
bovenliggende
commit
ef2302d08d

+ 2 - 0
PDF Office/PDF Master/Class/Common/DataManager/KMDataManager.swift

@@ -9,6 +9,8 @@ import Cocoa
 
 // 数据持久化 【UserDefault、本地存储、数据库】
 
+let kDocumentDirectory = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first!
+
 class KMDataManager: NSObject {
     // 单例
     static let `default` = KMDataManager()

+ 54 - 0
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/Signature/KMSignature.swift

@@ -30,6 +30,60 @@ import Cocoa
     
     var signatureType: KMPDFSignatureType = .text
     var isSelect: Bool = false
+    
+    override class func className() -> String {
+        return "KMSignature"
+    }
+    
+    override class func classForKeyedArchiver() -> AnyClass? {
+        return NSClassFromString("KMSignature")
+    }
+    
+    override class func classForCoder() -> AnyClass {
+        return NSClassFromString("KMSignature")!
+    }
+    
+    override class func classForArchiver() -> AnyClass? {
+        return NSClassFromString("KMSignature")
+    }
+    
+   // override class func classForKeyedUnarchiver() -> AnyClass {
+//        if let cls = objc_allocateClassPair(NSObject.self, "KMSignature", 0) {
+//            objc_registerClassPair(cls)
+////            let sel = #selector(required init(coder: NSCoder))
+//            let sel = NSSelectorFromString("initWithCoder:")
+//            let method = class_getInstanceMethod(KMSignature.self, sel)
+//            class_addMethod(cls, sel, method_getImplementation(method!), method_getTypeEncoding(method!))
+//
+//            let sel2 = NSSelectorFromString("encodeWithCoder:")
+//            let method2 = class_getInstanceMethod(KMSignature.self, sel2)
+//            class_addMethod(cls, sel2, method_getImplementation(method2!), method_getTypeEncoding(method2!))
+//
+//            return cls
+//        }
+//        return NSClassFromString("KMSignature")!
+        //return self.KMSignatureOCClass
+    //}
+    
+    class var KMSignatureOCClass: AnyClass {
+        get {
+            if let cls = objc_allocateClassPair(NSObject.self, "KMSignature", 0) {
+                objc_registerClassPair(cls)
+    //            let sel = #selector(required init(coder: NSCoder))
+                let sel = NSSelectorFromString("initWithCoder:")
+                let method = class_getInstanceMethod(KMSignature.self, sel)
+                class_addMethod(cls, sel, method_getImplementation(method!), method_getTypeEncoding(method!))
+                
+                let sel2 = NSSelectorFromString("encodeWithCoder:")
+                let method2 = class_getInstanceMethod(KMSignature.self, sel2)
+                class_addMethod(cls, sel2, method_getImplementation(method2!), method_getTypeEncoding(method2!))
+                
+                return cls
+            }
+            return NSClassFromString("KMSignature")!
+//            return KMSignature.self
+        }
+    }
 
     override init() {
         super.init()

+ 2 - 2
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/Signature/KMSignatureManager.swift

@@ -17,7 +17,7 @@ import Foundation
     @objc func loadAllSignatureList() {
         signatureList.removeAll()
         if let fileDirectory = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first {
-            let filePath = fileDirectory.appendingPathComponent("CPDFOfficeSignatureList")
+            let filePath = fileDirectory.appendingPathComponent("SignatureList")
             if FileManager.default.fileExists(atPath: filePath.path) {
                 NSKeyedUnarchiver.setClass(KMSignature.self, forClassName: "KMSignature")
                 if let array = NSKeyedUnarchiver.unarchiveObject(withFile: filePath.path) as? [KMSignature] {
@@ -41,7 +41,7 @@ import Foundation
 
     @objc func saveSingaturesToFile() {
         if let fileDirectory = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first {
-            let filePath = fileDirectory.appendingPathComponent("CPDFOfficeSignatureList")
+            let filePath = fileDirectory.appendingPathComponent("SignatureList")
             NSKeyedArchiver.archiveRootObject(signatureList, toFile: filePath.path)
         }
     }

+ 96 - 96
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/Signature/KMSignatureWindowController.xib

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22154" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22154"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
         <capability name="Named colors" minToolsVersion="9.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -53,24 +53,28 @@
             <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
             <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
             <rect key="contentRect" x="196" y="240" width="468" height="392"/>
-            <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1415"/>
+            <rect key="screenRect" x="0.0" y="0.0" width="1440" height="875"/>
             <view key="contentView" id="se5-gp-TjO">
                 <rect key="frame" x="0.0" y="0.0" width="468" height="392"/>
                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                 <subviews>
                     <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="j7L-83-3Ut">
                         <rect key="frame" x="372" y="16" width="80" height="32"/>
-                        <buttonCell key="cell" type="bevel" title="Cancel" bezelStyle="regularSquare" alignment="center" imageScaling="proportionallyDown" inset="2" id="YKQ-wq-7Ov">
-                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                            <font key="font" metaFont="system"/>
-                        </buttonCell>
                         <constraints>
                             <constraint firstAttribute="width" constant="80" id="47F-dt-Cbf"/>
                             <constraint firstAttribute="height" constant="32" id="fom-33-oXa"/>
                         </constraints>
+                        <buttonCell key="cell" type="bevel" title="Cancel" bezelStyle="regularSquare" alignment="center" imageScaling="proportionallyDown" inset="2" id="YKQ-wq-7Ov">
+                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                            <font key="font" metaFont="system"/>
+                        </buttonCell>
                     </button>
                     <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="s0y-mf-WpS">
                         <rect key="frame" x="276" y="16" width="80" height="32"/>
+                        <constraints>
+                            <constraint firstAttribute="width" constant="80" id="jKE-Mm-oCG"/>
+                            <constraint firstAttribute="height" constant="32" id="kRd-WV-Agv"/>
+                        </constraints>
                         <buttonCell key="cell" type="bevel" title="Cancel" bezelStyle="regularSquare" alignment="center" imageScaling="proportionallyDown" inset="2" id="76r-wf-8NT">
                             <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                             <font key="font" metaFont="system"/>
@@ -78,12 +82,8 @@
 Gw
 </string>
                         </buttonCell>
-                        <constraints>
-                            <constraint firstAttribute="width" constant="80" id="jKE-Mm-oCG"/>
-                            <constraint firstAttribute="height" constant="32" id="kRd-WV-Agv"/>
-                        </constraints>
                     </button>
-                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="8sI-6n-jcW">
+                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="8sI-6n-jcW">
                         <rect key="frame" x="65" y="24" width="229" height="16"/>
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
                         <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="Press &quot;esc&quot; to disable the Trackpad." id="m48-yd-Nf0">
@@ -92,7 +92,7 @@ Gw
                             <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
                         </textFieldCell>
                     </textField>
-                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="uH2-qz-onx">
+                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="uH2-qz-onx">
                         <rect key="frame" x="14" y="363" width="106" height="16"/>
                         <textFieldCell key="cell" lineBreakMode="clipping" title="Create Signature" id="R8r-g6-5mF">
                             <font key="font" metaFont="system"/>
@@ -103,7 +103,7 @@ Gw
                     <box title="Box" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="Zb7-ur-hyq">
                         <rect key="frame" x="13" y="58" width="442" height="236"/>
                         <view key="contentView" id="uGM-sA-94r">
-                            <rect key="frame" x="4" y="5" width="434" height="228"/>
+                            <rect key="frame" x="3" y="3" width="436" height="230"/>
                             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         </view>
                         <constraints>
@@ -112,13 +112,13 @@ Gw
                     </box>
                     <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="9qj-7Y-28D">
                         <rect key="frame" x="389" y="114" width="58" height="31"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="24" id="8fV-sG-5BN"/>
+                        </constraints>
                         <buttonCell key="cell" type="bevel" title="Clear" bezelStyle="regularSquare" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Slu-mR-UaT">
                             <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                             <font key="font" metaFont="system"/>
                         </buttonCell>
-                        <constraints>
-                            <constraint firstAttribute="height" constant="24" id="8fV-sG-5BN"/>
-                        </constraints>
                     </button>
                     <view translatesAutoresizingMaskIntoConstraints="NO" id="7Kh-jc-ozX">
                         <rect key="frame" x="120" y="310" width="228" height="32"/>
@@ -129,42 +129,42 @@ Gw
                             </customView>
                             <button focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="zxH-nH-20E">
                                 <rect key="frame" x="1" y="2" width="75" height="28"/>
-                                <buttonCell key="cell" type="bevel" title="Input" bezelStyle="regularSquare" alignment="center" focusRingType="none" inset="2" id="Q2e-EO-0NA">
-                                    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                    <font key="font" metaFont="system"/>
-                                </buttonCell>
                                 <constraints>
                                     <constraint firstAttribute="width" constant="75" id="5fw-DM-t7M"/>
                                     <constraint firstAttribute="height" constant="28" id="umN-Pq-xfD"/>
                                 </constraints>
+                                <buttonCell key="cell" type="bevel" title="Input" bezelStyle="regularSquare" alignment="center" focusRingType="none" inset="2" id="Q2e-EO-0NA">
+                                    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                    <font key="font" metaFont="system"/>
+                                </buttonCell>
                                 <connections>
                                     <action selector="inputButton_Click:" target="-2" id="Gox-Me-CDz"/>
                                 </connections>
                             </button>
                             <button focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="7eG-Kv-VRY">
                                 <rect key="frame" x="77" y="2" width="75" height="28"/>
-                                <buttonCell key="cell" type="bevel" title="Drawing" bezelStyle="regularSquare" alignment="center" focusRingType="none" inset="2" id="Toj-Fb-0kU">
-                                    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                    <font key="font" metaFont="system"/>
-                                </buttonCell>
                                 <constraints>
                                     <constraint firstAttribute="width" constant="75" id="kqF-YP-QFs"/>
                                     <constraint firstAttribute="height" constant="28" id="wRH-X6-tX7"/>
                                 </constraints>
+                                <buttonCell key="cell" type="bevel" title="Drawing" bezelStyle="regularSquare" alignment="center" focusRingType="none" inset="2" id="Toj-Fb-0kU">
+                                    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                    <font key="font" metaFont="system"/>
+                                </buttonCell>
                                 <connections>
                                     <action selector="drawingButton_Click:" target="-2" id="XAv-BC-S1t"/>
                                 </connections>
                             </button>
                             <button focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="zDE-1j-UZ0">
                                 <rect key="frame" x="152" y="2" width="75" height="28"/>
-                                <buttonCell key="cell" type="bevel" title="Picture" bezelStyle="regularSquare" alignment="center" focusRingType="none" inset="2" id="eE7-su-W3Q">
-                                    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                    <font key="font" metaFont="system"/>
-                                </buttonCell>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="28" id="UKO-LR-iZP"/>
                                     <constraint firstAttribute="width" constant="75" id="tIO-gY-50J"/>
                                 </constraints>
+                                <buttonCell key="cell" type="bevel" title="Picture" bezelStyle="regularSquare" alignment="center" focusRingType="none" inset="2" id="eE7-su-W3Q">
+                                    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                    <font key="font" metaFont="system"/>
+                                </buttonCell>
                                 <connections>
                                     <action selector="pictureButton_Click:" target="-2" id="uTH-7v-KwF"/>
                                 </connections>
@@ -360,15 +360,15 @@ Gw
             <rect key="frame" x="0.0" y="0.0" width="468" height="230"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="y6e-Mr-PoK" customClass="KMPDFSignatureTextView" customModule="PDF_Master" customModuleProvider="target">
+                <customView translatesAutoresizingMaskIntoConstraints="NO" id="y6e-Mr-PoK" customClass="KMPDFSignatureTextView" customModule="PDF_Reader_Pro" customModuleProvider="target">
                     <rect key="frame" x="0.0" y="48" width="468" height="182"/>
                     <subviews>
-                        <textField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="4mg-CI-O88" customClass="KMSignayureTextField" customModule="PDF_Master" customModuleProvider="target">
+                        <textField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="4mg-CI-O88" customClass="KMSignayureTextField" customModule="PDF_Reader_Pro" customModuleProvider="target">
                             <rect key="frame" x="182" y="83" width="104" height="17"/>
                             <constraints>
                                 <constraint firstAttribute="width" constant="100" id="PKU-Zg-SXA"/>
                             </constraints>
-                            <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" focusRingType="none" alignment="center" placeholderString="Sign Here" id="n2U-Jv-ECn" customClass="KMVerticallyCenteredSecureTextFieldCell" customModule="PDF_Master" customModuleProvider="target">
+                            <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" focusRingType="none" alignment="center" placeholderString="Sign Here" id="n2U-Jv-ECn" customClass="KMVerticallyCenteredSecureTextFieldCell" customModule="PDF_Reader_Pro" customModuleProvider="target">
                                 <font key="font" metaFont="system" size="14"/>
                                 <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <color key="backgroundColor" white="1" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@@ -404,6 +404,9 @@ Gw
                 </customView>
                 <popUpButton translatesAutoresizingMaskIntoConstraints="NO" id="OX0-YE-NCd">
                     <rect key="frame" x="-3" y="2" width="227" height="25"/>
+                    <constraints>
+                        <constraint firstAttribute="width" constant="220" id="JP4-y0-kDU"/>
+                    </constraints>
                     <popUpButtonCell key="cell" type="push" title="Item 1" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="border" inset="2" pullsDown="YES" selectedItem="KZ5-Yj-30d" id="cMv-GJ-DlD">
                         <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                         <font key="font" metaFont="menu"/>
@@ -413,9 +416,6 @@ Gw
                             </items>
                         </menu>
                     </popUpButtonCell>
-                    <constraints>
-                        <constraint firstAttribute="width" constant="220" id="JP4-y0-kDU"/>
-                    </constraints>
                     <connections>
                         <action selector="boxItemClicked_Font:" target="-2" id="p6t-kB-gXh"/>
                     </connections>
@@ -427,63 +427,63 @@ Gw
                             <rect key="frame" x="0.0" y="0.0" width="32" height="32"/>
                             <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
                         </customView>
-                        <button tag="2" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="odS-Dt-SYU">
+                        <button verticalHuggingPriority="750" tag="2" translatesAutoresizingMaskIntoConstraints="NO" id="odS-Dt-SYU">
                             <rect key="frame" x="6" y="6" width="20" height="20"/>
-                            <buttonCell key="cell" type="bevel" bezelStyle="rounded" alignment="center" inset="2" id="tYi-Qx-Cfp">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
                             <constraints>
                                 <constraint firstAttribute="height" constant="20" id="ckO-mf-AQM"/>
                                 <constraint firstAttribute="width" constant="20" id="imT-GP-jUB"/>
                             </constraints>
+                            <buttonCell key="cell" type="bevel" bezelStyle="rounded" alignment="center" inset="2" id="tYi-Qx-Cfp">
+                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                <font key="font" metaFont="system"/>
+                            </buttonCell>
                             <connections>
                                 <action selector="colorTextButtonAction:" target="-2" id="HFo-SF-dh6"/>
                             </connections>
                         </button>
-                        <button tag="3" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="e39-bx-gfp">
+                        <button verticalHuggingPriority="750" tag="3" translatesAutoresizingMaskIntoConstraints="NO" id="e39-bx-gfp">
                             <rect key="frame" x="49" y="6" width="20" height="20"/>
-                            <buttonCell key="cell" type="bevel" bezelStyle="rounded" alignment="center" inset="2" id="X18-CH-zzp">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
                             <constraints>
                                 <constraint firstAttribute="width" constant="20" id="DJq-rz-FKF"/>
                                 <constraint firstAttribute="height" constant="20" id="Hou-uk-7Rf"/>
                             </constraints>
+                            <buttonCell key="cell" type="bevel" bezelStyle="rounded" alignment="center" inset="2" id="X18-CH-zzp">
+                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                <font key="font" metaFont="system"/>
+                            </buttonCell>
                             <connections>
                                 <action selector="colorTextButtonAction:" target="-2" id="C7P-qp-8Ge"/>
                             </connections>
                         </button>
-                        <button tag="4" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="e4f-rT-CLt">
+                        <button verticalHuggingPriority="750" tag="4" translatesAutoresizingMaskIntoConstraints="NO" id="e4f-rT-CLt">
                             <rect key="frame" x="92" y="6" width="20" height="20"/>
-                            <buttonCell key="cell" type="bevel" bezelStyle="rounded" alignment="center" inset="2" id="E0z-ik-jIs">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
                             <constraints>
                                 <constraint firstAttribute="width" constant="20" id="hJ9-1Z-Gbu"/>
                                 <constraint firstAttribute="height" constant="20" id="sLz-wc-skg"/>
                             </constraints>
+                            <buttonCell key="cell" type="bevel" bezelStyle="rounded" alignment="center" inset="2" id="E0z-ik-jIs">
+                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                <font key="font" metaFont="system"/>
+                            </buttonCell>
                             <connections>
                                 <action selector="colorTextButtonAction:" target="-2" id="ATk-Ve-irw"/>
                             </connections>
                         </button>
-                        <button tag="5" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="kZy-e9-ulI">
+                        <button verticalHuggingPriority="750" tag="5" translatesAutoresizingMaskIntoConstraints="NO" id="kZy-e9-ulI">
                             <rect key="frame" x="135" y="6" width="20" height="20"/>
-                            <buttonCell key="cell" type="bevel" bezelStyle="rounded" alignment="center" inset="2" id="uBd-Ud-rsU">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
                             <constraints>
                                 <constraint firstAttribute="height" constant="20" id="UCe-DC-za6"/>
                                 <constraint firstAttribute="width" constant="20" id="yhL-Rg-HED"/>
                             </constraints>
+                            <buttonCell key="cell" type="bevel" bezelStyle="rounded" alignment="center" inset="2" id="uBd-Ud-rsU">
+                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                <font key="font" metaFont="system"/>
+                            </buttonCell>
                             <connections>
                                 <action selector="colorTextButtonAction:" target="-2" id="sFI-Ga-w7g"/>
                             </connections>
                         </button>
-                        <button focusRingType="none" tag="6" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="5Nn-1V-0B2" customClass="KMSignatureColorButton">
+                        <button focusRingType="none" fixedFrame="YES" tag="6" translatesAutoresizingMaskIntoConstraints="NO" id="5Nn-1V-0B2" customClass="KMSignatureColorButton" customModule="PDF_Reader_Pro" customModuleProvider="target">
                             <rect key="frame" x="204" y="8" width="24" height="24"/>
                             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
                             <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" imagePosition="only" alignment="center" focusRingType="none" imageScaling="proportionallyUpOrDown" inset="2" id="08c-rm-nye">
@@ -522,18 +522,18 @@ Gw
             <rect key="frame" x="0.0" y="0.0" width="468" height="230"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="I2h-gk-zBq" customClass="KMDrawView" customModule="PDF_Master" customModuleProvider="target">
+                <customView translatesAutoresizingMaskIntoConstraints="NO" id="I2h-gk-zBq" customClass="KMDrawView" customModule="PDF_Reader_Pro" customModuleProvider="target">
                     <rect key="frame" x="0.0" y="48" width="468" height="182"/>
                 </customView>
                 <button focusRingType="none" translatesAutoresizingMaskIntoConstraints="NO" id="pqR-eZ-KlX">
-                    <rect key="frame" x="95" y="9" width="89" height="14"/>
+                    <rect key="frame" x="95" y="16" width="89" height="0.0"/>
+                    <constraints>
+                        <constraint firstAttribute="width" constant="89" id="qaA-aA-DPC"/>
+                    </constraints>
                     <buttonCell key="cell" type="bevel" bezelStyle="regularSquare" imagePosition="left" focusRingType="none" inset="2" id="KL4-X1-mLd">
                         <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                         <font key="font" metaFont="system"/>
                     </buttonCell>
-                    <constraints>
-                        <constraint firstAttribute="width" constant="89" id="qaA-aA-DPC"/>
-                    </constraints>
                     <connections>
                         <action selector="trackpadButton_Click:" target="-2" id="UwP-WA-Gp6"/>
                     </connections>
@@ -545,63 +545,63 @@ Gw
                             <rect key="frame" x="0.0" y="0.0" width="32" height="32"/>
                             <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
                         </customView>
-                        <button tag="2" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="9Ne-g2-ewU">
+                        <button verticalHuggingPriority="750" tag="2" translatesAutoresizingMaskIntoConstraints="NO" id="9Ne-g2-ewU">
                             <rect key="frame" x="6" y="6" width="20" height="20"/>
-                            <buttonCell key="cell" type="bevel" bezelStyle="rounded" alignment="center" inset="2" id="v04-1X-7fD">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
                             <constraints>
                                 <constraint firstAttribute="width" constant="20" id="Cqt-Xf-ufI"/>
                                 <constraint firstAttribute="height" constant="20" id="hfS-Dd-Oa4"/>
                             </constraints>
+                            <buttonCell key="cell" type="bevel" bezelStyle="rounded" alignment="center" inset="2" id="v04-1X-7fD">
+                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                <font key="font" metaFont="system"/>
+                            </buttonCell>
                             <connections>
                                 <action selector="drawColorBtnClicked:" target="-2" id="ENg-K1-EWZ"/>
                             </connections>
                         </button>
-                        <button tag="3" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="3xQ-rA-xHD">
+                        <button verticalHuggingPriority="750" tag="3" translatesAutoresizingMaskIntoConstraints="NO" id="3xQ-rA-xHD">
                             <rect key="frame" x="49" y="6" width="20" height="20"/>
-                            <buttonCell key="cell" type="bevel" bezelStyle="rounded" alignment="center" inset="2" id="CEp-vA-9uH">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
                             <constraints>
                                 <constraint firstAttribute="height" constant="20" id="ygL-2c-5ad"/>
                                 <constraint firstAttribute="width" constant="20" id="zcU-qW-zPP"/>
                             </constraints>
+                            <buttonCell key="cell" type="bevel" bezelStyle="rounded" alignment="center" inset="2" id="CEp-vA-9uH">
+                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                <font key="font" metaFont="system"/>
+                            </buttonCell>
                             <connections>
                                 <action selector="drawColorBtnClicked:" target="-2" id="oIc-A2-ohP"/>
                             </connections>
                         </button>
-                        <button tag="4" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="pWi-Op-4LW">
+                        <button verticalHuggingPriority="750" tag="4" translatesAutoresizingMaskIntoConstraints="NO" id="pWi-Op-4LW">
                             <rect key="frame" x="92" y="6" width="20" height="20"/>
-                            <buttonCell key="cell" type="bevel" bezelStyle="rounded" alignment="center" inset="2" id="pDN-dh-XhL">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
                             <constraints>
                                 <constraint firstAttribute="height" constant="20" id="AQf-FY-og3"/>
                                 <constraint firstAttribute="width" constant="20" id="eLe-HZ-41R"/>
                             </constraints>
+                            <buttonCell key="cell" type="bevel" bezelStyle="rounded" alignment="center" inset="2" id="pDN-dh-XhL">
+                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                <font key="font" metaFont="system"/>
+                            </buttonCell>
                             <connections>
                                 <action selector="drawColorBtnClicked:" target="-2" id="FAV-DC-dMP"/>
                             </connections>
                         </button>
-                        <button tag="5" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="oMw-fF-4f3">
+                        <button verticalHuggingPriority="750" tag="5" translatesAutoresizingMaskIntoConstraints="NO" id="oMw-fF-4f3">
                             <rect key="frame" x="135" y="6" width="20" height="20"/>
-                            <buttonCell key="cell" type="bevel" bezelStyle="rounded" alignment="center" inset="2" id="tkz-zD-rbd">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
                             <constraints>
                                 <constraint firstAttribute="width" constant="20" id="4IQ-W3-pIB"/>
                                 <constraint firstAttribute="height" constant="20" id="doC-ed-H4J"/>
                             </constraints>
+                            <buttonCell key="cell" type="bevel" bezelStyle="rounded" alignment="center" inset="2" id="tkz-zD-rbd">
+                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                <font key="font" metaFont="system"/>
+                            </buttonCell>
                             <connections>
                                 <action selector="drawColorBtnClicked:" target="-2" id="ls7-fC-Dxu"/>
                             </connections>
                         </button>
-                        <button focusRingType="none" tag="6" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="4aa-mx-SPE" customClass="KMSignatureColorButton">
+                        <button focusRingType="none" fixedFrame="YES" tag="6" translatesAutoresizingMaskIntoConstraints="NO" id="4aa-mx-SPE" customClass="KMSignatureColorButton" customModule="PDF_Reader_Pro" customModuleProvider="target">
                             <rect key="frame" x="204" y="8" width="24" height="24"/>
                             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
                             <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" imagePosition="only" alignment="center" focusRingType="none" imageScaling="proportionallyUpOrDown" inset="2" id="mn6-Rv-AIW">
@@ -625,6 +625,9 @@ Gw
                 </customView>
                 <popUpButton translatesAutoresizingMaskIntoConstraints="NO" id="Q8B-d8-1oI">
                     <rect key="frame" x="-3" y="2" width="86" height="25"/>
+                    <constraints>
+                        <constraint firstAttribute="width" constant="79" id="7n6-WJ-Ktc"/>
+                    </constraints>
                     <popUpButtonCell key="cell" type="push" title="Item 1" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="border" inset="2" pullsDown="YES" selectedItem="kw7-v2-CTa" id="DJQ-d5-tKu">
                         <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                         <font key="font" metaFont="menu"/>
@@ -634,9 +637,6 @@ Gw
                             </items>
                         </menu>
                     </popUpButtonCell>
-                    <constraints>
-                        <constraint firstAttribute="width" constant="79" id="7n6-WJ-Ktc"/>
-                    </constraints>
                     <connections>
                         <action selector="drawSizeBtnClicked:" target="-2" id="h4S-CH-L29"/>
                     </connections>
@@ -644,7 +644,7 @@ Gw
                 <customView translatesAutoresizingMaskIntoConstraints="NO" id="jzf-Rm-GNU">
                     <rect key="frame" x="0.0" y="208" width="468" height="22"/>
                     <subviews>
-                        <textField focusRingType="none" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="YDu-QC-l1V">
+                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="YDu-QC-l1V">
                             <rect key="frame" x="6" y="3" width="456" height="16"/>
                             <textFieldCell key="cell" selectable="YES" title="Multiline Label" id="pna-0D-8pK">
                                 <font key="font" usesAppearanceFont="YES"/>
@@ -682,7 +682,7 @@ Gw
             <rect key="frame" x="0.0" y="0.0" width="468" height="230"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="fH0-Z8-dC3" customClass="KMPDFSignatureImageView" customModule="PDF_Master" customModuleProvider="target">
+                <customView translatesAutoresizingMaskIntoConstraints="NO" id="fH0-Z8-dC3" customClass="KMPDFSignatureImageView" customModule="PDF_Reader_Pro" customModuleProvider="target">
                     <rect key="frame" x="0.0" y="48" width="468" height="182"/>
                     <subviews>
                         <customView translatesAutoresizingMaskIntoConstraints="NO" id="Z9Y-kq-Z1X">
@@ -716,7 +716,7 @@ DQ
                                 <constraint firstAttribute="height" constant="128" id="zPI-2s-bGk"/>
                             </constraints>
                         </customView>
-                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="OZz-hG-Yf2">
+                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="OZz-hG-Yf2">
                             <rect key="frame" x="179" y="16" width="111" height="17"/>
                             <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Select image file" id="prv-uQ-kZ4">
                                 <font key="font" metaFont="system" size="14"/>
@@ -741,27 +741,27 @@ DQ
                 </customView>
                 <button focusRingType="none" translatesAutoresizingMaskIntoConstraints="NO" id="0Ld-zN-h2r">
                     <rect key="frame" x="178" y="10" width="112" height="22"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="22" id="YfU-mu-Ywh"/>
+                    </constraints>
                     <buttonCell key="cell" type="bevel" title="Clear background" bezelStyle="regularSquare" imagePosition="left" focusRingType="none" inset="2" id="zLk-by-TV2">
                         <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                         <font key="font" metaFont="system"/>
                     </buttonCell>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="22" id="YfU-mu-Ywh"/>
-                    </constraints>
                     <connections>
                         <action selector="pictureClearBackBtnAction:" target="-2" id="gJ7-g7-CgB"/>
                     </connections>
                 </button>
-                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="zHh-uI-saB" customClass="KMCoverButton" customModule="PDF_Master" customModuleProvider="target">
+                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="zHh-uI-saB" customClass="KMCoverButton" customModule="PDF_Reader_Pro" customModuleProvider="target">
                     <rect key="frame" x="290" y="13" width="16" height="16"/>
-                    <buttonCell key="cell" type="bevel" bezelStyle="rounded" alignment="center" imageScaling="proportionallyDown" inset="2" id="03E-Gy-9TG">
-                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                        <font key="font" metaFont="system"/>
-                    </buttonCell>
                     <constraints>
                         <constraint firstAttribute="width" constant="16" id="m0o-Qo-sWP"/>
                         <constraint firstAttribute="height" constant="16" id="q8t-dW-imG"/>
                     </constraints>
+                    <buttonCell key="cell" type="bevel" bezelStyle="rounded" alignment="center" imageScaling="proportionallyDown" inset="2" id="03E-Gy-9TG">
+                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                        <font key="font" metaFont="system"/>
+                    </buttonCell>
                 </button>
             </subviews>
             <constraints>

+ 0 - 1
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/StampList/KMStampManager.swift

@@ -7,7 +7,6 @@
 
 import Foundation
 
-let kDocumentDirectory = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first!
 let kStampFolderPath = kDocumentDirectory.appendingPathComponent("Stamp")
 let kStampPlistPath = kStampFolderPath.appendingPathComponent("Stamp.plist")
 

+ 1 - 70
PDF Office/PDF Reader Pro.xcodeproj/xcuserdata/kdanmobile.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -1,75 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Bucket
-   uuid = "E7C3B034-85F9-4E63-8599-7CB8F874E11A"
+   uuid = "0D48DA72-BDA3-43AF-A2EF-0972354CCC1F"
    type = "1"
    version = "2.0">
-<<<<<<< HEAD
-=======
-   <Breakpoints>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "F9B4BBFC-7111-4185-9003-28FA166721E0"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "PDF Master/Class/AD/KMAdsManager.swift"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "82"
-            endingLineNumber = "82"
-            landmarkName = "beginSheetModalForView(_:directions:adPosY:animated:completionHandler:)"
-            landmarkType = "7">
-            <Locations>
-               <Location
-                  uuid = "F9B4BBFC-7111-4185-9003-28FA166721E0 - 944f51dee060d9c7"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "PDF_Reader_Pro.KMAdsManager.beginSheetModalForView(_: __C.NSView, directions: PDF_Reader_Pro.KMADViewDirections, adPosY: CoreGraphics.CGFloat, animated: Swift.Bool, completionHandler: (Swift.Int) -&gt; ()) -&gt; Swift.Bool"
-                  moduleName = "PDF Reader Pro"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/Class/AD/KMAdsManager.swift"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "82"
-                  endingLineNumber = "82"
-                  offsetFromSymbolStart = "1016">
-               </Location>
-               <Location
-                  uuid = "F9B4BBFC-7111-4185-9003-28FA166721E0 - 944f51dee060d9c7"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "PDF_Reader_Pro.KMAdsManager.beginSheetModalForView(_: __C.NSView, directions: PDF_Reader_Pro.KMADViewDirections, adPosY: CoreGraphics.CGFloat, animated: Swift.Bool, completionHandler: (Swift.Int) -&gt; ()) -&gt; Swift.Bool"
-                  moduleName = "PDF Reader Pro"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/Class/AD/KMAdsManager.swift"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "82"
-                  endingLineNumber = "82"
-                  offsetFromSymbolStart = "824">
-               </Location>
-            </Locations>
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "A18B68AC-DA6A-47DE-95EC-CFE6B886D316"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "PDF Master/Class/PDFWindowController/ViewController/KMMainViewController.swift"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "896"
-            endingLineNumber = "896"
-            landmarkName = "loadOpenFileFunctionGuide(_:)"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-   </Breakpoints>
->>>>>>> 49f393cb6af585eab5c6b039f030a4027901e150
 </Bucket>