Browse Source

【订阅】权益弹窗逻辑调整

lizhe 1 year ago
parent
commit
991683158c

+ 2 - 2
PDF Office/PDF Master/Class/Home/ViewController/KMFastToolCollectionViewItem.xib

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>

+ 34 - 97
PDF Office/PDF Master/Class/KMLightMember/Controller/SubscriptionView/WaterMark/KMSubscribeWaterMarkWindowController.swift

@@ -44,7 +44,6 @@ var subscribeWaterMarkMainWindow: NSWindow?
 typealias KMSubscribeWaterMarkWindowControllerCloseAction = (_ controller: KMSubscribeWaterMarkWindowController) -> Void
 typealias KMSubscribeWaterMarkWindowControllerWatermarkExportAction = (_ controller: KMSubscribeWaterMarkWindowController) -> Void
 typealias KMSubscribeWaterMarkWindowControllerSubscribeAction = (_ controller: KMSubscribeWaterMarkWindowController) -> Void
-typealias KMSubscribeWaterMarkWindowControllerRestoreAction = (_ controller: KMSubscribeWaterMarkWindowController) -> Void
 
 class KMSubscribeWaterMarkWindowController: NSWindowController {
 
@@ -54,7 +53,6 @@ class KMSubscribeWaterMarkWindowController: NSWindowController {
     var closeAction: KMSubscribeWaterMarkWindowControllerCloseAction?
     var subscribeAction: KMSubscribeWaterMarkWindowControllerSubscribeAction?
     var watermarkExportAction: KMSubscribeWaterMarkWindowControllerWatermarkExportAction?
-    var restoreAction: KMSubscribeWaterMarkWindowControllerRestoreAction?
     
     var isContinue: Bool?
     var isAI: Bool?
@@ -72,18 +70,6 @@ class KMSubscribeWaterMarkWindowController: NSWindowController {
     
     override func awakeFromNib() {
         super.awakeFromNib()
-        
-        if let data = self.isAI, data {
-            self.waterMarkView.waterExportButton.isHidden = true
-            self.waterMarkView.subTrailingConst.constant = 60
-            self.waterMarkView.subWidthConst.constant = 280
-            self.waterMarkView.preferentialImageTrailingConst.constant = 92
-        } else {
-            self.waterMarkView.waterExportButton.isHidden = false
-            self.waterMarkView.subTrailingConst.constant = 0
-            self.waterMarkView.subWidthConst.constant = 192
-            self.waterMarkView.preferentialImageTrailingConst.constant = 32
-        }
     }
     
     //MARK: 打开文件
@@ -97,7 +83,23 @@ class KMSubscribeWaterMarkWindowController: NSWindowController {
             isAI = false
         }
         
-        if KMLightMemberManager.manager.isLogin() {
+        if isAI && KMLightMemberManager.manager.purchaseState != .subscription {
+            if KMLightMemberManager.manager.isLogin() {
+                KMComparativeTableViewController.show(window: NSApp.mainWindow!)
+            } else {
+                let controller = KMLoginWindowController.show(window: NSApp.mainWindow!,.equity)
+                if isAI {
+                    let alert = NSAlert()
+                    alert.messageText = NSLocalizedString("Please Login or Sign up to proceed to the next step.", comment: "")
+                    alert.informativeText = NSLocalizedString("On upgrading your account, you can enjoy all AI features in PDF Master.", comment: "")
+                    alert.addButton(withTitle: NSLocalizedString("OK", comment: ""))
+                    alert.beginSheetModal(for: (controller?.window)!) { result in
+
+                    }
+                }
+            }
+            return KMSubscribeWaterMarkWindowController.init()
+        } else {
             let subscribeWaterMarkWindowController: KMSubscribeWaterMarkWindowController = KMSubscribeWaterMarkWindowController.init(windowNibName: "KMSubscribeWaterMarkWindowController")
 
             subscribeWaterMarkWindowController.isContinue = isContinue
@@ -106,12 +108,6 @@ class KMSubscribeWaterMarkWindowController: NSWindowController {
             window.beginSheet(subscribeWaterMarkWindowController.window!)
             subscribeWaterMarkWindowController.window?.center()
             
-            if isContinue {
-                subscribeWaterMarkWindowController.waterMarkView.waterExportButton.title = NSLocalizedString("Continue", comment: "")
-            } else {
-                subscribeWaterMarkWindowController.waterMarkView.waterExportButton.title = NSLocalizedString("Save with Watermark", comment: "")
-            }
-            
             subscribeWaterMarkWindowController.closeAction = { controller in
                 completion(false, false, true)
                 subscribeWaterMarkMainWindow?.endSheet(controller.window!)
@@ -134,76 +130,27 @@ class KMSubscribeWaterMarkWindowController: NSWindowController {
                     callback()
                 }
                 
-                // 数据埋点
-                controller.trackEvent(type: type)
+                subscribeWaterMarkMainWindow?.endSheet(controller.window!)
+                controller.window?.close()
+                subscribeWaterMarkController = nil
                 
-                controller.waterMarkView.beginLoading(backgroundColor: NSColor.black.withAlphaComponent(0.2))
-                KMPurchaseManager.manager.purchaseProduct(productIdentifier: PRODUCT_1) { isSuccess, error in
-                    if isSuccess {
-                        subscribeWaterMarkMainWindow?.endSheet(controller.window!)
-                        controller.window?.close()
-                        subscribeWaterMarkController = nil
-//                        subscribeWaterMarkMainWindow = nil
-                        
-                        if subscribeWaterMarkMainWindow != nil {
-                            let controller = KMSubscribeSuccessWindowController.show(window: subscribeWaterMarkMainWindow!)
-                            controller.closeAction = { controller in
-                                controller.closeWindow()
-                                completion(true, false, false)
-                            }
-                            subscribeWaterMarkMainWindow = nil
-                        } else {
-                            completion(true, false, false)
-                        }
-                        
-                    } else {
-                        KMComparativeTableViewController.purchasefailed(view: subscribeWaterMarkController?.waterMarkView, state: error)
-                        completion(false, false, false)
-                    }
-                    
-                    controller.waterMarkView.endLoading()
+                if KMLightMemberManager.manager.isLogin() {
+                    KMComparativeTableViewController.show(window: subscribeWaterMarkMainWindow ?? NSWindow())
+                } else {
+                    KMLoginWindowController.show(window: subscribeWaterMarkMainWindow ?? NSWindow())
                 }
+                subscribeWaterMarkMainWindow = nil
             }
             
-            subscribeWaterMarkWindowController.restoreAction = { controller in
-                controller.waterMarkView.beginLoading(backgroundColor: NSColor.black.withAlphaComponent(0.2))
-                KMPurchaseManager.manager.restorePurchases { isSuccess, error in
-                    if isSuccess {
-                        subscribeWaterMarkMainWindow?.endSheet(controller.window!)
-                        controller.window?.close()
-                        subscribeWaterMarkController = nil
-                        subscribeWaterMarkMainWindow = nil
-                        
-                        completion(true, false, false)
-                    } else {
-                        if error != .restoreSuccess {
-                            KMComparativeTableViewController.purchasefailed(view: subscribeWaterMarkController?.waterMarkView, state: error)
-                        }
-                        completion(false, false, false)
-                    }
-                    controller.waterMarkView.endLoading()
-                }
+            if isContinue {
+                subscribeWaterMarkWindowController.waterMarkView.waterExportButton.title = NSLocalizedString("Continue", comment: "")
+            } else {
+                subscribeWaterMarkWindowController.waterMarkView.waterExportButton.title = NSLocalizedString("Save with Watermark", comment: "")
             }
             
             subscribeWaterMarkController = subscribeWaterMarkWindowController
             subscribeWaterMarkMainWindow = window
             return subscribeWaterMarkWindowController
-        } else {
-            let controller = KMLoginWindowController.show(window: NSApp.mainWindow!,.equity)
-            if isAI {
-                let alert = NSAlert()
-                alert.messageText = NSLocalizedString("Please login or register to proceed to the next step", comment: "")
-                alert.informativeText = NSLocalizedString("As a PDF Master member, you can subscribe to use AI features as needed.", comment: "")
-                alert.addButton(withTitle: NSLocalizedString("OK", comment: ""))
-                alert.beginSheetModal(for: (controller?.window)!) { result in
-//                    if (result == .alertFirstButtonReturn) {
-//
-//                    } else if result == .alertSecondButtonReturn {
-//                        return
-//                    }
-                }
-            }
-            return KMSubscribeWaterMarkWindowController.init()
         }
     }
     
@@ -225,18 +172,10 @@ class KMSubscribeWaterMarkWindowController: NSWindowController {
         }
         
         self.waterMarkView.subscribeAction = { [weak self] view in
-            self?.trackEvent(eventName: "PUW_Sub_Subscribe")
-            
             guard let callBack = self?.subscribeAction else { return }
             
             callBack((self!))
         }
-        
-        self.waterMarkView.restoreAction = { [weak self] view in
-            guard let callBack = self?.restoreAction else { return }
-            
-            callBack((self!))
-        }
     }
     
     func closeWindow() {
@@ -252,13 +191,11 @@ class KMSubscribeWaterMarkWindowController: NSWindowController {
     }
     
     func reloadData() {
-        #if VERSION_FREE
-        self.waterViewHeightConstrain.constant = 511
-        #endif
-        
-        #if VERSION_DMG
-        self.waterViewHeightConstrain.constant = 511 - 80
-        #endif
+        if KMLightMemberManager.manager.isLogin() {
+            self.waterViewHeightConstrain.constant = 538
+        } else {
+            self.waterViewHeightConstrain.constant = 505
+        }
     }
     
     static func isSampleController() -> KMSubscribeWaterMarkWindowController {

+ 6 - 6
PDF Office/PDF Master/Class/KMLightMember/Controller/SubscriptionView/WaterMark/KMSubscribeWaterMarkWindowController.xib

@@ -18,18 +18,18 @@
         <window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="F0z-JX-Cv5">
             <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="448" height="511"/>
+            <rect key="contentRect" x="196" y="240" width="380" height="505"/>
             <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1415"/>
-            <value key="minSize" type="size" width="448" height="511"/>
-            <value key="maxSize" type="size" width="448" height="511"/>
+            <value key="minSize" type="size" width="448" height="505"/>
+            <value key="maxSize" type="size" width="448" height="505"/>
             <view key="contentView" id="se5-gp-TjO">
-                <rect key="frame" x="0.0" y="0.0" width="448" height="511"/>
+                <rect key="frame" x="0.0" y="0.0" width="380" height="505"/>
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
                     <customView translatesAutoresizingMaskIntoConstraints="NO" id="kKR-sQ-MOd" customClass="KMSubscribeWaterMarkView" customModule="PDF_Master" customModuleProvider="target">
-                        <rect key="frame" x="0.0" y="0.0" width="448" height="511"/>
+                        <rect key="frame" x="0.0" y="0.0" width="380" height="505"/>
                         <constraints>
-                            <constraint firstAttribute="height" constant="511" id="hGQ-d7-hqP"/>
+                            <constraint firstAttribute="height" constant="505" id="hGQ-d7-hqP"/>
                         </constraints>
                     </customView>
                 </subviews>

+ 1 - 1
PDF Office/PDF Master/Class/KMLightMember/Controller/SubscriptionView/WaterMark/View/KMSubscribeWaterMarkCollectionItem.swift

@@ -27,7 +27,7 @@ class KMSubscribeWaterMarkCollectionItem: NSCollectionViewItem {
     }
     
     func setup() {
-        self.titleLabel.textColor = NSColor(hex: "#252629")
+        self.titleLabel.textColor = NSColor(hex: "#273C62")
         self.titleLabel.font = NSFont.SFProTextSemibold(14)
         
         self.subtitleLabel.textColor = NSColor(hex: "#616469")

+ 4 - 4
PDF Office/PDF Master/Class/KMLightMember/Controller/SubscriptionView/WaterMark/View/KMSubscribeWaterMarkCollectionItem.xib

@@ -17,7 +17,7 @@
         <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
         <customObject id="-3" userLabel="Application" customClass="NSObject"/>
         <customView id="Hz6-mo-xeY">
-            <rect key="frame" x="0.0" y="0.0" width="448" height="66"/>
+            <rect key="frame" x="0.0" y="0.0" width="324" height="66"/>
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
             <subviews>
                 <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="UN8-s9-tdC">
@@ -40,9 +40,9 @@
                     </textFieldCell>
                 </textField>
                 <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="BPg-hS-GYT">
-                    <rect key="frame" x="42" y="14" width="360" height="32"/>
+                    <rect key="frame" x="42" y="-2" width="254" height="48"/>
                     <constraints>
-                        <constraint firstAttribute="width" constant="356" id="me1-1N-hoI"/>
+                        <constraint firstAttribute="width" constant="250" id="me1-1N-hoI"/>
                     </constraints>
                     <textFieldCell key="cell" title="The trial watermark will be added when you save the file after trying the advanced features" id="C0c-sD-YMa">
                         <font key="font" metaFont="system"/>
@@ -59,7 +59,7 @@
                 <constraint firstItem="UN8-s9-tdC" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" id="vtj-uR-u5F"/>
                 <constraint firstItem="KPf-lK-ZOs" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" id="xMc-CF-EUQ"/>
             </constraints>
-            <point key="canvasLocation" x="104" y="193"/>
+            <point key="canvasLocation" x="-147" y="191"/>
         </customView>
     </objects>
     <resources>

+ 46 - 162
PDF Office/PDF Master/Class/KMLightMember/Controller/SubscriptionView/WaterMark/View/KMSubscribeWaterMarkView.swift

@@ -17,32 +17,25 @@ class KMSubscribeWaterMarkView: KMBaseXibView {
     @IBOutlet weak var closeBox: KMBox!
     @IBOutlet weak var closeButton: NSButton!
     @IBOutlet weak var titleLabel: NSTextField!
+    @IBOutlet weak var subtitleLabel: NSTextField!
+    @IBOutlet weak var subtitleContentHeightConstraint: NSLayoutConstraint!
     @IBOutlet weak var scrollView: NSScrollView!
     @IBOutlet weak var collectionView: NSCollectionView!
+    @IBOutlet weak var collectionViewContentTopConstraint: NSLayoutConstraint!
+    @IBOutlet weak var collectionContentViewHeightConstraint: NSLayoutConstraint!
     @IBOutlet weak var waterExportButton: NSButton!
     @IBOutlet weak var subscribeView: NSView!
     @IBOutlet weak var subscribeLabel: NSTextField!
     @IBOutlet weak var subscribeBox: KMBox!
     @IBOutlet weak var lineView: NSView!
-//    @IBOutlet var textView: NSTextView!
-    @IBOutlet weak var restoreButton: NSButton!
-    @IBOutlet weak var discountImageView: NSImageView!
-    
-    @IBOutlet weak var infoButton: NSButton!
-    @IBOutlet weak var privacyPolicyButton: NSButton!
-    @IBOutlet weak var termsServiceButton: NSButton!
-    @IBOutlet weak var lineView2: NSView!
-    
-    @IBOutlet weak var subTrailingConst: NSLayoutConstraint!
-    @IBOutlet weak var subWidthConst: NSLayoutConstraint!
-    @IBOutlet weak var preferentialImageTrailingConst: NSLayoutConstraint!
     
     var closeAction: KMSubscribeWaterMarkViewCancelAction?
     var subscribeAction: KMSubscribeWaterMarkViewSubscribeAction?
     var waterMarkExportAction: KMSubscribeWaterMarkViewWaterMarkExportAction?
-    var restoreAction: KMSubscribeWaterMarkViewWaterMarkRestoreAction?
     
-    var dataArray = [
+    var dataArray: [[String: String]] = [[:]]
+    
+    var afterLoginDataArray = [
         ["title": "Save without watermark",
          "subtitle": "When you save a document with PDF Master after editing, no watermark will be attached",
          "image": "remove watermark"],
@@ -54,6 +47,15 @@ class KMSubscribeWaterMarkView: KMBaseXibView {
          "image": "ai"]
     ]
     
+    var beforeLoginDataArray = [
+        ["title": "First 10 Pages of Conversion",
+         "subtitle": "Login to get the first 10 pages PDF Conversion freely.",
+         "image": "remove watermark"],
+        ["title": "Full-Featured Trial",
+         "subtitle": "Unlock and use all features after signing in PDF Master.",
+         "image": "convert"]
+    ]
+    
     let popover = NSPopover()
     var isSubscription: Bool = false
     
@@ -106,108 +108,51 @@ class KMSubscribeWaterMarkView: KMBaseXibView {
             }
         }
         
-        self.restoreButton.contentTintColor = NSColor(hex: "#1770F4")
-        self.restoreButton.font = NSFont.SFProTextRegular(14)
-        
-        self.lineView.backgroundColor(NSColor(hex: "#000000", alpha: 0.1))
-        
-        self.privacyPolicyButton.contentTintColor = NSColor(hex: "#1770F4")
-        self.privacyPolicyButton.font = NSFont.SFProTextRegular(12)
-        
-        self.lineView2.backgroundColor(NSColor(hex: "#000000").withAlphaComponent(0.1))
-        
-        self.termsServiceButton.contentTintColor = NSColor(hex: "#1770F4")
-        self.termsServiceButton.font = NSFont.SFProTextRegular(12)
-        
-//        self.textView.frame = (self.textView.enclosingScrollView?.contentView.bounds)!
-//        self.textView.autoresizingMask = [.width, .height]
+        self.lineView.backgroundColor(NSColor(hex: "#000000").withAlphaComponent(0.1))
     }
     
     override func updateLanguage() {
-        self.titleLabel.stringValue = NSLocalizedString("Subscription Benefits", comment: "")
-        self.waterExportButton.title = NSLocalizedString("Save with Watermark", comment: "")
-        self.subscribeLabel.stringValue = NSLocalizedString("Subscribe", comment: "")
+        if KMLightMemberManager.manager.isLogin() {
+            self.subtitleContentHeightConstraint.constant = 0
+            self.collectionContentViewHeightConstraint.constant = 282
+            self.collectionViewContentTopConstraint.constant = 28
+            self.titleLabel.stringValue = NSLocalizedString("Subscription Benefits", comment: "")
+            self.waterExportButton.title = NSLocalizedString("Save with Watermark", comment: "")
+            self.subscribeLabel.stringValue = NSLocalizedString("Upgrade Now", comment: "")
+        } else {
+            self.subtitleContentHeightConstraint.constant = 80
+            self.collectionContentViewHeightConstraint.constant = 180
+            self.collectionViewContentTopConstraint.constant = 116
+            self.titleLabel.stringValue = NSLocalizedString("Login Benefits", comment: "")
+            self.waterExportButton.title = NSLocalizedString("Save with Watermark ", comment: "")
+            self.subscribeLabel.stringValue = NSLocalizedString("Login or Sign up", comment: "")
+        }
 //        + "  " + NSLocalizedString("Subscription", comment: ""
-        let string = NSLocalizedString("""
-            Payment will be charged to your Apple ID account at the confirmation of purchase.Subscription automatically renews unless it is canceled at least 24 hours before the end of the current period. Your account will be charged for renewal within 24 hours prior to the end of the current period. You can manage and cancel your subscriptions by going to your account settings on the App Store after purchase.
-""", comment: "")
-        let attributedString = NSMutableAttributedString.init(string: string)
-        let paragraphStyle = NSMutableParagraphStyle()
-        paragraphStyle.alignment = .left;
-        paragraphStyle.lineHeightMultiple = 1.37
-        attributedString.addAttributes([NSAttributedString.Key.font : NSFont.SFProTextRegular(11.0),
-                                        NSAttributedString.Key.foregroundColor : NSColor(hex: "#94989C"),
-                                        NSAttributedString.Key.paragraphStyle : paragraphStyle],
-                                    range: NSRange(location: 0, length: string.count))
-        
-//        let range = string.range(of: NSLocalizedString("Subscription", comment: ""))
-//        attributedString.setAttributes([NSAttributedString.Key.font : NSFont.SFProTextRegular(12.0),
-//                                        NSAttributedString.Key.foregroundColor : NSColor(hex: "#1770F4"),
-//                                        NSAttributedString.Key.underlineColor : NSColor.clear,
-//                                        NSAttributedString.Key.link : "register://"],
-//                                       range: string.nsRange(from: range!)!)
         
-//        self.textView.textStorage?.setAttributedString(attributedString)
+        let subtitleString = NSLocalizedString("Login or sign up PDF Master lets you enjoy all features including annotating, text editing and page organization for FREE!", comment: "")
+        let paragraphStyle = NSMutableParagraphStyle()
+        paragraphStyle.lineHeightMultiple = 1.32
+        paragraphStyle.alignment = .left
+        self.subtitleLabel.textColor = NSColor(hex: "#273C62")
+        self.subtitleLabel.attributedStringValue = NSMutableAttributedString(string: NSLocalizedString(subtitleString, comment: ""), attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle, NSAttributedString.Key.font : NSFont.SFProTextRegular(12)])
     }
 
     override func reloadData() {
+        if KMLightMemberManager.manager.isLogin() {
+            self.dataArray = afterLoginDataArray
+        } else {
+            self.dataArray = beforeLoginDataArray
+        }
         self.collectionView.reloadData()
         
 #if VERSION_FREE
-        self.lineView.isHidden = false
-        self.restoreButton.isHidden = false
-//        self.textView.isHidden = false
         
-        self.beginLoading(backgroundColor: NSColor.black.withAlphaComponent(0.2))
-        KMInAppPurchaseManager.manager.fetchProducts { [weak self] isSuccess, products, error in
-            KMPurchaseManager.manager.checkSubscriptionStatus({ [weak self] isSubscription in
-                self?.isSubscription = isSubscription
-                self?.endLoading()
-                self?.updatePrice()
-            })
-        }
 #endif
 
 #if VERSION_DMG
-        self.lineView.isHidden = true
         self.restoreButton.isHidden = true
-//        self.textView.isHidden = true
 #endif
-        self.discountImageView.isHidden = true
-        
-//        if KMLightMemberManager.manager.purchaseState == .trialExpired ||
-//            KMLightMemberManager.manager.purchaseState == .subscriptionExpired {
-//            self.discountImageView.isHidden = true
-//        } else {
-//            self.discountImageView.isHidden = false
-//        }
     }
-    
-    func updatePrice() {
-        let productId: String = PRODUCT_1
-        for product in KMInAppPurchaseManager.manager.availableProducts {
-            if product.productIdentifier == productId {
-                KMPrint("-----------------------------")
-                KMPrint(product.priceLocale.currencySymbol)
-                KMPrint(product.introductoryPrice?.price)
-                KMPrint(product.price)
-                KMPrint("-----------------------------")
-                let currencySymbol: String = product.priceLocale.currencySymbol ?? "$"
-                let currencyCode: String = product.priceLocale.currencyCode ?? "$"
-                let price: String = product.introductoryPrice?.price.description ?? "39.9"
-                let originPrice: String = product.price.description ?? "79.9"
-                
-                if isSubscription {
-                    self.discountImageView.isHidden = true
-                    self.subscribeLabel.stringValue = "\(currencyCode) \(originPrice) / year"
-                } else {
-                    self.discountImageView.isHidden = false
-                    self.subscribeLabel.stringValue = "\(currencyCode)\(price) / year"
-                }
-            }
-        }
-    }
-    
 }
 
 extension KMSubscribeWaterMarkView {
@@ -228,67 +173,6 @@ extension KMSubscribeWaterMarkView {
         
         callBack(self)
     }
-    
-    @IBAction func infoButtonAction(_ sender: Any) {
-        self.showPopover(sender)
-    }
-    
-    @IBAction func restoreButtonAction(_ sender: Any) {
-        guard let callBack = restoreAction else { return }
-        
-        callBack(self)
-    }
-    
-    @IBAction func privacyPolicyButtonAction(_ sender: Any) {
-        NSWorkspace.shared.open(URL(string: "https://www.pdfreaderpro.com/privacy-policy")!)
-    }
-    
-    @IBAction func termsServiceButtonAction(_ sender: Any) {
-        NSWorkspace.shared.open(URL(string: "https://www.pdfreaderpro.com/terms_of_service")!)
-    }
-    
-    func setupPopover() {
-        let string: NSString = NSLocalizedString(
-"""
-Payment will be charged to your Apple ID account at the confirmation of purchase.\nSubscription automatically renews unless it is canceled at least 24 hours before the end of the current period. Your account will be charged for renewal within 24 hours prior to the end of the current period. You can manage and cancel your subscriptions by going to your account settings on the App Store after purchase.
-"""
-            , comment: "") as NSString
-        
-        let paragraphStyle = NSMutableParagraphStyle()
-        paragraphStyle.lineHeightMultiple = 1.4
-        paragraphStyle.alignment = .left
-        let attributes = [NSAttributedString.Key.font : NSFont.SFProTextRegular(12), NSAttributedString.Key.paragraphStyle : paragraphStyle]
-        var size: NSSize = string.boundingRect(with: NSSize(width: 420, height: 600), options: NSString.DrawingOptions(rawValue: 3), attributes: attributes).size
-        size = CGSize(width: size.width, height: size.height + 30)
-        
-        popover.behavior = .transient
-        popover.setValue(true, forKey: "shouldHideAnchor")
-        popover.contentViewController = NSViewController()
-        popover.contentViewController?.view = NSView(frame: NSRect(x: 0, y: 0, width: size.width, height: size.height))
-        popover.contentViewController?.view.wantsLayer = true
-        popover.contentViewController?.view.layer?.backgroundColor = NSColor(hex:"#000000").cgColor
-        
-        let textField = NSTextField(frame: NSRect(x: 16, y: 8, width: size.width - 32, height: size.height - 16))
-        textField.attributedStringValue = NSMutableAttributedString(string: NSLocalizedString(string as String, comment: ""), attributes: attributes)
-        textField.backgroundColor(NSColor(hex: "#000000"))
-        textField.drawsBackground = false
-        textField.isEditable = false
-        textField.isSelectable = false
-        textField.lineBreakMode = .byCharWrapping
-        textField.textColor = NSColor(hex: "#FFFFFF")
-        
-        popover.contentViewController?.view.addSubview(textField)
-    }
-    
-    @objc func showPopover(_ sender: Any?) {
-        if popover.isShown {
-            popover.performClose(sender)
-        } else {
-            self.setupPopover()
-            let button = sender as? NSButton
-            popover.show(relativeTo: button?.bounds ?? NSZeroRect, of: button ?? NSView(), preferredEdge: NSRectEdge.maxX)
-        }
-    }
 }
 
 extension KMSubscribeWaterMarkView: NSCollectionViewDataSource {
@@ -330,9 +214,9 @@ extension KMSubscribeWaterMarkView: NSCollectionViewDelegateFlowLayout {
         let paragraphStyle = NSMutableParagraphStyle()
         paragraphStyle.lineHeightMultiple = 1.32
         paragraphStyle.alignment = .left
-        let size: NSSize = string.boundingRect(with: NSSize(width: 356, height: 100), options: NSString.DrawingOptions(rawValue: 3), attributes: [NSAttributedString.Key.font : NSFont.SFProTextSemibold(14), NSAttributedString.Key.paragraphStyle : paragraphStyle]).size
-        let subtitleSize: NSSize = subtitleString.boundingRect(with: NSSize(width: 356, height: 100), options: NSString.DrawingOptions(rawValue: 3), attributes: [NSAttributedString.Key.font : NSFont.SFProTextRegular(12), NSAttributedString.Key.paragraphStyle : paragraphStyle]).size
-        return NSSize(width: 400, height: max(66, size.height + subtitleSize.height + 4))
+        let size: NSSize = string.boundingRect(with: NSSize(width: 250, height: 100), options: NSString.DrawingOptions(rawValue: 3), attributes: [NSAttributedString.Key.font : NSFont.SFProTextSemibold(14), NSAttributedString.Key.paragraphStyle : paragraphStyle]).size
+        let subtitleSize: NSSize = subtitleString.boundingRect(with: NSSize(width: 250, height: 100), options: NSString.DrawingOptions(rawValue: 3), attributes: [NSAttributedString.Key.font : NSFont.SFProTextRegular(12), NSAttributedString.Key.paragraphStyle : paragraphStyle]).size
+        return NSSize(width: 324, height: max(66, size.height + subtitleSize.height + 4))
     }
 
     public func collectionView(_ collectionView: NSCollectionView, layout collectionViewLayout: NSCollectionViewLayout, insetForSectionAt section: Int) -> NSEdgeInsets {

+ 86 - 158
PDF Office/PDF Master/Class/KMLightMember/Controller/SubscriptionView/WaterMark/View/KMSubscribeWaterMarkView.xib

@@ -10,33 +10,28 @@
             <connections>
                 <outlet property="closeBox" destination="msn-nQ-xqN" id="QFo-LV-8P3"/>
                 <outlet property="closeButton" destination="bTN-v2-Eaj" id="h2L-kr-Gi9"/>
+                <outlet property="collectionContentViewHeightConstraint" destination="7MQ-oW-O1o" id="Hln-jO-fcD"/>
                 <outlet property="collectionView" destination="G8e-lU-M2R" id="Unt-cd-UZq"/>
-                <outlet property="discountImageView" destination="XJT-Av-tgl" id="sML-AH-cZs"/>
-                <outlet property="infoButton" destination="pVA-do-evZ" id="Ty6-pe-Nfj"/>
-                <outlet property="lineView" destination="gPv-qb-Uay" id="6ri-1C-OKN"/>
-                <outlet property="lineView2" destination="LML-4i-B6h" id="gD3-po-5lk"/>
-                <outlet property="preferentialImageTrailingConst" destination="bCN-ta-Soy" id="QW8-tJ-0FR"/>
-                <outlet property="privacyPolicyButton" destination="JH7-7U-TMR" id="gqQ-fP-rw6"/>
-                <outlet property="restoreButton" destination="2p2-EB-ZME" id="4dk-gE-x5C"/>
+                <outlet property="collectionViewContentTopConstraint" destination="1nd-N2-IpE" id="J1u-9e-WUO"/>
+                <outlet property="lineView" destination="FOh-IP-TS8" id="bZg-wu-WLa"/>
                 <outlet property="scrollView" destination="iQs-EU-LBJ" id="bId-Pc-Y9u"/>
-                <outlet property="subTrailingConst" destination="q02-dr-aPM" id="hap-0b-Mte"/>
-                <outlet property="subWidthConst" destination="Waq-d7-0Ra" id="4iZ-sH-JOh"/>
-                <outlet property="subscribeBox" destination="Vzt-oq-0J5" id="Y8y-zX-L6E"/>
-                <outlet property="subscribeLabel" destination="Ek9-Vy-Rri" id="1Uo-E7-TwG"/>
-                <outlet property="subscribeView" destination="ydd-9k-uWl" id="JyA-m8-7cw"/>
-                <outlet property="termsServiceButton" destination="qqD-Zc-d0K" id="GTi-vz-7Pw"/>
+                <outlet property="subscribeBox" destination="3EV-Lt-ZXO" id="Jg8-D5-UYE"/>
+                <outlet property="subscribeLabel" destination="a4m-EO-i32" id="VHn-E2-Ze2"/>
+                <outlet property="subscribeView" destination="zsU-gX-vjE" id="rOk-hB-ChE"/>
+                <outlet property="subtitleContentHeightConstraint" destination="K87-HL-fyQ" id="9vH-er-DyI"/>
+                <outlet property="subtitleLabel" destination="gOH-TM-kj5" id="PUW-kM-4ov"/>
                 <outlet property="titleLabel" destination="2cQ-02-iHc" id="tqt-eV-spv"/>
-                <outlet property="waterExportButton" destination="2l4-AW-3dk" id="75f-ap-dwK"/>
+                <outlet property="waterExportButton" destination="ki6-ve-E1f" id="jDF-Sk-8rV"/>
             </connections>
         </customObject>
         <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
         <customObject id="-3" userLabel="Application" customClass="NSObject"/>
         <customView id="c22-O7-iKe">
-            <rect key="frame" x="0.0" y="0.0" width="448" height="511"/>
+            <rect key="frame" x="0.0" y="0.0" width="380" height="505"/>
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
             <subviews>
                 <customView translatesAutoresizingMaskIntoConstraints="NO" id="q0v-nJ-k2O">
-                    <rect key="frame" x="0.0" y="483" width="448" height="28"/>
+                    <rect key="frame" x="0.0" y="477" width="380" height="28"/>
                     <subviews>
                         <box boxType="custom" borderWidth="0.0" cornerRadius="4" translatesAutoresizingMaskIntoConstraints="NO" id="msn-nQ-xqN" customClass="KMBox" customModule="PDF_Master" customModuleProvider="target">
                             <rect key="frame" x="8" y="8" width="12" height="12"/>
@@ -72,64 +67,8 @@
                         <constraint firstAttribute="height" constant="28" id="aEs-a0-QaM"/>
                     </constraints>
                 </customView>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="VuL-Zv-RS7">
-                    <rect key="frame" x="24" y="117" width="400" height="40"/>
-                    <subviews>
-                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="2l4-AW-3dk">
-                            <rect key="frame" x="0.0" y="0.0" width="192" height="40"/>
-                            <constraints>
-                                <constraint firstAttribute="width" constant="192" id="I32-Vf-pIP"/>
-                                <constraint firstAttribute="height" constant="40" id="iRU-jD-Beh"/>
-                            </constraints>
-                            <buttonCell key="cell" type="square" title="Save with Watermark" bezelStyle="shadowlessSquare" alignment="center" imageScaling="proportionallyDown" inset="2" id="Snj-A2-m7D">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
-                            <connections>
-                                <action selector="waterMarkExportButtonAction:" target="-2" id="llL-WB-5pe"/>
-                            </connections>
-                        </button>
-                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="ydd-9k-uWl">
-                            <rect key="frame" x="208" y="0.0" width="192" height="40"/>
-                            <subviews>
-                                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Ek9-Vy-Rri">
-                                    <rect key="frame" x="76" y="12" width="41" height="16"/>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" enabled="NO" alignment="center" title="Label" id="3bl-Ip-1uL">
-                                        <font key="font" metaFont="system"/>
-                                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                    </textFieldCell>
-                                </textField>
-                                <box boxType="custom" borderWidth="0.0" cornerRadius="4" translatesAutoresizingMaskIntoConstraints="NO" id="Vzt-oq-0J5" customClass="KMBox" customModule="PDF_Master" customModuleProvider="target">
-                                    <rect key="frame" x="0.0" y="0.0" width="192" height="40"/>
-                                    <view key="contentView" id="br7-Zx-Dz0">
-                                        <rect key="frame" x="0.0" y="0.0" width="192" height="40"/>
-                                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                                    </view>
-                                </box>
-                            </subviews>
-                            <constraints>
-                                <constraint firstAttribute="bottom" secondItem="Vzt-oq-0J5" secondAttribute="bottom" id="9ao-KM-gev"/>
-                                <constraint firstAttribute="trailing" secondItem="Vzt-oq-0J5" secondAttribute="trailing" id="C4o-V4-0GQ"/>
-                                <constraint firstAttribute="height" constant="40" id="DCY-rK-0ar"/>
-                                <constraint firstItem="Ek9-Vy-Rri" firstAttribute="centerY" secondItem="ydd-9k-uWl" secondAttribute="centerY" id="Orq-pn-gua"/>
-                                <constraint firstAttribute="width" constant="192" id="Waq-d7-0Ra"/>
-                                <constraint firstItem="Ek9-Vy-Rri" firstAttribute="centerX" secondItem="ydd-9k-uWl" secondAttribute="centerX" id="mC6-Hh-zq4"/>
-                                <constraint firstItem="Vzt-oq-0J5" firstAttribute="leading" secondItem="ydd-9k-uWl" secondAttribute="leading" id="ofW-xv-j69"/>
-                                <constraint firstItem="Vzt-oq-0J5" firstAttribute="top" secondItem="ydd-9k-uWl" secondAttribute="top" id="urc-qJ-7Wk"/>
-                            </constraints>
-                        </customView>
-                    </subviews>
-                    <constraints>
-                        <constraint firstItem="ydd-9k-uWl" firstAttribute="top" secondItem="VuL-Zv-RS7" secondAttribute="top" id="Gkk-kI-2Th"/>
-                        <constraint firstAttribute="height" constant="40" id="PTO-gm-e1C"/>
-                        <constraint firstItem="2l4-AW-3dk" firstAttribute="leading" secondItem="VuL-Zv-RS7" secondAttribute="leading" id="Rgr-E0-9mc"/>
-                        <constraint firstAttribute="trailing" secondItem="ydd-9k-uWl" secondAttribute="trailing" id="q02-dr-aPM"/>
-                        <constraint firstItem="2l4-AW-3dk" firstAttribute="centerY" secondItem="VuL-Zv-RS7" secondAttribute="centerY" id="zlT-DN-jqV"/>
-                    </constraints>
-                </customView>
                 <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="2cQ-02-iHc">
-                    <rect key="frame" x="157" y="455" width="134" height="16"/>
+                    <rect key="frame" x="123" y="449" width="134" height="16"/>
                     <textFieldCell key="cell" lineBreakMode="clipping" title="Subscription Benefits" id="5tK-VQ-29f">
                         <font key="font" usesAppearanceFont="YES"/>
                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -137,16 +76,16 @@
                     </textFieldCell>
                 </textField>
                 <customView translatesAutoresizingMaskIntoConstraints="NO" id="MG4-H3-ZA1">
-                    <rect key="frame" x="24" y="189" width="400" height="238"/>
+                    <rect key="frame" x="28" y="153" width="324" height="180"/>
                     <subviews>
                         <scrollView wantsLayer="YES" borderType="none" autohidesScrollers="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iQs-EU-LBJ">
-                            <rect key="frame" x="0.0" y="0.0" width="400" height="238"/>
+                            <rect key="frame" x="0.0" y="0.0" width="324" height="180"/>
                             <clipView key="contentView" drawsBackground="NO" id="k4V-l0-a8F">
-                                <rect key="frame" x="0.0" y="0.0" width="400" height="238"/>
+                                <rect key="frame" x="0.0" y="0.0" width="324" height="180"/>
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                 <subviews>
                                     <collectionView id="G8e-lU-M2R">
-                                        <rect key="frame" x="0.0" y="0.0" width="400" height="238"/>
+                                        <rect key="frame" x="0.0" y="0.0" width="324" height="180"/>
                                         <autoresizingMask key="autoresizingMask" widthSizable="YES"/>
                                         <collectionViewFlowLayout key="collectionViewLayout" minimumInteritemSpacing="10" minimumLineSpacing="10" id="1Gk-3q-zuH">
                                             <size key="itemSize" width="50" height="50"/>
@@ -160,127 +99,116 @@
                                 <rect key="frame" x="-100" y="-100" width="233" height="15"/>
                                 <autoresizingMask key="autoresizingMask"/>
                             </scroller>
-                            <scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="ftN-5U-Bpz">
+                            <scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="ftN-5U-Bpz">
                                 <rect key="frame" x="-100" y="-100" width="15" height="143"/>
                                 <autoresizingMask key="autoresizingMask"/>
                             </scroller>
                         </scrollView>
                     </subviews>
                     <constraints>
-                        <constraint firstAttribute="height" constant="238" id="7MQ-oW-O1o"/>
+                        <constraint firstAttribute="height" constant="180" id="7MQ-oW-O1o"/>
                         <constraint firstItem="iQs-EU-LBJ" firstAttribute="top" secondItem="MG4-H3-ZA1" secondAttribute="top" id="b42-mD-4Bn"/>
                         <constraint firstItem="iQs-EU-LBJ" firstAttribute="leading" secondItem="MG4-H3-ZA1" secondAttribute="leading" id="gLt-1u-l6X"/>
                         <constraint firstAttribute="bottom" secondItem="iQs-EU-LBJ" secondAttribute="bottom" id="gt2-pE-Slt"/>
                         <constraint firstAttribute="trailing" secondItem="iQs-EU-LBJ" secondAttribute="trailing" id="qHN-wN-lcX"/>
                     </constraints>
                 </customView>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="dGs-Lg-ZgQ">
-                    <rect key="frame" x="24" y="24" width="266" height="20"/>
+                <customView translatesAutoresizingMaskIntoConstraints="NO" id="Ja4-Z7-bde">
+                    <rect key="frame" x="28" y="353" width="324" height="80"/>
                     <subviews>
-                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="pVA-do-evZ">
-                            <rect key="frame" x="0.0" y="2" width="16" height="16"/>
+                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gOH-TM-kj5">
+                            <rect key="frame" x="6" y="16" width="312" height="64"/>
+                            <textFieldCell key="cell" alignment="center" id="IIZ-dr-HjX">
+                                <font key="font" usesAppearanceFont="YES"/>
+                                <string key="title">You are currently a trial version. When you perform the save operation, the file will be saved and the PDF Master official trial watermark will be added.</string>
+                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                            </textFieldCell>
+                        </textField>
+                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="FOh-IP-TS8">
+                            <rect key="frame" x="0.0" y="0.0" width="324" height="1"/>
                             <constraints>
-                                <constraint firstAttribute="width" constant="16" id="ItC-YF-e22"/>
-                                <constraint firstAttribute="height" constant="16" id="yVZ-ec-zoN"/>
-                            </constraints>
-                            <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="icon_info" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="gAd-wD-Qb3">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
-                            <connections>
-                                <action selector="infoButtonAction:" target="-2" id="SAF-OU-H6e"/>
-                            </connections>
-                        </button>
-                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="JH7-7U-TMR">
-                            <rect key="frame" x="24" y="2" width="88" height="16"/>
-                            <buttonCell key="cell" type="square" title="Privacy Policy" bezelStyle="shadowlessSquare" alignment="center" imageScaling="proportionallyDown" inset="2" id="3tp-h0-oPz">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
-                            <connections>
-                                <action selector="privacyPolicyButtonAction:" target="-2" id="Fbt-bq-SnV"/>
-                            </connections>
-                        </button>
-                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="qqD-Zc-d0K">
-                            <rect key="frame" x="129" y="2" width="106" height="16"/>
-                            <buttonCell key="cell" type="square" title="Terms of Service" bezelStyle="shadowlessSquare" alignment="center" imageScaling="proportionallyDown" inset="2" id="BPv-Rv-ubD">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
-                            <connections>
-                                <action selector="termsServiceButtonAction:" target="-2" id="ryg-bz-bRm"/>
-                            </connections>
-                        </button>
-                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="LML-4i-B6h">
-                            <rect key="frame" x="120" y="2" width="1" height="16"/>
-                            <constraints>
-                                <constraint firstAttribute="width" constant="1" id="Bba-r0-lUd"/>
-                                <constraint firstAttribute="height" constant="16" id="IMW-bh-TTs"/>
+                                <constraint firstAttribute="height" constant="1" id="P0i-AM-sJN"/>
                             </constraints>
                         </customView>
                     </subviews>
                     <constraints>
-                        <constraint firstItem="pVA-do-evZ" firstAttribute="leading" secondItem="dGs-Lg-ZgQ" secondAttribute="leading" id="CBF-pD-2R8"/>
-                        <constraint firstItem="LML-4i-B6h" firstAttribute="centerY" secondItem="dGs-Lg-ZgQ" secondAttribute="centerY" id="KOf-50-Pex"/>
-                        <constraint firstItem="qqD-Zc-d0K" firstAttribute="leading" secondItem="LML-4i-B6h" secondAttribute="trailing" constant="8" id="Lnj-0I-T0j"/>
-                        <constraint firstItem="pVA-do-evZ" firstAttribute="centerY" secondItem="dGs-Lg-ZgQ" secondAttribute="centerY" id="VWl-rl-eIG"/>
-                        <constraint firstAttribute="height" constant="20" id="ibD-Sm-7fX"/>
-                        <constraint firstItem="JH7-7U-TMR" firstAttribute="leading" secondItem="pVA-do-evZ" secondAttribute="trailing" constant="8" id="jwI-9v-Eqy"/>
-                        <constraint firstItem="qqD-Zc-d0K" firstAttribute="centerY" secondItem="dGs-Lg-ZgQ" secondAttribute="centerY" id="liN-vg-MgY"/>
-                        <constraint firstItem="JH7-7U-TMR" firstAttribute="centerY" secondItem="dGs-Lg-ZgQ" secondAttribute="centerY" id="oMB-lg-nih"/>
-                        <constraint firstItem="LML-4i-B6h" firstAttribute="leading" secondItem="JH7-7U-TMR" secondAttribute="trailing" constant="8" id="uxt-X4-3GN"/>
+                        <constraint firstItem="gOH-TM-kj5" firstAttribute="top" secondItem="Ja4-Z7-bde" secondAttribute="top" id="J7i-aX-LIu"/>
+                        <constraint firstAttribute="height" constant="80" id="K87-HL-fyQ"/>
+                        <constraint firstItem="FOh-IP-TS8" firstAttribute="leading" secondItem="Ja4-Z7-bde" secondAttribute="leading" id="Rwz-0E-Zj1"/>
+                        <constraint firstItem="gOH-TM-kj5" firstAttribute="leading" secondItem="Ja4-Z7-bde" secondAttribute="leading" constant="8" id="T6O-zG-DYq"/>
+                        <constraint firstAttribute="width" constant="324" id="dFa-YB-Dgm"/>
+                        <constraint firstAttribute="bottom" secondItem="FOh-IP-TS8" secondAttribute="bottom" id="in1-PL-P05"/>
+                        <constraint firstAttribute="trailing" secondItem="gOH-TM-kj5" secondAttribute="trailing" constant="8" id="vhi-7b-oQH"/>
+                        <constraint firstAttribute="trailing" secondItem="FOh-IP-TS8" secondAttribute="trailing" id="z4M-RT-EKq"/>
                     </constraints>
                 </customView>
-                <customView translatesAutoresizingMaskIntoConstraints="NO" id="gPv-qb-Uay">
-                    <rect key="frame" x="24" y="68" width="400" height="1"/>
+                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ki6-ve-E1f">
+                    <rect key="frame" x="28" y="32" width="324" height="40"/>
                     <constraints>
-                        <constraint firstAttribute="height" constant="1" id="fUx-Zc-744"/>
+                        <constraint firstAttribute="height" constant="40" id="1vq-qG-C1N"/>
                     </constraints>
-                </customView>
-                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="2p2-EB-ZME">
-                    <rect key="frame" x="306" y="26" width="118" height="16"/>
-                    <buttonCell key="cell" type="square" title="Restore Purchases" bezelStyle="shadowlessSquare" alignment="center" imageScaling="proportionallyDown" inset="2" id="1zx-IL-Omm">
+                    <buttonCell key="cell" type="square" title="Watermark Saving" bezelStyle="shadowlessSquare" alignment="center" imageScaling="proportionallyDown" inset="2" id="bo3-42-gLB">
                         <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                         <font key="font" metaFont="system"/>
                     </buttonCell>
                     <connections>
-                        <action selector="restoreButtonAction:" target="-2" id="lGs-Jz-RWV"/>
+                        <action selector="waterMarkExportButtonAction:" target="-2" id="Jkp-G7-45m"/>
                     </connections>
                 </button>
-                <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="XJT-Av-tgl">
-                    <rect key="frame" x="349" y="147" width="67" height="20"/>
-                    <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="Badge 1" id="3cp-vp-3MC"/>
-                </imageView>
+                <customView translatesAutoresizingMaskIntoConstraints="NO" id="zsU-gX-vjE">
+                    <rect key="frame" x="28" y="88" width="324" height="40"/>
+                    <subviews>
+                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="a4m-EO-i32">
+                            <rect key="frame" x="144" y="12" width="37" height="16"/>
+                            <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="oDQ-wf-pIe">
+                                <font key="font" usesAppearanceFont="YES"/>
+                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                            </textFieldCell>
+                        </textField>
+                        <box boxType="custom" borderWidth="0.0" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="3EV-Lt-ZXO" customClass="KMBox" customModule="PDF_Master" customModuleProvider="target">
+                            <rect key="frame" x="0.0" y="0.0" width="324" height="40"/>
+                            <view key="contentView" id="Ajf-rl-zqg">
+                                <rect key="frame" x="0.0" y="0.0" width="324" height="40"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                            </view>
+                        </box>
+                    </subviews>
+                    <constraints>
+                        <constraint firstItem="a4m-EO-i32" firstAttribute="centerX" secondItem="zsU-gX-vjE" secondAttribute="centerX" id="1IX-89-e0g"/>
+                        <constraint firstAttribute="trailing" secondItem="3EV-Lt-ZXO" secondAttribute="trailing" id="Gqk-JG-CYW"/>
+                        <constraint firstAttribute="bottom" secondItem="3EV-Lt-ZXO" secondAttribute="bottom" id="RRE-et-RZW"/>
+                        <constraint firstItem="3EV-Lt-ZXO" firstAttribute="leading" secondItem="zsU-gX-vjE" secondAttribute="leading" id="RnW-8b-zE0"/>
+                        <constraint firstAttribute="height" constant="40" id="Y7i-Kj-Zw4"/>
+                        <constraint firstItem="3EV-Lt-ZXO" firstAttribute="top" secondItem="zsU-gX-vjE" secondAttribute="top" id="g35-yO-W4e"/>
+                        <constraint firstItem="a4m-EO-i32" firstAttribute="centerY" secondItem="zsU-gX-vjE" secondAttribute="centerY" id="nfp-RI-pcL"/>
+                    </constraints>
+                </customView>
             </subviews>
             <constraints>
-                <constraint firstAttribute="trailing" secondItem="gPv-qb-Uay" secondAttribute="trailing" constant="24" id="9tM-n1-I3e"/>
+                <constraint firstItem="MG4-H3-ZA1" firstAttribute="top" secondItem="2cQ-02-iHc" secondAttribute="bottom" constant="116" id="1nd-N2-IpE"/>
+                <constraint firstItem="Ja4-Z7-bde" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="28" id="5v1-aH-ewg"/>
                 <constraint firstItem="2cQ-02-iHc" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" constant="40" id="GRL-zJ-hGD"/>
-                <constraint firstAttribute="trailing" secondItem="MG4-H3-ZA1" secondAttribute="trailing" constant="24" id="M8D-Go-2lU"/>
-                <constraint firstAttribute="trailing" secondItem="2p2-EB-ZME" secondAttribute="trailing" constant="24" id="MU7-Tu-ONd"/>
+                <constraint firstItem="ki6-ve-E1f" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="28" id="HdL-el-MI0"/>
+                <constraint firstItem="ki6-ve-E1f" firstAttribute="top" secondItem="zsU-gX-vjE" secondAttribute="bottom" constant="16" id="I4R-Ku-dLc"/>
+                <constraint firstAttribute="trailing" secondItem="MG4-H3-ZA1" secondAttribute="trailing" constant="28" id="M8D-Go-2lU"/>
+                <constraint firstAttribute="trailing" secondItem="ki6-ve-E1f" secondAttribute="trailing" constant="28" id="PJV-Yt-tG7"/>
                 <constraint firstItem="2cQ-02-iHc" firstAttribute="centerX" secondItem="c22-O7-iKe" secondAttribute="centerX" id="Tab-Sj-Pk5"/>
                 <constraint firstItem="q0v-nJ-k2O" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" id="Vaq-qD-AWK"/>
-                <constraint firstItem="MG4-H3-ZA1" firstAttribute="top" secondItem="2cQ-02-iHc" secondAttribute="bottom" constant="28" id="b7P-GP-azS"/>
-                <constraint firstAttribute="trailing" secondItem="XJT-Av-tgl" secondAttribute="trailing" constant="32" id="bCN-ta-Soy"/>
-                <constraint firstItem="VuL-Zv-RS7" firstAttribute="top" secondItem="MG4-H3-ZA1" secondAttribute="bottom" constant="32" id="d0G-5e-1S6"/>
-                <constraint firstItem="dGs-Lg-ZgQ" firstAttribute="top" secondItem="gPv-qb-Uay" secondAttribute="bottom" constant="24" id="eo9-px-UHL"/>
-                <constraint firstAttribute="bottom" secondItem="dGs-Lg-ZgQ" secondAttribute="bottom" constant="24" id="fFZ-3k-ufi"/>
-                <constraint firstItem="gPv-qb-Uay" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="24" id="hzc-Uz-uYl"/>
-                <constraint firstItem="VuL-Zv-RS7" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="24" id="k7X-tB-pMq"/>
-                <constraint firstItem="2p2-EB-ZME" firstAttribute="leading" secondItem="dGs-Lg-ZgQ" secondAttribute="trailing" constant="16" id="kXp-ze-WrI"/>
-                <constraint firstItem="MG4-H3-ZA1" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="24" id="mY1-qU-Bkt"/>
+                <constraint firstItem="Ja4-Z7-bde" firstAttribute="top" secondItem="2cQ-02-iHc" secondAttribute="bottom" constant="16" id="XOd-vi-3Iz"/>
+                <constraint firstItem="MG4-H3-ZA1" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="28" id="mY1-qU-Bkt"/>
                 <constraint firstAttribute="trailing" secondItem="q0v-nJ-k2O" secondAttribute="trailing" id="pkz-AD-sVC"/>
-                <constraint firstItem="2p2-EB-ZME" firstAttribute="centerY" secondItem="dGs-Lg-ZgQ" secondAttribute="centerY" id="wTQ-gG-oqy"/>
-                <constraint firstAttribute="trailing" secondItem="VuL-Zv-RS7" secondAttribute="trailing" constant="24" id="y9S-AD-nI1"/>
-                <constraint firstItem="ydd-9k-uWl" firstAttribute="top" secondItem="XJT-Av-tgl" secondAttribute="bottom" constant="-10" id="yhM-Fo-7H2"/>
+                <constraint firstItem="zsU-gX-vjE" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="28" id="sYP-io-kre"/>
+                <constraint firstAttribute="bottom" secondItem="ki6-ve-E1f" secondAttribute="bottom" constant="32" id="wXu-Y4-WdH"/>
+                <constraint firstAttribute="trailing" secondItem="zsU-gX-vjE" secondAttribute="trailing" constant="28" id="ycZ-kq-u6R"/>
                 <constraint firstItem="q0v-nJ-k2O" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" id="yuk-XJ-HQQ"/>
-                <constraint firstItem="dGs-Lg-ZgQ" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="24" id="zCu-1e-SEa"/>
+                <constraint firstAttribute="trailing" secondItem="Ja4-Z7-bde" secondAttribute="trailing" constant="28" id="zRX-3e-H6f"/>
             </constraints>
             <point key="canvasLocation" x="-265" y="-248.5"/>
         </customView>
     </objects>
     <resources>
-        <image name="Badge 1" width="67" height="20"/>
         <image name="control_btn_icon_close" width="12" height="12"/>
-        <image name="icon_info" width="16" height="16"/>
     </resources>
 </document>

+ 17 - 6
PDF Office/PDF Master/Class/Merge/OCPart/KMPDFEditAppendWindow.xib

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
         <capability name="Named colors" minToolsVersion="9.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -333,25 +333,25 @@
                                         <constraint firstAttribute="height" constant="22" id="5bY-aF-fW3"/>
                                     </constraints>
                                 </customView>
-                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="5nS-LC-t5H" customClass="KMImageTitleButton" customModule="PDF_Office" customModuleProvider="target">
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="5nS-LC-t5H" customClass="KMImageTitleButton" customModule="PDF_Master" customModuleProvider="target">
                                     <rect key="frame" x="16" y="504" width="45" height="22"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="22" id="iSV-P3-W8x"/>
                                     </constraints>
                                 </customView>
-                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="85P-Ad-bEf" customClass="KMImageTitleButton" customModule="PDF_Office" customModuleProvider="target">
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="85P-Ad-bEf" customClass="KMImageTitleButton" customModule="PDF_Master" customModuleProvider="target">
                                     <rect key="frame" x="16" y="474" width="45" height="22"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="22" id="Ubd-is-gcz"/>
                                     </constraints>
                                 </customView>
-                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="PNC-MR-g6W" customClass="KMImageTitleButton" customModule="PDF_Office" customModuleProvider="target">
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="PNC-MR-g6W" customClass="KMImageTitleButton" customModule="PDF_Master" customModuleProvider="target">
                                     <rect key="frame" x="16" y="444" width="45" height="22"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="22" id="cMH-MX-phe"/>
                                     </constraints>
                                 </customView>
-                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="ZDa-uQ-GtJ" customClass="KMImageTitleButton" customModule="PDF_Office" customModuleProvider="target">
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="ZDa-uQ-GtJ" customClass="KMImageTitleButton" customModule="PDF_Master" customModuleProvider="target">
                                     <rect key="frame" x="16" y="414" width="45" height="22"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="22" id="o0Q-lr-IX5"/>
@@ -487,18 +487,29 @@
                         </constraints>
                         <color key="fillColor" red="0.92156862750000001" green="0.92156862750000001" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                     </box>
+                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="0bJ-0I-xhY">
+                        <rect key="frame" x="187" y="16" width="343" height="32"/>
+                        <textFieldCell key="cell" alignment="left" title="Trial Version users can convert only 2 files at a time in batch processing." id="MSL-nN-D7Q">
+                            <font key="font" usesAppearanceFont="YES"/>
+                            <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                            <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                        </textFieldCell>
+                    </textField>
                 </subviews>
                 <constraints>
                     <constraint firstAttribute="trailing" secondItem="Gzx-57-4ok" secondAttribute="trailing" constant="16" id="1Ny-f2-6fJ"/>
                     <constraint firstAttribute="bottom" secondItem="HqV-Cr-IvX" secondAttribute="bottom" constant="16" id="3xl-pe-oik"/>
+                    <constraint firstItem="0bJ-0I-xhY" firstAttribute="centerY" secondItem="UA4-8E-ANK" secondAttribute="centerY" id="6T5-E7-H4H"/>
                     <constraint firstItem="SNg-B0-ys5" firstAttribute="leading" secondItem="7Ci-3J-z10" secondAttribute="trailing" id="72G-rH-m08"/>
                     <constraint firstItem="SNg-B0-ys5" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" id="EIV-N9-5mk"/>
                     <constraint firstAttribute="bottom" secondItem="Gzx-57-4ok" secondAttribute="bottom" constant="16" id="EaO-WC-Vov"/>
                     <constraint firstAttribute="bottom" secondItem="Ggk-eO-LzC" secondAttribute="bottom" constant="60" id="FmD-vC-lz3"/>
                     <constraint firstAttribute="bottom" secondItem="HUw-YH-0kd" secondAttribute="bottom" constant="16" id="GbC-8A-lSi"/>
                     <constraint firstItem="SNg-B0-ys5" firstAttribute="bottom" secondItem="se5-gp-TjO" secondAttribute="bottom" id="GbZ-tV-MXY"/>
+                    <constraint firstItem="0bJ-0I-xhY" firstAttribute="leading" secondItem="kXZ-gh-CUA" secondAttribute="trailing" constant="8" id="Kr6-kc-w9U"/>
                     <constraint firstItem="Ggk-eO-LzC" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" id="LEN-lk-9rV"/>
                     <constraint firstItem="HqV-Cr-IvX" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="16" id="Lia-zA-HV0"/>
+                    <constraint firstItem="HUw-YH-0kd" firstAttribute="leading" secondItem="0bJ-0I-xhY" secondAttribute="trailing" constant="8" id="YGQ-4K-bPj"/>
                     <constraint firstItem="Gzx-57-4ok" firstAttribute="leading" secondItem="HUw-YH-0kd" secondAttribute="trailing" constant="16" id="Z1N-QN-kcx"/>
                     <constraint firstAttribute="trailing" secondItem="SNg-B0-ys5" secondAttribute="trailing" id="d0q-Hn-baS"/>
                     <constraint firstItem="SNg-B0-ys5" firstAttribute="leading" secondItem="Ggk-eO-LzC" secondAttribute="trailing" constant="1" id="gNP-Dq-gpr"/>

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

@@ -2441,14 +2441,14 @@ extension KMMainViewController : KMMainToolbarControllerDelegate {
                     identifier = KMToolbarConversionImageItemIdentifier
                 }
                 
-                if await (KMLightMemberManager.manager.canUseAdvanced() == false) {
-                    if (identifier != nil) {
-                        self.toolbarController.cancelSelected(identifier!)
-                    }
-            
-                    let _ = KMComparativeTableViewController.show(window: self.view.window!, .convert)
-                    return
-                }
+//                if await (KMLightMemberManager.manager.canUseAdvanced() == false) {
+//                    if (identifier != nil) {
+//                        self.toolbarController.cancelSelected(identifier!)
+//                    }
+//
+//                    let _ = KMComparativeTableViewController.show(window: self.view.window!, .convert)
+//                    return
+//                }
                 
                 if await (KMLightMemberManager.manager.canPayFunction() == false) {
                     let _ = KMSubscribeWaterMarkWindowController.show(window: self.view.window!, isContinue: true, type: type.toSubscribeWaterMarkType()) { isSubscribeSuccess, isWaterMarkExport, isClose in
@@ -2567,35 +2567,35 @@ extension KMMainViewController : KMMainToolbarControllerDelegate {
                     return
                 }
                 
-                if await (KMLightMemberManager.manager.canPayFunction() == false) {
-                    let _ = KMSubscribeWaterMarkWindowController.show(window: self.view.window!, isContinue: true, type: .merge) { isSubscribeSuccess, isWaterMarkExport, isClose in
-                        if (isClose) {
-                            return
-                        }
-                        if (isSubscribeSuccess) {
-                            self.showMergeWindow(self.listView.document.password)
-                            return
-                        }
-                        if (isWaterMarkExport) {
-                            DispatchQueue.main.async {
-                                NSPanel.savePanel(self.view.window!, panel:{ panel in
-                                    panel.directoryURL = self.document?.documentURL.deletingLastPathComponent()
-                                    panel.nameFieldStringValue = (self.document?.documentURL.lastPathComponent)!
-                                }) { response, url in
-                                    if (response == .cancel) {
-                                        return
-                                    }
-                                    guard let _url = KMTools.saveWatermarkDocument(document: self.document!, to: url!, secureOptions: self.secureOptions, removePWD: self.removeSecureFlag) else {
-                                        return
-                                    }
-                                    self.showMergeWindow(url: _url, self.listView.document.password)
-                                }
-                            }
-                            return
-                        }
-                    }
-                    return
-                }
+//                if await (KMLightMemberManager.manager.canPayFunction() == false) {
+//                    let _ = KMSubscribeWaterMarkWindowController.show(window: self.view.window!, isContinue: true, type: .merge) { isSubscribeSuccess, isWaterMarkExport, isClose in
+//                        if (isClose) {
+//                            return
+//                        }
+//                        if (isSubscribeSuccess) {
+//                            self.showMergeWindow(self.listView.document.password)
+//                            return
+//                        }
+//                        if (isWaterMarkExport) {
+//                            DispatchQueue.main.async {
+//                                NSPanel.savePanel(self.view.window!, panel:{ panel in
+//                                    panel.directoryURL = self.document?.documentURL.deletingLastPathComponent()
+//                                    panel.nameFieldStringValue = (self.document?.documentURL.lastPathComponent)!
+//                                }) { response, url in
+//                                    if (response == .cancel) {
+//                                        return
+//                                    }
+//                                    guard let _url = KMTools.saveWatermarkDocument(document: self.document!, to: url!, secureOptions: self.secureOptions, removePWD: self.removeSecureFlag) else {
+//                                        return
+//                                    }
+//                                    self.showMergeWindow(url: _url, self.listView.document.password)
+//                                }
+//                            }
+//                            return
+//                        }
+//                    }
+//                    return
+//                }
                 
                 if (self.needSaveDocument()) {
                     self.saveDocumentWithProgressAlert { [unowned self] params in

File diff suppressed because it is too large
+ 19 - 0
PDF Office/PDF Master/Strings/en.lproj/Localizable.strings