소스 검색

Merge branch 'develop_2025' of git.kdan.cc:Mac_PDF/PDF_Office into develop_2025

tangchao 4 달 전
부모
커밋
dfb4b31496
15개의 변경된 파일76개의 추가작업 그리고 2168개의 파일을 삭제
  1. 1 29
      PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift
  2. 0 986
      PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Background/Background/View/KMAddBackgroundView.swift
  3. 0 638
      PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Background/Background/View/KMAddBackgroundView.xib
  4. 0 233
      PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Background/Background/View/KMBackgroundColorView.swift
  5. 0 21
      PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Background/Background/View/KMBackgroundListCell.swift
  6. 0 31
      PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Background/Background/View/KMBackgroundOutsideView.swift
  7. 0 42
      PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Background/Background/View/KMBackgroundWindowController.swift
  8. 0 43
      PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Background/Background/View/KMBackgroundWindowController.xib
  9. 2 54
      PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Watermark/Controller/KMBatchOperateAddWatermarkViewController.swift
  10. 2 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Watermark/New/KMWatermarkController.swift
  11. 8 3
      PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Watermark/New/Views/KMNWatermarkPropertyController.swift
  12. 6 5
      PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Watermark/New/Views/Templates/KMNWatermarkTemplateItem.swift
  13. 41 19
      PDF Office/PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift
  14. 0 64
      PDF Office/PDF Reader Pro.xcodeproj/project.pbxproj
  15. 16 0
      PDF Office/PDF Reader Pro.xcodeproj/xcuserdata/kdanmobile.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

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

@@ -3928,21 +3928,7 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
                 }
                 
                 if index == 1 {
-                    let controller = KMBackgroundWindowController(windowNibName: "KMBackgroundWindowController")
-                    self.currentWindowController = controller
-                    controller.pdfDocument = self.document
-                    
-                    controller.cancelAction = { [unowned self] controller in
-                        self.view.window?.endSheet((self.currentWindowController.window)!)
-                        self.currentWindowController = nil
-                    }
-                    
-                    controller.operateCallBack = { [unowned self] controller, background, countType in
-                        let fpath = self.document?.documentURL?.path ?? ""
-                        self.showBatchWindow(type: .AddBackground, filepaths: [fpath])
-                    }
-                    
-                    await NSWindow.currentWindow().beginSheet(controller.window!)
+                     
                 } else if index == 2 {
                     guard let document = self.document else { return }
                     
@@ -3965,20 +3951,6 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
                     savePanel.beginSheetModal(for: NSApp.mainWindow!) { result in
                         guard result == .OK else { return }
                         
-                        KMAddBackgroundView.saveAsPDFRemoveAllBackground(PDFDocument: document, password: document.password, toPath: savePanel.url!.path, completionHandler: { [unowned self] success in
-                            if success == 1 {
-                                if savePanel.url?.path == self.listView.document?.documentURL.path {
-                                    self.setDocument = CPDFDocument(url: savePanel.url!)
-                                    return
-                                }
-                                
-                                if savePanelAccessoryViewController.openAutomaticButton.state == .on {
-                                    NSDocumentController.shared.openDocument(withContentsOf: savePanel.url!, display: true) { _, _, _ in }
-                                } else {
-                                    NSWorkspace.shared.selectFile(savePanel.url!.path, inFileViewerRootedAtPath: "")
-                                }
-                            }
-                        })
                     }
                 } else if index == 3 {
                     let fpath = self.document?.documentURL?.path ?? ""

+ 0 - 986
PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Background/Background/View/KMAddBackgroundView.swift

@@ -1,986 +0,0 @@
-//
-//  KMAddBackgroundView.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/11/14.
-//
-
-import Cocoa
-
-enum KMBackgroundManagerType: Int {
-    case add = 0
-    case edit
-    case use
-}
-
-typealias KMAddBackgroundViewOperateCallBack = (_ background: KMBackgroundModel, _ countType: Int) -> ()
-typealias KMAddBackgroundViewBatchAction = (_ view: KMAddBackgroundView, _ files: [KMFileAttribute]) -> Void
-typealias KMAddBackgroundViewCancelAction = (_ view: KMAddBackgroundView) -> Void
-
-class KMAddBackgroundView: BaseXibView, NSComboBoxDelegate {
-    
-    @IBOutlet weak var pdfView: KMWatermarkPDFView!
-    @IBOutlet weak var previousButton: NSButton!
-    @IBOutlet weak var nextButton: NSButton!
-    @IBOutlet weak var currentPageIndexTextField: NSTextField!
-    @IBOutlet weak var totalPageCountlabel: NSTextField!
-    
-    @IBOutlet weak var typeBox: NSBox!
-    @IBOutlet weak var colorButton: NSButton!
-    @IBOutlet weak var colorWell: NSColorWell!
-    @IBOutlet weak var fileButton: NSButton!
-    
-    @IBOutlet weak var filePathLabel: NSTextField!
-    @IBOutlet weak var browseButton: NSButton!
-    @IBOutlet weak var ratioLabel: NSTextField!
-    @IBOutlet weak var ratioTextField: NSTextField!
-    @IBOutlet weak var ratioStepper: NSStepper!
-    
-    @IBOutlet weak var appearanceBox: NSBox!
-    @IBOutlet weak var angleLabel: NSTextField!
-    @IBOutlet weak var angleTextField: NSTextField!
-    @IBOutlet weak var angleStepper: NSStepper!
-    @IBOutlet weak var left45IndicateView: KMAngleIndicateView!
-    @IBOutlet weak var horizontalIndicateView: KMAngleIndicateView!
-    @IBOutlet weak var right45IndicateView: KMAngleIndicateView!
-    @IBOutlet weak var alphaLabel: NSTextField!
-    @IBOutlet weak var alphaSlider: NSSlider!
-    @IBOutlet weak var alphaTextField: NSTextField!
-    @IBOutlet weak var alphaStepper: NSStepper!
-    @IBOutlet weak var postionView: KMPostionIndicateView!
-    @IBOutlet weak var verticalGapLabel: NSTextField!
-    @IBOutlet weak var verticalGapTextField: NSTextField!
-    @IBOutlet weak var verticalStepper: NSStepper!
-    @IBOutlet weak var horizontalGapLabel: NSTextField!
-    @IBOutlet weak var horizontalGapTextField: NSTextField!
-    @IBOutlet weak var horizontalStepper: NSStepper!
-    @IBOutlet weak var pageRangeComboBox: NSComboBox!
-    @IBOutlet weak var pageRangeLabel: NSTextField!
-    
-    @IBOutlet weak var saveToTemplateButton: NSButton!
-    @IBOutlet weak var templateNameLabel: NSTextField!
-    @IBOutlet weak var templateNameTextField: NSTextField!
-    
-    @IBOutlet weak var doneButton: NSButton!
-    @IBOutlet weak var cancelButton: NSButton!
-    @IBOutlet weak var batchButton: NSButton!
-    
-    var isHiddenBatchBtn: Bool = false
-    
-    private var workItem: DispatchWorkItem?
-    
-    var isAllowReloadDocument = true
-    
-    lazy var background: KMBackgroundModel = {
-        var bg = KMBackgroundModel()
-        bg.type = .color
-        bg.color = .red
-        bg.opacity = 1.0
-        bg.scale = 1.0
-        bg.verticalMode = 1
-        bg.horizontalMode = 1
-        bg.backgroundID = KMBackgroundManager.defaultManager.fetchAvailableName()
-        self.initialID = bg.backgroundID
-         return bg
-    }()
-    var originalBackground: KMBackgroundModel = KMBackgroundModel()
-    var filePath: String = Bundle.main.path(forResource: NSLocalizedString("Quick Start Guide.pdf", comment: ""), ofType: "") ?? ""
-    var password: String = ""
-    var type: KMBackgroundManagerType = .use
-    var pdfDocument: CPDFDocument? {
-        didSet {
-            self._fileAttri = KMFileAttribute()
-            self._fileAttri?.password = self.pdfDocument?.password ?? ""
-            self._fileAttri?.filePath = self.pdfDocument?.documentURL.path ?? ""
-            
-            self.password = pdfDocument?.password ?? ""
-            self.pdfView.document = pdfDocument
-            self.reloadData()
-        }
-    }
-    
-    var backgroundType: CPDFBackgroundType = .color
-        
-    var initialID: String!
-    var currentType: Int = 0
-    
-    var cancelAction: KMAddBackgroundViewCancelAction?
-    var batchAction: KMAddBackgroundViewCancelAction?
-    var operateCallBack: KMAddBackgroundViewOperateCallBack?
-
-    var onlyManagerTemplate: Bool = true
-    
-    private var _fileAttri: KMFileAttribute?
-
-    // MARK: - Dealloc
-
-    deinit {
-        NotificationCenter.default.removeObserver(self)
-    }
-
-    // MARK: - Init Methods
-
-    convenience init?(baseFile filePath: String, background backgroundObject: KMBackgroundModel, password: String, type: KMBackgroundManagerType, fileType countType: Int) {
-        self.init()
-        self.filePath = filePath
-        self.password = password
-        self.background = backgroundObject
-        self.originalBackground = backgroundObject
-        self.initialID = backgroundObject.backgroundID
-        self.type = type
-        self.pdfDocument = CPDFDocument(url: URL(fileURLWithPath: self.filePath))
-
-        if pdfDocument!.isLocked {
-            pdfDocument!.unlock(withPassword: password)
-        }
-
-        if pdfDocument!.isLocked {
-            return nil
-        }
-    }
-
-    func setup() {
-//        pdfView.background = background
-//        pdfView.document = pdfDocument
-        pdfView.autoScales = true
-        pdfView.setDisplay(.singlePage)
-//        pdfView.documentView?.enclosingScrollView?.hasVerticalScroller = false
-//        pdfView.documentView?.enclosingScrollView?.hasHorizontalScroller = false
-
-        for i in 0..<3 {
-            for j in 0..<3 {
-                if i == Int(background.horizontalMode) && j == Int(background.verticalMode) {
-                    postionView.style = KMPositionIndicateViewStyle(rawValue: i + 3 * j)!
-                }
-            }
-        }
-
-        postionView.styleChangedCallBack = { [weak self] in
-            guard let self = self else { return }
-            self.background.horizontalMode = self.postionView.style.rawValue % 3
-            self.background.verticalMode = self.postionView.style.rawValue / 3
-            self.self.updatePDFView()
-            if self.filePathLabel.stringValue.count > 0 {
-                self.doneButton.isEnabled = true
-            }
-        }
-
-        currentPageIndexTextField.stringValue = "1"
-//        let numberFormatter = currentPageIndexTextField.formatter as! NumberFormatter
-//        numberFormatter.maximum = NSNumber(value: pdfDocument.pageCount)
-        let countFormatter = TextFieldFormatter.init()
-        countFormatter.allowedCharacterSet = "-"
-        self.angleTextField.formatter = countFormatter
-        angleTextField.delegate = self
-        
-        
-        let formatter = TextFieldFormatter.init()
-        formatter.allowedCharacterSet = "-."
-        self.verticalGapTextField.formatter = formatter
-        self.verticalGapTextField.delegate = self
-        
-        let formatter2 = TextFieldFormatter.init()
-        formatter2.allowedCharacterSet = "-."
-        self.horizontalGapTextField.formatter = formatter2
-        self.horizontalGapTextField.delegate = self
-        
-        let formatter3 = TextFieldFormatter.init()
-        formatter3.allowedCharacterSet = "%"
-        self.alphaTextField.formatter = formatter3
-        alphaTextField.delegate = self
-
-        left45IndicateView.style = .left45
-        left45IndicateView.touchCallBack = { [weak self] in
-            guard let self = self else { return }
-            self.background.rotation = -45
-            self.angleStepper.doubleValue = -45
-            self.angleTextField.stringValue = "\(-45)"
-            self.checkAngle()
-            if self.filePathLabel.stringValue.count > 0 {
-                self.doneButton.isEnabled = true
-            }
-            self.updatePDFView()
-        }
-
-        horizontalIndicateView.style = .horizontal
-        horizontalIndicateView.touchCallBack = { [weak self] in
-            guard let self = self else { return }
-            self.background.rotation = 0
-            self.angleStepper.doubleValue = 0
-            self.angleTextField.stringValue = "\(0)"
-            self.checkAngle()
-            if self.filePathLabel.stringValue.count > 0 {
-                self.doneButton.isEnabled = true
-            }
-            self.updatePDFView()
-        }
-
-        right45IndicateView.style = .right45
-        right45IndicateView.touchCallBack = { [weak self] in
-            guard let self = self else { return }
-            self.background.rotation = 45
-            self.angleStepper.doubleValue = 45
-            self.angleTextField.stringValue = "\(45)"
-            self.checkAngle()
-            if self.filePathLabel.stringValue.count > 0 {
-                self.doneButton.isEnabled = true
-            }
-            self.updatePDFView()
-        }
-
-        checkAngle()
-
-        typeBox.titleFont = NSFont.systemFont(ofSize: 13)
-
-        colorWell.color = background.color ?? NSColor.red
-        templateNameTextField.stringValue = background.backgroundID
-
-        appearanceBox.titleFont = NSFont.systemFont(ofSize: 13)
-
-        saveToTemplateButton.isEnabled = onlyManagerTemplate
-
-//        if type == .use {
-//            saveToTemplateButton.isHidden = true
-//            saveToTemplateButton.state = .off
-//        } else {
-//            saveToTemplateButton.isHidden = false
-//            saveToTemplateButton.state = .on
-//        }
-
-        pageRangeComboBox.removeAllItems()
-        pageRangeComboBox.addItems(withObjectValues: [
-            NSLocalizedString("All Pages", comment: ""),
-            NSLocalizedString("Odd Pages Only", comment: ""),
-            NSLocalizedString("Even Pages Only", comment: ""),
-            NSLocalizedString("e.g. 1,3-5,10", comment: "")
-        ])
-        pageRangeComboBox.placeholderString = NSLocalizedString("e.g. 1,3-5,10", comment: "")
-        pageRangeComboBox.delegate = nil
-        pageRangeComboBox.selectItem(at: 0)
-        pageRangeComboBox.isEditable = false
-        pageRangeComboBox.delegate = self
-        
-        
-        colorWell.target = self
-        colorWell.action = #selector(colorWellDidChange)
-    }
-    
-    func addNotification() {
-        NotificationCenter.default.addObserver(self, selector: #selector(pageChangeNotification), name: NSNotification.Name.CPDFViewPageChanged, object: self.pdfView)
-    }
-    
-    func updateLanguage() {
-        typeBox.title = NSLocalizedString("Source", comment: "")
-        self.templateNameLabel.stringValue = NSLocalizedString("Name:", comment: "")
-
-        batchButton.title = NSLocalizedString("Batch", comment: "");
-        cancelButton.title = NSLocalizedString("Cancel", comment: "");
-        
-        colorButton.title = NSLocalizedString("Color", comment: "")
-        fileButton.title = NSLocalizedString("File", comment: "")
-        browseButton.title = NSLocalizedString("Choose...", comment: "")
-        ratioLabel.stringValue = "\(NSLocalizedString("Ratio", comment: "")):"
-
-        appearanceBox.title = NSLocalizedString("Appearance", comment: "")
-        angleLabel.stringValue = "\(NSLocalizedString("Rotation", comment: "")):"
-        alphaLabel.stringValue = "\(NSLocalizedString("Opacity", comment: "")):"
-        pageRangeLabel.stringValue = "\(NSLocalizedString("Page Range", comment: "")):"
-        horizontalGapLabel.stringValue = "X:"
-        verticalGapLabel.stringValue = "Y:"
-        
-        templateNameLabel.stringValue = NSLocalizedString("Label", comment: "")
-        
-        saveToTemplateButton.title = NSLocalizedString("Add to Template", comment: "")
-        
-        if (self.type == .add) {
-            self.doneButton.title = NSLocalizedString("Apply", comment: "");
-            self.batchButton.isHidden = true
-        } else if (self.type == .edit) {
-            self.doneButton.title = NSLocalizedString("Apply", comment: "");
-            self.batchButton.isHidden = true
-        } else if (self.type == .use) {
-            self.doneButton.title = NSLocalizedString("Save & Apply", comment: "");
-        }
-    }
-
-    private func checkAngle() {
-        left45IndicateView.isSelcted = false
-        horizontalIndicateView.isSelcted = false
-        right45IndicateView.isSelcted = false
-
-        if background.rotation == 45 {
-            right45IndicateView.isSelcted = true
-        } else if background.rotation == 0 {
-            horizontalIndicateView.isSelcted = true
-        } else if background.rotation == -45 {
-            left45IndicateView.isSelcted = true
-        }
-    }
-
-    func reloadData() {
-        guard let pdfDocument = pdfDocument else { return }
-        
-        totalPageCountlabel.stringValue = "/ \(pdfDocument.pageCount)"
-        templateNameTextField.stringValue = background.backgroundID
-        colorWell.color = background.color ?? NSColor.red
-         filePathLabel.placeholderString = NSLocalizedString("Select a File", comment: "")
-        angleStepper.doubleValue = Double(background.rotation)
-        angleTextField.stringValue = "\(angleStepper.intValue)"
-        alphaSlider.doubleValue = background.opacity
-        alphaStepper.doubleValue = background.opacity
-        let opacity = round(background.opacity * 100) / 100
-        alphaTextField.stringValue = "\(Int(opacity * 100))%"
-        ratioStepper.doubleValue = background.scale
-        ratioTextField.stringValue = "\(Int(background.scale * 100))%"
-        if currentType == 0 {
-            changeTypeBoxState(true)
-        } else {
-            changeTypeBoxState(false)
-        }
-        pageRangeComboBox.delegate = nil
-//        switch background.pageRangeType {
-//        case .all:
-//            pageRangeComboBox.isEditable = false
-//            pageRangeComboBox.selectItem(at: 0)
-//        case .odd:
-//            pageRangeComboBox.isEditable = false
-//            pageRangeComboBox.selectItem(at: 1)
-//        case .even:
-//            pageRangeComboBox.isEditable = false
-//            pageRangeComboBox.selectItem(at: 2)
-//        case .other:
-//            pageRangeComboBox.isEditable = true
-//            pageRangeComboBox.selectItem(at: 3)
-//            pageRangeComboBox.stringValue = background.pagesString 
-//            window?.makeFirstResponder(pageRangeComboBox)
-//        }
-        pageRangeComboBox.delegate = self
-        verticalStepper.doubleValue = background.verticalSpace
-        verticalGapTextField.stringValue = "\(verticalStepper.doubleValue)"
-        horizontalStepper.doubleValue = background.horizontalSpace
-        horizontalGapTextField.stringValue = "\(horizontalStepper.doubleValue)"
-        batchButton.isHidden = isHiddenBatchBtn
-        if !isHiddenBatchBtn {
-            self.batchButton.isHidden = type != .use
-        }
-    }
-
-    private func changeTypeBoxState(_ isColor: Bool) {
-        if isColor {
-            currentType = 0
-            colorButton.state = .on
-            colorWell.isEnabled = true
-            fileButton.state = .off
-            browseButton.isEnabled = false
-            ratioTextField.isEnabled = false
-            ratioStepper.isEnabled = false
-            background.color = colorWell.color
-            background.type = .color
-            background.scale = 1
-            doneButton.isEnabled = true
-        } else {
-            currentType = 1
-            colorButton.state = .off
-            colorWell.isEnabled = false
-            fileButton.state = .on
-            browseButton.isEnabled = true
-            ratioTextField.isEnabled = true
-            ratioStepper.isEnabled = true
-            background.color = NSColor.white
-            background.type = .image
-            background.scale = ratioStepper.doubleValue
-            doneButton.isEnabled = filePathLabel.stringValue.count > 0
-        }
-        self.updatePDFView()
-    }
-    
-    func updatePDFView() {
-//        pdfView.needsDisplay = true
-//        pdfView.layoutDocumentView()
-//        pdfView.setNeedsDisplayForVisiblePages()
-        
-
-//        // Save to temporary path
-//        let documentPath = NSTemporaryDirectory()
-//        let tempPath = (documentPath as NSString).appendingPathComponent((path as NSString).lastPathComponent)
-//        try? FileManager.default.removeItem(atPath: tempPath)
-//
-//        let result = document.write(to: URL(fileURLWithPath: tempPath))
-//        if result {
-//            if FileManager.default.fileExists(atPath: path) {
-//                try? FileManager.default.removeItem(atPath: path)
-//            }
-//            try? FileManager.default.moveItem(atPath: tempPath, toPath: path)
-//        } else {
-//            try? FileManager.default.removeItem(atPath: tempPath)
-//        }
-        
-        // 如果前一次调用还在执行,则取消它
-        workItem?.cancel()
-
-        // 创建一个新的 DispatchWorkItem
-        let newWorkItem = DispatchWorkItem {
-            // 在这里执行你的方法的实际逻辑
-            self.reloadDocument()
-        }
-
-        // 将新的 DispatchWorkItem 分配给实例变量
-        workItem = newWorkItem
-
-        // 在队列中执行 DispatchWorkItem
-        DispatchQueue.main.async(execute: newWorkItem)
-    }
-    
-    func reloadDocument() {
-        if !self.isAllowReloadDocument {
-            return
-        }
-        self.isAllowReloadDocument = false
-        
-        let document = CPDFDocument(url: self.pdfDocument?.documentURL)
-        guard let document = document else { return }
-        document.unlock(withPassword: self.pdfDocument?.password)
-    
-        let tBackground: CPDFBackground = document.background()
-        tBackground.opacity = background.opacity
-        tBackground.scale = background.scale
-        tBackground.rotation = CGFloat(background.rotation)
-        tBackground.horizontalAlignment = UInt(background.horizontalMode)
-        tBackground.verticalAlignment = UInt(background.verticalMode)
-        tBackground.xOffset = background.horizontalSpace
-        tBackground.yOffset = background.verticalSpace
-
-        if let color = background.color {
-            tBackground.color = color
-            tBackground.type = .color
-        }
-       
-        tBackground.update()
-        self.pdfView.document = document
-        
-        DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.1) {
-            self.pdfView.layoutDocumentView()
-            self.isAllowReloadDocument = true
-        }
-    }
-
-    // Other methods...
-    
-    @objc func controlTextDidEndEditing(_ notification: Notification) {
-        guard let textField = notification.object as? NSTextField else { return }
-
-        switch textField {
-        case ratioTextField:
-            let formatter = textField.formatter as? NumberFormatter
-            if let floatValue = formatter?.number(from: textField.stringValue)?.floatValue {
-                ratioStepper.doubleValue = Double(floatValue)
-                background.scale = Double(floatValue)
-                self.updatePDFView()
-            }
-        case angleTextField:
-            if let integerValue = Int(textField.stringValue) {
-                background.rotation = CGFloat(integerValue)
-                angleStepper.doubleValue = Double(background.rotation)
-                checkAngle()
-                self.updatePDFView()
-            }
-        case alphaTextField:
-            let floatValue = textField.stringValue.replacingOccurrences(of: "%", with: "").stringToCGFloat() * 0.01
-            alphaSlider.doubleValue = Double(floatValue)
-            alphaStepper.doubleValue = Double(floatValue)
-            background.opacity = Double(floatValue)
-            self.updatePDFView()
-        case pageRangeComboBox:
-            if pageRangeComboBox.indexOfSelectedItem == -1 {
-                if !checkPageRangeValidate(pageRangeComboBox.stringValue) {
-                    let alert = NSAlert()
-                    alert.alertStyle = .critical
-                    alert.messageText = "\(pdfDocument!.documentURL.lastPathComponent) \(NSLocalizedString("Invalid page range or the page number is out of range. Please try again.", comment: ""))"
-                    alert.runModal()
-                    window?.makeFirstResponder(pageRangeComboBox)
-                    return
-                } else {
-                     self.updatePDFView()
-                }
-            }
-        case verticalGapTextField:
-            if let integerValue = Int(verticalGapTextField.stringValue) {
-                background.verticalSpace = CGFloat(integerValue)
-                verticalStepper.doubleValue = background.verticalSpace
-                self.updatePDFView()
-            }
-        case horizontalGapTextField:
-            if let integerValue = Int(horizontalGapTextField.stringValue) {
-                background.horizontalSpace = CGFloat(integerValue)
-                horizontalStepper.doubleValue = background.horizontalSpace
-                self.updatePDFView()
-            }
-        case currentPageIndexTextField:
-            if let pageIndex = Int(currentPageIndexTextField.stringValue), let page = pdfDocument!.page(at: UInt(pageIndex - 1)) {
-                pdfView.go(to: page)
-            }
-        default:
-            break
-        }
-
-        if filePathLabel.stringValue.count > 0 {
-            doneButton.isEnabled = true
-        }
-    }
-
-    @objc func comboBoxSelectionDidChange(_ notification: Notification) {
-        guard notification.object as? NSComboBox == pageRangeComboBox else { return }
-
-        pageRangeComboBox.isEditable = false
-//        switch pageRangeComboBox.indexOfSelectedItem {
-//        case 0:
-//            background.pageRangeType = .all
-//        case 1:
-//            background.pageRangeType = .odd
-//        case 2:
-//            background.pageRangeType = .even
-//        default:
-//            background.pageRangeType = .other
-//            pageRangeComboBox.stringValue = ""
-//            pageRangeComboBox.isEditable = true
-//            window?.makeFirstResponder(pageRangeComboBox)
-//        }
-
-        if filePathLabel.stringValue.count > 0 {
-            doneButton.isEnabled = true
-        }
-    }
-
-    func checkPageRangeValidate(_ pageRangeString: String) -> Bool {
-        var fileAttribute = self._fileAttri
-        if fileAttribute == nil {
-            fileAttribute = KMFileAttribute()
-            fileAttribute?.password = self.pdfDocument?.password ?? ""
-            fileAttribute?.filePath = self.pdfDocument?.documentURL.path ?? ""
-            self._fileAttri = fileAttribute
-        }
-//        fileAttribute?.filePath = pdfDocument!.documentURL.path
-        fileAttribute?.bAllPage = false
-        fileAttribute?.pagesString = pageRangeComboBox.stringValue
-
-        var pageRange: KMPageRange = .all
-//        let pageRangeType: KMWatermarkeModelPageRangeType = background.pageRangeType
-//        if pageRangeType == .all {
-//            pageRange = .all
-//        } else if pageRangeType == .even {
-//            pageRange = .even
-//        } else if pageRangeType == .odd {
-//            pageRange = .odd
-//        } else if pageRangeType == .other {
-//            pageRange = .custom
-//        }
-//        fileAttribute?.pagesType = pageRange
-        
-        return fileAttribute!.fetchSelectPages().count != 0
-    }
-
-    func saveAsPDF(with background: KMBackgroundModel, to path: String, autoOpen: Bool) {
-        self.window?.makeFirstResponder(nil)
-        
-        DispatchQueue.global(qos: .default).async { [unowned self] in
-            var filePath = self.pdfDocument!.documentURL?.path
-            let password = self.password
-            if filePath == nil {
-                let writeSuccess = self.pdfDocument!.write(to: URL(fileURLWithPath: kNewDocumentTempSavePath(NSLocalizedString("Untitled", comment: ""))))
-                if writeSuccess {
-                    self.pdfDocument = CPDFDocument(url: URL(fileURLWithPath: kNewDocumentTempSavePath(NSLocalizedString("Untitled", comment: ""))))!
-                    filePath = self.pdfDocument!.documentURL?.path
-                }
-            }
-
-            let document = CPDFDocument(url: URL(fileURLWithPath: filePath!))!
-            document.unlock(withPassword: password)
-            
-
-            let tBackground: CPDFBackground = document.background()
-            tBackground.opacity = background.opacity
-            tBackground.scale = background.scale
-            tBackground.rotation = CGFloat(background.rotation)
-            tBackground.horizontalAlignment = UInt(background.horizontalMode)
-            tBackground.verticalAlignment = UInt(background.verticalMode)
-            tBackground.xOffset = background.horizontalSpace
-            tBackground.yOffset = background.verticalSpace
-
-            if let color = background.color {
-                tBackground.color = color
-                tBackground.type = .color
-            }
-
-           
-            tBackground.update()
-
-            // Save to temporary path
-            let documentPath = NSTemporaryDirectory()
-            let tempPath = (documentPath as NSString).appendingPathComponent((path as NSString).lastPathComponent)
-            try? FileManager.default.removeItem(atPath: tempPath)
-
-            let result = document.write(to: URL(fileURLWithPath: tempPath))
-            if result {
-                if FileManager.default.fileExists(atPath: path) {
-                    try? FileManager.default.removeItem(atPath: path)
-                }
-                try? FileManager.default.moveItem(atPath: tempPath, toPath: path)
-            } else {
-                try? FileManager.default.removeItem(atPath: tempPath)
-            }
-
-            if result {
-                DispatchQueue.main.async {
-                    let needSave = self.saveToTemplateButton.state == .on
-                    if needSave {
-                        if self.checkPageRangeValidate(self.pageRangeComboBox.stringValue) && self.pageRangeComboBox.indexOfSelectedItem == -1 {
-                         }
-                        KMBackgroundManager.defaultManager.addTemplate(model: self.background)
-                        NotificationCenter.default.post(name: NSNotification.Name("KMBatchOperateWatermarksNotification"), object: self)
-                    }
-                    self.cancelAction?(self)
-                    if autoOpen {
-                        NSDocumentController.shared.openDocument(withContentsOf: URL(fileURLWithPath: path), display: true) { _, _, _ in }
-                    } else {
-                        NSWorkspace.shared.selectFile(path, inFileViewerRootedAtPath: "")
-                    }
-                }
-            }
-        }
-    }
-    
-    static func saveAsPDFRemoveAllBackground(PDFDocument: CPDFDocument, password: String?, toPath path: String, completionHandler handler: ((Int) -> Void)?) {
-        DispatchQueue.global(qos: .default).async {
-            guard let filePath = PDFDocument.documentURL?.path else {
-                return
-            }
-
-            let document = CPDFDocument(url: URL(fileURLWithPath: filePath))
-            if let password = password {
-                document?.unlock(withPassword: password)
-            }
-
-            let tBackground: CPDFBackground = document!.background()
-            tBackground.clear()
-
-
-            // Save to a temporary path
-            let documentPath = NSTemporaryDirectory()
-            let tempPath = (documentPath as NSString).appendingPathComponent((path as NSString).lastPathComponent)
-
-            if FileManager.default.fileExists(atPath: tempPath) {
-                try? FileManager.default.removeItem(atPath: tempPath)
-            }
-
-            if let result = document?.write(to: URL(fileURLWithPath: tempPath)) {
-                if FileManager.default.fileExists(atPath: path) {
-                    try? FileManager.default.removeItem(atPath: path)
-                }
-
-                try? FileManager.default.moveItem(atPath: tempPath, toPath: path)
-
-                DispatchQueue.main.async {
-                    handler?(1)
-                }
-            } else {
-                try? FileManager.default.removeItem(atPath: tempPath)
-
-                DispatchQueue.main.async {
-                    handler?(0)
-                }
-            }
-        }
-    }
-
-    
-    func kNewDocumentTempSavePath(_ fileName: String) -> String {
-        let searchPath = NSSearchPathForDirectoriesInDomains(.applicationSupportDirectory, .userDomainMask, true).last
-        let append1 = searchPath?.stringByAppendingPathComponent(Bundle.main.bundleIdentifier!)
-        let append2 = append1!.stringByAppendingPathComponent(String(format: "%@", fileName))
-        return append2
-    }
-
-    func isDamageImage(_ image: NSImage, imagePath path: String) -> Bool {
-        let addImageAnnotation = (NSSearchPathForDirectoriesInDomains(.applicationSupportDirectory, .userDomainMask, true).last! as NSString).appendingPathComponent(Bundle.main.bundleIdentifier!).stringByAppendingPathComponent("addImageAnnotation")
-        if !FileManager.default.fileExists(atPath: addImageAnnotation) {
-            try? FileManager.default.createDirectory(atPath: addImageAnnotation, withIntermediateDirectories: false, attributes: nil)
-        }
-
-        let data = image.tiffRepresentation!
-        let imageRep = NSBitmapImageRep(data: data)!
-        imageRep.size = image.size
-        var imageData: Data?
-
-        if path.lowercased() == "png" {
-            imageData = imageRep.representation(using: .png, properties: [:])
-        } else {
-            imageData = imageRep.representation(using: .jpeg, properties: [:])
-        }
-
-        let rPath = (addImageAnnotation as NSString).appendingPathComponent(tagString() + ".png")
-        return ((try? imageData?.write(to: URL(fileURLWithPath: rPath), options: .atomic)) == nil)
-    }
-
-    func tagString() -> String {
-        let dateFormatter = DateFormatter()
-        dateFormatter.dateFormat = "yyMMddHHmmss"
-        return String(format: "%@%04d", dateFormatter.string(from: Date()), arc4random() % 10000)
-    }
-
-    // ... (remaining methods)
-    @objc func pageChangeNotification(notification: NSNotification) {
-        currentPageIndexTextField.stringValue = "\(pdfView.currentPage().pageIndex() + 1)"
-    }
-}
-
-extension KMAddBackgroundView {
-    @IBAction func cancelButtonAction(_ sender: Any) {
-        guard let callBack = cancelAction else { return }
-        
-        callBack(self)
-    }
-    
-    @IBAction func buttonClicked_SwitchBackgroundType(_ sender: Any) {
-        changeTypeBoxState(sender as? NSObject == colorButton)
-    }
-
-//    @IBAction func colorWellChanged(_ sender: NSColorWell) {
-//        background.color = sender.color
-//        self.updatePDFView()
-//    }
-    
-    @objc func colorWellDidChange(_ sender: NSColorWell) {
-        if let color = sender.color.usingColorSpaceName(NSColorSpaceName.calibratedRGB) {
-            background.color = color
-            self.updatePDFView()
-        }
-    }
-
-    @IBAction func radioStepperAction(_ sender: NSStepper) {
-        ratioTextField.stringValue = "\(Int(sender.doubleValue * 100))%"
-        background.scale = sender.doubleValue
-        self.updatePDFView()
-
-        if filePathLabel.stringValue.count > 0 {
-            doneButton.isEnabled = true
-        }
-    }
-
-    @IBAction func angleStepperAction(_ sender: NSStepper) {
-        angleTextField.stringValue = "\(sender.doubleValue)"
-        background.rotation = CGFloat(Int(sender.doubleValue))
-        checkAngle()
-        self.updatePDFView()
-
-        if filePathLabel.stringValue.count > 0 {
-            doneButton.isEnabled = true
-        }
-    }
-
-    @IBAction func alphaSliderAction(_ sender: NSSlider) {
-        background.opacity = sender.doubleValue
-        alphaStepper.doubleValue = sender.doubleValue
-        alphaTextField.stringValue = "\(Int(sender.doubleValue * 100))%"
-
-        if filePathLabel.stringValue.count > 0 {
-            doneButton.isEnabled = true
-        }
-        self.updatePDFView()
-    }
-
-    @IBAction func verticalStepperAction(_ sender: NSStepper) {
-        verticalGapTextField.stringValue = "\(sender.doubleValue)"
-        background.verticalSpace = sender.doubleValue
-        self.updatePDFView()
-
-        if filePathLabel.stringValue.count > 0 {
-            doneButton.isEnabled = true
-        }
-    }
-
-    @IBAction func horizentalStepperAction(_ sender: NSStepper) {
-        horizontalGapTextField.stringValue = "\(sender.doubleValue)"
-        background.horizontalSpace = sender.doubleValue
-        self.updatePDFView()
-
-        if filePathLabel.stringValue.count > 0 {
-            doneButton.isEnabled = true
-        }
-    }
-
-    @IBAction func alphaSteperAction(_ sender: NSStepper) {
-        alphaTextField.stringValue = "\(Int(sender.doubleValue * 100))%"
-        background.opacity = sender.doubleValue
-        alphaSlider.doubleValue = sender.doubleValue
-        self.updatePDFView()
-
-        if filePathLabel.stringValue.count > 0 {
-            doneButton.isEnabled = true
-        }
-    }
-
-    @IBAction func goPrevious(_ sender: Any) {
-        if pdfView.canGoToPreviousPage() {
-            pdfView.goToPreviousPage(nil)
-        }
-//        let index = pdfDocument!.index(for: pdfView.currentPage())
-//        currentPageIndexTextField.stringValue = "\(index + 1)"
-    }
-
-    @IBAction func goNext(_ sender: Any) {
-        if pdfView.canGoToNextPage() {
-            pdfView.goToNextPage(nil)
-        }
-
-//        let index = pdfDocument!.index(for: pdfView.currentPage())
-//        currentPageIndexTextField.stringValue = "\(index + 1)"
-    }
-
-    @IBAction func buttonClicked_BrowserFile(_ sender: Any) {
-        let openPanel = NSOpenPanel()
-        openPanel.canChooseDirectories = false
-        openPanel.canChooseFiles = true
-        openPanel.allowsMultipleSelection = false
-        openPanel.allowedFileTypes = ["jpg", "cur", "bmp", "jpeg", "gif", "png", "tiff", "tif", "ico", "icns", "tga", "psd", "eps", "hdr", "jp2", "jpc", "pict", "sgi", "pdf"]
-
-        openPanel.beginSheetModal(for: window!) { (result) in
-            if result == .OK {
-                guard let url = openPanel.url else { return }
-                let filePath: NSString = url.path as NSString
-
-                if filePath.pathExtension.lowercased() == "pdf" {
-                    let pdf = CPDFDocument(url: url)
-                    if pdf?.isEncrypted == true {
-                        return
-                    }
-                }
-
-                if let image = NSImage(contentsOfFile: url.path), !self.isDamageImage(image, imagePath: url.path) {
-                    self.filePathLabel.stringValue = url.path
-                    self.doneButton.isEnabled = true
-                    self.background.imagePath = url.path
-                     self.background.backgroundID = url.path.lastPathComponent.deletingPathExtension
-                    self.templateNameTextField.stringValue = url.path.lastPathComponent.deletingPathExtension
-                    self.self.updatePDFView()
-                }
-            }
-        }
-    }
-
-    // ... (remaining IBActions)
-
-    @IBAction func buttonClicked_Batch(_ sender: Any) {
-        if background.type == .color {
-            background.imagePath = ""
-        } else {
-            background.color = nil
-            if background.image == nil {
-                return
-            }
-        }
-
-        if templateNameTextField.stringValue.count < 1 {
-            background.backgroundID = initialID
-        } else {
-            background.backgroundID = templateNameTextField.stringValue
-        }
-
-        let needSave = saveToTemplateButton.state == .on
-        if needSave {
-            KMBackgroundManager.defaultManager.addTemplate(model: background)
-        }
-
-        operateCallBack?(background, currentType)
-    }
-
-    @IBAction func buttonClicked_Done(_ sender: Any) {
-        guard let pdfDocument = pdfDocument else { return }
-        if background.type == .color {
-            background.imagePath = ""
-        } else {
-            background.color = nil
-            if background.image == nil {
-                return
-            }
-        }
-
-        if templateNameTextField.stringValue.isEmpty {
-            background.backgroundID = initialID
-        } else {
-            background.backgroundID = templateNameTextField.stringValue
-        }
-
-        // Avoid showing the page range alert twice
-        if checkPageRangeValidate(pageRangeComboBox.stringValue) {
-             self.updatePDFView()
-            window?.makeFirstResponder(self)
-        }
-
-        let needSave = saveToTemplateButton.state == .on
-        var pages = [Int]()
-
-        switch pageRangeComboBox.indexOfSelectedItem {
-        case 0:
-            pages = Array(0..<Int(pdfDocument.pageCount))
-        case 1:
-            pages = Array(stride(from: 0, to: Int(pdfDocument.pageCount), by: 2))
-        case 2:
-            pages = Array(stride(from: 1, to: Int(pdfDocument.pageCount), by: 2))
-        default:
-            var fileAttribute = self._fileAttri
-            if fileAttribute == nil {
-                fileAttribute = KMFileAttribute()
-                fileAttribute?.password = self.pdfDocument?.password ?? ""
-                fileAttribute?.filePath = self.pdfDocument?.documentURL.path ?? ""
-                self._fileAttri = fileAttribute
-            }
-//            fileAttribute.filePath = pdfDocument.documentURL?.path ?? ""
-            fileAttribute?.bAllPage = false
-            fileAttribute?.pagesType = .custom
-//            fileAttribute.password = pdfDocument.password ?? ""
-            fileAttribute?.pagesString = pageRangeComboBox.stringValue
-
-            let selectPages = fileAttribute?.fetchSelectPages() ?? []
-            if selectPages.count != 0 {
-                pages = selectPages.map { $0 - 1 }
-            } else {
-                let alert = NSAlert()
-                alert.alertStyle = .critical
-                alert.messageText = "\(fileAttribute?.filePath.lastPathComponent ?? "") \(NSLocalizedString("Invalid page range or the page number is out of range. Please try again.", comment: ""))"
-                alert.runModal()
-                return
-            }
-        }
-
- 
-        switch type {
-        case .add:
-            if needSave {
-                if checkPageRangeValidate(pageRangeComboBox.stringValue) && pageRangeComboBox.indexOfSelectedItem == -1 {
-                 }
-                KMBackgroundManager.defaultManager.addTemplate(model: background)
-            }
-            operateCallBack?(background, currentType)
-        case .edit:
-            if needSave {
-                if checkPageRangeValidate(pageRangeComboBox.stringValue) && pageRangeComboBox.indexOfSelectedItem == -1 {
-                 }
-                originalBackground = (background.copy() as? KMBackgroundModel)!
-                KMBackgroundManager.defaultManager.updateTemplate(model: originalBackground)
-            }
-            operateCallBack?(originalBackground, currentType)
-        case .use:
-            let fileName = "\(pdfDocument.documentURL?.deletingPathExtension().lastPathComponent ?? NSLocalizedString("Untitled", comment: ""))_Background"
-            let savePanelAccessoryViewController = KMSavePanelAccessoryController()
-            let savePanel = NSSavePanel()
-            savePanel.nameFieldStringValue = fileName
-            savePanel.allowedFileTypes = ["pdf"]
-            savePanel.accessoryView = savePanelAccessoryViewController.view
-            savePanel.beginSheetModal(for: window!) { result in
-                if result == .OK {
-                    self.saveAsPDF(with: self.background, to: savePanel.url?.path ?? "", autoOpen: savePanelAccessoryViewController.openAutomaticButton.state == .on ? true : false)
-                }
-            }
-        }
-    }
-}

+ 0 - 638
PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Background/Background/View/KMAddBackgroundView.xib

@@ -1,638 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22155" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22155"/>
-        <plugIn identifier="com.apple.pdfkit.ibplugin" version="22155"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMAddBackgroundView" customModule="PDF_Master" customModuleProvider="target">
-            <connections>
-                <outlet property="alphaLabel" destination="xZ8-fz-ItF" id="ssl-se-XyJ"/>
-                <outlet property="alphaSlider" destination="qgx-tW-Cch" id="VqX-0L-S1g"/>
-                <outlet property="alphaStepper" destination="sVe-7U-Sr3" id="zN2-EL-GKp"/>
-                <outlet property="alphaTextField" destination="Yw0-0L-CLB" id="sp3-PY-96b"/>
-                <outlet property="angleLabel" destination="rm6-4f-1Wl" id="0i7-Pe-t6G"/>
-                <outlet property="angleStepper" destination="ZfX-mo-ogH" id="Uyb-Jg-VxJ"/>
-                <outlet property="angleTextField" destination="VpQ-rd-1lb" id="OWW-eu-o3x"/>
-                <outlet property="appearanceBox" destination="uVG-9U-es7" id="7sE-cP-ePn"/>
-                <outlet property="batchButton" destination="dCQ-Gq-Cst" id="1eZ-79-CVg"/>
-                <outlet property="browseButton" destination="Jmd-Ox-rOL" id="v6O-kM-C4N"/>
-                <outlet property="cancelButton" destination="D5H-CW-WxN" id="Ajv-hT-unV"/>
-                <outlet property="colorButton" destination="uJE-UR-TcB" id="xkS-R2-x51"/>
-                <outlet property="colorWell" destination="ZXz-PO-D6F" id="Rmy-Wd-tWy"/>
-                <outlet property="currentPageIndexTextField" destination="auI-8C-JAb" id="Ktp-6M-Eg1"/>
-                <outlet property="doneButton" destination="V6K-Pu-pZ6" id="aPK-KL-17b"/>
-                <outlet property="fileButton" destination="e5H-Ra-5M6" id="Mbz-tw-Wfg"/>
-                <outlet property="filePathLabel" destination="KJc-ko-3Kw" id="fc0-Gg-mo6"/>
-                <outlet property="horizontalGapLabel" destination="PVJ-QE-OSa" id="bpj-Gp-MR6"/>
-                <outlet property="horizontalGapTextField" destination="TN8-0T-3ni" id="n49-mw-eZe"/>
-                <outlet property="horizontalIndicateView" destination="BBR-fQ-n2l" id="eqX-iP-e9C"/>
-                <outlet property="horizontalStepper" destination="RYW-E6-8Ph" id="EOa-hN-XUy"/>
-                <outlet property="left45IndicateView" destination="Qbj-dr-1LX" id="4fr-xK-aQn"/>
-                <outlet property="nextButton" destination="grh-Kn-g1l" id="Egi-VL-H66"/>
-                <outlet property="pageRangeComboBox" destination="hai-eI-TEB" id="dFL-UU-N2P"/>
-                <outlet property="pageRangeLabel" destination="RTe-5d-eUd" id="61M-07-pJ0"/>
-                <outlet property="pdfView" destination="afp-IL-Bkr" id="2qc-GJ-H1Z"/>
-                <outlet property="postionView" destination="plG-s5-sBd" id="yGP-bI-iwv"/>
-                <outlet property="previousButton" destination="K9f-us-FkG" id="YcK-gX-UxV"/>
-                <outlet property="ratioLabel" destination="FdJ-Mo-ixe" id="ofc-1s-aXB"/>
-                <outlet property="ratioStepper" destination="Lzl-LX-D6c" id="JJI-rl-MKj"/>
-                <outlet property="ratioTextField" destination="IHa-Le-PQB" id="RRa-h6-Qmg"/>
-                <outlet property="right45IndicateView" destination="nic-kL-H4J" id="ZeI-wT-SnW"/>
-                <outlet property="saveToTemplateButton" destination="tLK-st-rLL" id="eMa-My-PLP"/>
-                <outlet property="templateNameLabel" destination="SAP-r8-yOW" id="7vt-Ra-mcA"/>
-                <outlet property="templateNameTextField" destination="pkF-sT-JBT" id="DBi-KK-IuB"/>
-                <outlet property="totalPageCountlabel" destination="W2y-dS-mSh" id="pQJ-WM-APk"/>
-                <outlet property="typeBox" destination="wuk-f8-DLJ" id="1eY-nw-3LW"/>
-                <outlet property="verticalGapLabel" destination="WNU-SS-y7q" id="eXM-1Z-KDC"/>
-                <outlet property="verticalGapTextField" destination="h7e-Zv-9g0" id="bT4-Z8-yDI"/>
-                <outlet property="verticalStepper" destination="FK4-eP-ZsW" id="PZr-ri-YY7"/>
-            </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="992" height="565"/>
-            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-            <subviews>
-                <view translatesAutoresizingMaskIntoConstraints="NO" id="rxq-as-8Qd">
-                    <rect key="frame" x="0.0" y="0.0" width="992" height="565"/>
-                    <subviews>
-                        <pdfView autoresizesSubviews="NO" wantsLayer="YES" displayMode="singlePage" displaysPageBreaks="NO" translatesAutoresizingMaskIntoConstraints="NO" id="afp-IL-Bkr" customClass="KMWatermarkPDFView" customModule="PDF_Master" customModuleProvider="target">
-                            <rect key="frame" x="40" y="219" width="240" height="310"/>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="310" id="3F8-3R-L32"/>
-                                <constraint firstAttribute="width" constant="240" id="z9f-pN-cNM"/>
-                            </constraints>
-                        </pdfView>
-                        <box title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="wuk-f8-DLJ">
-                            <rect key="frame" x="319" y="427" width="636" height="120"/>
-                            <view key="contentView" id="jlb-9G-otw">
-                                <rect key="frame" x="4" y="5" width="628" height="100"/>
-                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                                <subviews>
-                                    <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="uJE-UR-TcB">
-                                        <rect key="frame" x="14" y="73" width="61" height="18"/>
-                                        <buttonCell key="cell" type="radio" title="Radio" bezelStyle="regularSquare" imagePosition="left" alignment="left" state="on" inset="2" id="6pb-AW-Cwu">
-                                            <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                                            <font key="font" metaFont="system"/>
-                                        </buttonCell>
-                                        <connections>
-                                            <action selector="buttonClicked_SwitchBackgroundType:" target="-2" id="WOA-80-WJ2"/>
-                                        </connections>
-                                    </button>
-                                    <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="e5H-Ra-5M6">
-                                        <rect key="frame" x="14" y="33" width="61" height="18"/>
-                                        <buttonCell key="cell" type="radio" title="Radio" bezelStyle="regularSquare" imagePosition="left" alignment="left" inset="2" id="c3K-AK-iyb">
-                                            <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                                            <font key="font" metaFont="system"/>
-                                        </buttonCell>
-                                        <connections>
-                                            <action selector="buttonClicked_SwitchBackgroundType:" target="-2" id="78S-Oy-5lU"/>
-                                        </connections>
-                                    </button>
-                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="FdJ-Mo-ixe">
-                                        <rect key="frame" x="388" y="13" width="37" height="16"/>
-                                        <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="RQC-aD-iTm">
-                                            <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>
-                                    <stepper horizontalHuggingPriority="750" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Lzl-LX-D6c">
-                                        <rect key="frame" x="491" y="7" width="19" height="28"/>
-                                        <stepperCell key="cell" continuous="YES" alignment="left" increment="0.01" maxValue="1" id="Vll-Ns-SVh"/>
-                                        <connections>
-                                            <action selector="radioStepperAction:" target="-2" id="9Nc-Ps-Bjy"/>
-                                        </connections>
-                                    </stepper>
-                                    <textField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="IHa-Le-PQB">
-                                        <rect key="frame" x="425" y="10" width="64" height="21"/>
-                                        <constraints>
-                                            <constraint firstAttribute="width" constant="64" id="qwX-6G-gnL"/>
-                                        </constraints>
-                                        <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" alignment="center" drawsBackground="YES" id="zg1-qf-CE5">
-                                            <numberFormatter key="formatter" formatterBehavior="default10_4" numberStyle="percent" formatWidth="-1" minimumIntegerDigits="1" maximumIntegerDigits="2000000000" id="rGV-Jo-hcc">
-                                                <integer key="multiplier" value="100"/>
-                                                <real key="minimum" value="0.0"/>
-                                                <real key="maximum" value="1"/>
-                                            </numberFormatter>
-                                            <font key="font" metaFont="system"/>
-                                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                                            <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                        </textFieldCell>
-                                    </textField>
-                                    <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Jmd-Ox-rOL">
-                                        <rect key="frame" x="302" y="4" width="75" height="32"/>
-                                        <buttonCell key="cell" type="push" title="Button" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="fjd-T3-LuG">
-                                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                            <font key="font" metaFont="system"/>
-                                        </buttonCell>
-                                        <connections>
-                                            <action selector="buttonClicked_BrowserFile:" target="-2" id="xSh-6w-L4I"/>
-                                        </connections>
-                                    </button>
-                                    <textField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Jnj-NY-AI4">
-                                        <rect key="frame" x="36" y="10" width="262" height="21"/>
-                                        <constraints>
-                                            <constraint firstAttribute="width" constant="262" id="hgG-eL-ZOS"/>
-                                        </constraints>
-                                        <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" id="5ok-zf-jSe">
-                                            <font key="font" metaFont="system"/>
-                                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                                            <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                        </textFieldCell>
-                                    </textField>
-                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="KJc-ko-3Kw">
-                                        <rect key="frame" x="39" y="13" width="37" height="16"/>
-                                        <textFieldCell key="cell" lineBreakMode="truncatingMiddle" title="Label" usesSingleLineMode="YES" id="6or-J4-wML">
-                                            <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>
-                                    <colorWell translatesAutoresizingMaskIntoConstraints="NO" id="ZXz-PO-D6F">
-                                        <rect key="frame" x="87" y="66" width="58" height="32"/>
-                                        <constraints>
-                                            <constraint firstAttribute="width" constant="52" id="HT7-i5-WfO"/>
-                                            <constraint firstAttribute="height" constant="28" id="Z6D-3W-CMF"/>
-                                        </constraints>
-                                        <color key="color" red="0.05813049898" green="0.055541899059999997" blue="1" alpha="1" colorSpace="calibratedRGB"/>
-                                        <connections>
-                                            <action selector="colorWellChanged:" target="-2" id="JGb-Zs-nRh"/>
-                                        </connections>
-                                    </colorWell>
-                                </subviews>
-                                <constraints>
-                                    <constraint firstItem="Lzl-LX-D6c" firstAttribute="leading" secondItem="IHa-Le-PQB" secondAttribute="trailing" constant="5" id="2Ab-hu-XoL"/>
-                                    <constraint firstAttribute="bottom" secondItem="Jnj-NY-AI4" secondAttribute="bottom" constant="10" id="5Yb-OT-5BI"/>
-                                    <constraint firstItem="uJE-UR-TcB" firstAttribute="top" secondItem="jlb-9G-otw" secondAttribute="top" constant="10" id="6sq-y4-Ipc"/>
-                                    <constraint firstItem="e5H-Ra-5M6" firstAttribute="leading" secondItem="uJE-UR-TcB" secondAttribute="leading" id="9M6-1E-W0s"/>
-                                    <constraint firstItem="Jnj-NY-AI4" firstAttribute="leading" secondItem="jlb-9G-otw" secondAttribute="leading" constant="36" id="DBw-yZ-SLf"/>
-                                    <constraint firstItem="e5H-Ra-5M6" firstAttribute="top" secondItem="uJE-UR-TcB" secondAttribute="bottom" constant="24" id="Def-0m-EjF"/>
-                                    <constraint firstItem="FdJ-Mo-ixe" firstAttribute="leading" secondItem="Jmd-Ox-rOL" secondAttribute="trailing" constant="20" id="EHM-mz-W9f"/>
-                                    <constraint firstItem="ZXz-PO-D6F" firstAttribute="leading" secondItem="uJE-UR-TcB" secondAttribute="trailing" constant="15" id="Hd6-h6-h50"/>
-                                    <constraint firstItem="uJE-UR-TcB" firstAttribute="leading" secondItem="jlb-9G-otw" secondAttribute="leading" constant="16" id="IIb-EK-E1k"/>
-                                    <constraint firstItem="FdJ-Mo-ixe" firstAttribute="centerY" secondItem="Jmd-Ox-rOL" secondAttribute="centerY" id="IcJ-5a-vUU"/>
-                                    <constraint firstItem="IHa-Le-PQB" firstAttribute="centerY" secondItem="Jmd-Ox-rOL" secondAttribute="centerY" id="Mj6-1r-dnd"/>
-                                    <constraint firstItem="KJc-ko-3Kw" firstAttribute="centerY" secondItem="Jnj-NY-AI4" secondAttribute="centerY" id="ZhK-Fe-Nwu"/>
-                                    <constraint firstItem="Jmd-Ox-rOL" firstAttribute="centerY" secondItem="Jnj-NY-AI4" secondAttribute="centerY" id="aXq-UH-CA7"/>
-                                    <constraint firstItem="Lzl-LX-D6c" firstAttribute="centerY" secondItem="Jmd-Ox-rOL" secondAttribute="centerY" id="do1-fy-0C2"/>
-                                    <constraint firstItem="KJc-ko-3Kw" firstAttribute="leading" secondItem="Jnj-NY-AI4" secondAttribute="leading" constant="5" id="jEs-tE-5P3"/>
-                                    <constraint firstItem="IHa-Le-PQB" firstAttribute="centerY" secondItem="FdJ-Mo-ixe" secondAttribute="centerY" id="kHi-9r-W1s"/>
-                                    <constraint firstItem="Jnj-NY-AI4" firstAttribute="top" secondItem="e5H-Ra-5M6" secondAttribute="bottom" constant="3" id="npE-QW-V5C"/>
-                                    <constraint firstItem="ZXz-PO-D6F" firstAttribute="centerY" secondItem="uJE-UR-TcB" secondAttribute="centerY" id="qqm-Nc-4BG"/>
-                                    <constraint firstItem="IHa-Le-PQB" firstAttribute="leading" secondItem="FdJ-Mo-ixe" secondAttribute="trailing" constant="2" id="rqW-SD-3cJ"/>
-                                    <constraint firstItem="Jmd-Ox-rOL" firstAttribute="leading" secondItem="Jnj-NY-AI4" secondAttribute="trailing" constant="11" id="skf-Cu-J3o"/>
-                                    <constraint firstItem="KJc-ko-3Kw" firstAttribute="trailing" relation="lessThanOrEqual" secondItem="Jnj-NY-AI4" secondAttribute="trailing" constant="-5" id="tLh-Z2-dSr"/>
-                                    <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="Lzl-LX-D6c" secondAttribute="trailing" id="x3K-Wt-QyH"/>
-                                </constraints>
-                            </view>
-                        </box>
-                        <box title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="uVG-9U-es7">
-                            <rect key="frame" x="319" y="276" width="636" height="135"/>
-                            <view key="contentView" id="CcN-Hf-zoH">
-                                <rect key="frame" x="4" y="5" width="628" height="115"/>
-                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                                <subviews>
-                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="rm6-4f-1Wl">
-                                        <rect key="frame" x="14" y="83" width="74" height="16"/>
-                                        <textFieldCell key="cell" lineBreakMode="clipping" title="1" id="8C9-F6-Qni">
-                                            <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>
-                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="xZ8-fz-ItF">
-                                        <rect key="frame" x="14" y="49" width="10" height="16"/>
-                                        <textFieldCell key="cell" lineBreakMode="clipping" title="1" id="Xls-w9-vI8">
-                                            <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>
-                                    <textField hidden="YES" focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="XDg-Xx-kal">
-                                        <rect key="frame" x="14" y="20" width="74" height="16"/>
-                                        <textFieldCell key="cell" lineBreakMode="clipping" title="sdfsdfdfsdf" id="jbz-vS-PPC">
-                                            <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>
-                                    <textField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="VpQ-rd-1lb">
-                                        <rect key="frame" x="92" y="81" width="100" height="21"/>
-                                        <constraints>
-                                            <constraint firstAttribute="width" constant="100" id="RD9-e3-VvL"/>
-                                        </constraints>
-                                        <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" alignment="left" drawsBackground="YES" id="RIq-Hf-dbc">
-                                            <numberFormatter key="formatter" formatterBehavior="default10_4" usesGroupingSeparator="NO" formatWidth="-1" groupingSize="0" minimumIntegerDigits="1" maximumIntegerDigits="42" id="DfG-tg-QD2">
-                                                <real key="minimum" value="-360"/>
-                                                <real key="maximum" value="360"/>
-                                            </numberFormatter>
-                                            <font key="font" metaFont="system"/>
-                                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                                            <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                        </textFieldCell>
-                                    </textField>
-                                    <stepper horizontalHuggingPriority="750" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ZfX-mo-ogH">
-                                        <rect key="frame" x="194" y="77" width="19" height="28"/>
-                                        <stepperCell key="cell" continuous="YES" alignment="left" minValue="-360" maxValue="360" id="biN-b0-SBQ"/>
-                                        <connections>
-                                            <action selector="angleStepperAction:" target="-2" id="sBY-Ol-iXL"/>
-                                        </connections>
-                                    </stepper>
-                                    <slider verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="qgx-tW-Cch">
-                                        <rect key="frame" x="90" y="41" width="122" height="28"/>
-                                        <sliderCell key="cell" state="on" alignment="left" maxValue="1" doubleValue="1" tickMarkPosition="above" sliderType="linear" id="8VV-02-LhX"/>
-                                        <connections>
-                                            <action selector="alphaSliderAction:" target="-2" id="Cbq-0j-rSD"/>
-                                        </connections>
-                                    </slider>
-                                    <button hidden="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="7M2-46-8tV">
-                                        <rect key="frame" x="175" y="19" width="61" height="18"/>
-                                        <buttonCell key="cell" type="radio" title="Radio" bezelStyle="regularSquare" imagePosition="left" alignment="left" inset="2" id="a9o-sz-WQq">
-                                            <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                                            <font key="font" metaFont="system"/>
-                                        </buttonCell>
-                                    </button>
-                                    <button hidden="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="zwd-Et-1km">
-                                        <rect key="frame" x="90" y="19" width="61" height="18"/>
-                                        <buttonCell key="cell" type="radio" title="Radio" bezelStyle="regularSquare" imagePosition="left" alignment="left" inset="2" id="CFt-95-ZhP">
-                                            <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                                            <font key="font" metaFont="system"/>
-                                        </buttonCell>
-                                    </button>
-                                    <textField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Yw0-0L-CLB">
-                                        <rect key="frame" x="230" y="47" width="64" height="21"/>
-                                        <constraints>
-                                            <constraint firstAttribute="width" constant="64" id="Xbo-Bt-Oqm"/>
-                                        </constraints>
-                                        <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" alignment="center" drawsBackground="YES" id="bS0-rm-aO2">
-                                            <numberFormatter key="formatter" formatterBehavior="default10_4" numberStyle="percent" formatWidth="-1" minimumIntegerDigits="1" maximumIntegerDigits="2000000000" id="Ub0-AL-XUJ">
-                                                <integer key="multiplier" value="100"/>
-                                                <real key="minimum" value="0.0"/>
-                                                <real key="maximum" value="1"/>
-                                            </numberFormatter>
-                                            <font key="font" metaFont="system"/>
-                                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                                            <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                        </textFieldCell>
-                                    </textField>
-                                    <stepper horizontalHuggingPriority="750" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="sVe-7U-Sr3">
-                                        <rect key="frame" x="298" y="43" width="19" height="28"/>
-                                        <stepperCell key="cell" continuous="YES" alignment="left" increment="0.01" maxValue="1" id="Oaa-8F-8y4"/>
-                                        <connections>
-                                            <action selector="alphaSteperAction:" target="-2" id="NLP-JP-TIW"/>
-                                        </connections>
-                                    </stepper>
-                                    <customView translatesAutoresizingMaskIntoConstraints="NO" id="plG-s5-sBd" customClass="KMPostionIndicateView" customModule="PDF_Master" customModuleProvider="target">
-                                        <rect key="frame" x="366" y="20" width="80" height="80"/>
-                                        <constraints>
-                                            <constraint firstAttribute="height" constant="80" id="Vzf-gu-lfR"/>
-                                            <constraint firstAttribute="width" constant="80" id="gXd-35-hb9"/>
-                                        </constraints>
-                                    </customView>
-                                    <stepper horizontalHuggingPriority="750" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="RYW-E6-8Ph">
-                                        <rect key="frame" x="540" y="27" width="19" height="28"/>
-                                        <stepperCell key="cell" continuous="YES" alignment="left" minValue="-1000" maxValue="1000" id="cqc-YJ-42A"/>
-                                        <connections>
-                                            <action selector="horizentalStepperAction:" target="-2" id="RPg-qQ-aSR"/>
-                                        </connections>
-                                    </stepper>
-                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="WNU-SS-y7q">
-                                        <rect key="frame" x="456" y="67" width="10" height="16"/>
-                                        <textFieldCell key="cell" lineBreakMode="clipping" title="1" id="ew9-Av-Kga">
-                                            <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>
-                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="PVJ-QE-OSa">
-                                        <rect key="frame" x="456" y="33" width="10" height="16"/>
-                                        <textFieldCell key="cell" lineBreakMode="clipping" title="1" id="lfO-bi-QOP">
-                                            <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>
-                                    <stepper horizontalHuggingPriority="750" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="FK4-eP-ZsW">
-                                        <rect key="frame" x="540" y="61" width="19" height="28"/>
-                                        <stepperCell key="cell" continuous="YES" alignment="left" minValue="-1000" maxValue="1000" id="3Z7-UA-5Sc"/>
-                                        <connections>
-                                            <action selector="verticalStepperAction:" target="-2" id="YMz-0X-9OG"/>
-                                        </connections>
-                                    </stepper>
-                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="RTe-5d-eUd">
-                                        <rect key="frame" x="14" y="17" width="37" height="16"/>
-                                        <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="mQ6-iG-xAG">
-                                            <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>
-                                    <comboBox focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="hai-eI-TEB">
-                                        <rect key="frame" x="91" y="13" width="226" height="23"/>
-                                        <comboBoxCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" bezelStyle="round" completes="NO" numberOfVisibleItems="5" id="JWl-vg-Fr6">
-                                            <font key="font" metaFont="system"/>
-                                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                                            <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                            <objectValues>
-                                                <string>Item 1</string>
-                                                <string>Item 2</string>
-                                                <string>Item 3</string>
-                                            </objectValues>
-                                        </comboBoxCell>
-                                    </comboBox>
-                                    <textField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="h7e-Zv-9g0">
-                                        <rect key="frame" x="474" y="64" width="64" height="21"/>
-                                        <constraints>
-                                            <constraint firstAttribute="width" constant="64" id="B5N-yq-Ejj"/>
-                                        </constraints>
-                                        <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" alignment="left" drawsBackground="YES" id="fCq-oO-Dat">
-                                            <numberFormatter key="formatter" formatterBehavior="default10_4" usesGroupingSeparator="NO" formatWidth="-1" groupingSize="0" minimumIntegerDigits="1" maximumIntegerDigits="42" id="KDn-PG-2et">
-                                                <real key="minimum" value="-1000"/>
-                                                <real key="maximum" value="1000"/>
-                                            </numberFormatter>
-                                            <font key="font" metaFont="system"/>
-                                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                                            <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                        </textFieldCell>
-                                    </textField>
-                                    <textField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="TN8-0T-3ni">
-                                        <rect key="frame" x="474" y="30" width="64" height="21"/>
-                                        <constraints>
-                                            <constraint firstAttribute="width" constant="64" id="TAk-Sb-NDr"/>
-                                        </constraints>
-                                        <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" alignment="left" drawsBackground="YES" id="gcv-gL-YTm">
-                                            <numberFormatter key="formatter" formatterBehavior="default10_4" usesGroupingSeparator="NO" formatWidth="-1" groupingSize="0" minimumIntegerDigits="1" maximumIntegerDigits="42" id="UJ8-Zy-LOZ">
-                                                <real key="minimum" value="-1000"/>
-                                                <real key="maximum" value="1000"/>
-                                            </numberFormatter>
-                                            <font key="font" metaFont="system"/>
-                                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                                            <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                        </textFieldCell>
-                                    </textField>
-                                    <customView translatesAutoresizingMaskIntoConstraints="NO" id="Qbj-dr-1LX" customClass="KMAngleIndicateView" customModule="PDF_Master" customModuleProvider="target">
-                                        <rect key="frame" x="230" y="77" width="20" height="28"/>
-                                        <constraints>
-                                            <constraint firstAttribute="height" constant="28" id="YcK-XO-cVB"/>
-                                            <constraint firstAttribute="width" constant="20" id="v4N-2u-Oi4"/>
-                                        </constraints>
-                                    </customView>
-                                    <customView translatesAutoresizingMaskIntoConstraints="NO" id="nic-kL-H4J" customClass="KMAngleIndicateView" customModule="PDF_Master" customModuleProvider="target">
-                                        <rect key="frame" x="294" y="77" width="20" height="28"/>
-                                        <constraints>
-                                            <constraint firstAttribute="height" constant="28" id="8fk-3T-ax0"/>
-                                            <constraint firstAttribute="width" constant="20" id="Xj5-yz-db5"/>
-                                        </constraints>
-                                    </customView>
-                                    <customView translatesAutoresizingMaskIntoConstraints="NO" id="BBR-fQ-n2l" customClass="KMAngleIndicateView" customModule="PDF_Master" customModuleProvider="target">
-                                        <rect key="frame" x="262" y="77" width="20" height="28"/>
-                                        <constraints>
-                                            <constraint firstAttribute="width" constant="20" id="9aZ-hm-Pdw"/>
-                                            <constraint firstAttribute="height" constant="28" id="LP8-dN-Ykg"/>
-                                        </constraints>
-                                    </customView>
-                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ny5-4M-SSy">
-                                        <rect key="frame" x="556" y="67" width="27" height="16"/>
-                                        <textFieldCell key="cell" lineBreakMode="clipping" title="mm" id="wO0-ZF-tkf">
-                                            <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>
-                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="MI0-Nh-OTL">
-                                        <rect key="frame" x="556" y="33" width="27" height="16"/>
-                                        <textFieldCell key="cell" lineBreakMode="clipping" title="mm" id="IkR-eF-sFp">
-                                            <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>
-                                </subviews>
-                                <constraints>
-                                    <constraint firstItem="h7e-Zv-9g0" firstAttribute="leading" secondItem="WNU-SS-y7q" secondAttribute="trailing" constant="10" id="1D6-Wv-Jvs"/>
-                                    <constraint firstItem="TN8-0T-3ni" firstAttribute="leading" secondItem="h7e-Zv-9g0" secondAttribute="leading" id="2e2-C8-dlH"/>
-                                    <constraint firstItem="h7e-Zv-9g0" firstAttribute="top" secondItem="CcN-Hf-zoH" secondAttribute="top" constant="30" id="6De-iD-yCK"/>
-                                    <constraint firstItem="WNU-SS-y7q" firstAttribute="centerY" secondItem="h7e-Zv-9g0" secondAttribute="centerY" id="6Yd-hl-ih9"/>
-                                    <constraint firstItem="zwd-Et-1km" firstAttribute="leading" secondItem="VpQ-rd-1lb" secondAttribute="leading" id="802-OQ-oJD"/>
-                                    <constraint firstItem="nic-kL-H4J" firstAttribute="leading" secondItem="BBR-fQ-n2l" secondAttribute="trailing" constant="12" id="8SP-al-1QT"/>
-                                    <constraint firstItem="qgx-tW-Cch" firstAttribute="leading" secondItem="VpQ-rd-1lb" secondAttribute="leading" id="9VN-rN-nZq"/>
-                                    <constraint firstItem="7M2-46-8tV" firstAttribute="leading" secondItem="zwd-Et-1km" secondAttribute="trailing" constant="26" id="9fV-fk-8w0"/>
-                                    <constraint firstItem="sVe-7U-Sr3" firstAttribute="leading" secondItem="Yw0-0L-CLB" secondAttribute="trailing" constant="7" id="ANq-9Z-Mgl"/>
-                                    <constraint firstItem="sVe-7U-Sr3" firstAttribute="centerY" secondItem="xZ8-fz-ItF" secondAttribute="centerY" id="Bz1-dP-r7H"/>
-                                    <constraint firstItem="RYW-E6-8Ph" firstAttribute="leading" secondItem="TN8-0T-3ni" secondAttribute="trailing" constant="5" id="CQJ-ES-Css"/>
-                                    <constraint firstItem="PVJ-QE-OSa" firstAttribute="centerY" secondItem="TN8-0T-3ni" secondAttribute="centerY" id="Ffw-0c-obe"/>
-                                    <constraint firstItem="ny5-4M-SSy" firstAttribute="centerY" secondItem="h7e-Zv-9g0" secondAttribute="centerY" id="FiB-ew-eV2"/>
-                                    <constraint firstItem="rm6-4f-1Wl" firstAttribute="leading" secondItem="CcN-Hf-zoH" secondAttribute="leading" constant="16" id="Hmm-SG-Wcl"/>
-                                    <constraint firstItem="zwd-Et-1km" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="XDg-Xx-kal" secondAttribute="trailing" constant="6" id="KnF-sW-YXu"/>
-                                    <constraint firstItem="Yw0-0L-CLB" firstAttribute="leading" secondItem="Qbj-dr-1LX" secondAttribute="leading" id="L5h-Ne-d2a"/>
-                                    <constraint firstItem="sVe-7U-Sr3" firstAttribute="trailing" secondItem="hai-eI-TEB" secondAttribute="trailing" id="Ln6-3L-tya"/>
-                                    <constraint firstItem="FK4-eP-ZsW" firstAttribute="centerY" secondItem="h7e-Zv-9g0" secondAttribute="centerY" id="N6l-0u-IxF"/>
-                                    <constraint firstItem="xZ8-fz-ItF" firstAttribute="leading" secondItem="rm6-4f-1Wl" secondAttribute="leading" id="Nzd-Mn-g9S"/>
-                                    <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="MI0-Nh-OTL" secondAttribute="trailing" id="Pjv-xh-60Z"/>
-                                    <constraint firstItem="RYW-E6-8Ph" firstAttribute="centerY" secondItem="PVJ-QE-OSa" secondAttribute="centerY" id="RCx-9F-UxM"/>
-                                    <constraint firstItem="VpQ-rd-1lb" firstAttribute="centerY" secondItem="rm6-4f-1Wl" secondAttribute="centerY" id="S3a-Zc-xAr"/>
-                                    <constraint firstItem="XDg-Xx-kal" firstAttribute="top" secondItem="xZ8-fz-ItF" secondAttribute="bottom" constant="13" id="T3m-S0-qwe"/>
-                                    <constraint firstItem="BBR-fQ-n2l" firstAttribute="centerY" secondItem="ZfX-mo-ogH" secondAttribute="centerY" id="TUJ-k8-o3B"/>
-                                    <constraint firstItem="TN8-0T-3ni" firstAttribute="top" secondItem="h7e-Zv-9g0" secondAttribute="bottom" constant="13" id="TXO-QQ-Qa1"/>
-                                    <constraint firstItem="plG-s5-sBd" firstAttribute="top" secondItem="nic-kL-H4J" secondAttribute="top" constant="5" id="UvA-Dd-zJW"/>
-                                    <constraint firstItem="Qbj-dr-1LX" firstAttribute="centerY" secondItem="ZfX-mo-ogH" secondAttribute="centerY" id="X9O-rH-oyZ"/>
-                                    <constraint firstItem="VpQ-rd-1lb" firstAttribute="leading" secondItem="rm6-4f-1Wl" secondAttribute="trailing" constant="6" id="Yw4-va-esT"/>
-                                    <constraint firstItem="hai-eI-TEB" firstAttribute="top" secondItem="7M2-46-8tV" secondAttribute="bottom" constant="-15" id="Z2U-Un-r2a"/>
-                                    <constraint firstItem="xZ8-fz-ItF" firstAttribute="top" secondItem="rm6-4f-1Wl" secondAttribute="bottom" constant="18" id="ZaD-6L-4W8"/>
-                                    <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="sVe-7U-Sr3" secondAttribute="trailing" multiplier="2" id="ZsV-i4-T1L"/>
-                                    <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="7M2-46-8tV" secondAttribute="trailing" id="bA1-uf-dtN"/>
-                                    <constraint firstItem="7M2-46-8tV" firstAttribute="centerY" secondItem="zwd-Et-1km" secondAttribute="centerY" id="d8L-hO-4eZ"/>
-                                    <constraint firstItem="ZfX-mo-ogH" firstAttribute="leading" secondItem="VpQ-rd-1lb" secondAttribute="trailing" constant="5" id="fsf-tk-9sL"/>
-                                    <constraint firstItem="hai-eI-TEB" firstAttribute="leading" secondItem="qgx-tW-Cch" secondAttribute="leading" id="gjg-kk-BcF"/>
-                                    <constraint firstItem="qgx-tW-Cch" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="xZ8-fz-ItF" secondAttribute="trailing" constant="6" id="h8s-bS-jRW"/>
-                                    <constraint firstItem="plG-s5-sBd" firstAttribute="leading" secondItem="sVe-7U-Sr3" secondAttribute="trailing" constant="52" id="i1w-sc-XUf"/>
-                                    <constraint firstItem="hai-eI-TEB" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="RTe-5d-eUd" secondAttribute="trailing" constant="6" id="iou-dd-a9y"/>
-                                    <constraint firstItem="qgx-tW-Cch" firstAttribute="centerY" secondItem="xZ8-fz-ItF" secondAttribute="centerY" id="j6M-Ge-CNS"/>
-                                    <constraint firstItem="RTe-5d-eUd" firstAttribute="leading" secondItem="XDg-Xx-kal" secondAttribute="leading" id="j89-pe-6Cv"/>
-                                    <constraint firstItem="rm6-4f-1Wl" firstAttribute="top" secondItem="CcN-Hf-zoH" secondAttribute="top" constant="16" id="kGj-YG-iCN"/>
-                                    <constraint firstItem="ZfX-mo-ogH" firstAttribute="centerY" secondItem="rm6-4f-1Wl" secondAttribute="centerY" id="kcz-Ue-8Hs"/>
-                                    <constraint firstItem="hai-eI-TEB" firstAttribute="centerY" secondItem="RTe-5d-eUd" secondAttribute="centerY" id="l7z-VU-R2N"/>
-                                    <constraint firstItem="MI0-Nh-OTL" firstAttribute="centerY" secondItem="TN8-0T-3ni" secondAttribute="centerY" id="mHW-HH-Svy"/>
-                                    <constraint firstItem="XDg-Xx-kal" firstAttribute="leading" secondItem="rm6-4f-1Wl" secondAttribute="leading" id="mXt-pM-5DO"/>
-                                    <constraint firstItem="WNU-SS-y7q" firstAttribute="leading" secondItem="plG-s5-sBd" secondAttribute="trailing" constant="12" id="oNX-RA-WAc"/>
-                                    <constraint firstAttribute="bottom" secondItem="plG-s5-sBd" secondAttribute="bottom" constant="20" id="p3k-ML-lJH"/>
-                                    <constraint firstItem="BBR-fQ-n2l" firstAttribute="leading" secondItem="Qbj-dr-1LX" secondAttribute="trailing" constant="12" id="po9-Ud-tjK"/>
-                                    <constraint firstItem="nic-kL-H4J" firstAttribute="centerY" secondItem="ZfX-mo-ogH" secondAttribute="centerY" id="prx-qh-ECq"/>
-                                    <constraint firstItem="Qbj-dr-1LX" firstAttribute="leading" secondItem="ZfX-mo-ogH" secondAttribute="trailing" constant="20" id="rbO-gt-gOQ"/>
-                                    <constraint firstItem="Yw0-0L-CLB" firstAttribute="centerY" secondItem="xZ8-fz-ItF" secondAttribute="centerY" id="sFs-vA-B7W"/>
-                                    <constraint firstItem="FK4-eP-ZsW" firstAttribute="leading" secondItem="h7e-Zv-9g0" secondAttribute="trailing" constant="5" id="tey-aP-sfK"/>
-                                    <constraint firstItem="PVJ-QE-OSa" firstAttribute="leading" secondItem="WNU-SS-y7q" secondAttribute="leading" id="u4A-1a-TM7"/>
-                                    <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="ny5-4M-SSy" secondAttribute="trailing" constant="20" id="vk8-EE-LtY"/>
-                                    <constraint firstItem="qgx-tW-Cch" firstAttribute="trailing" secondItem="ZfX-mo-ogH" secondAttribute="trailing" id="xJx-kj-ZHh"/>
-                                    <constraint firstItem="MI0-Nh-OTL" firstAttribute="leading" secondItem="FK4-eP-ZsW" secondAttribute="trailing" constant="2" id="yVd-PW-kAL"/>
-                                    <constraint firstItem="zwd-Et-1km" firstAttribute="centerY" secondItem="XDg-Xx-kal" secondAttribute="centerY" id="yX3-rs-j2M"/>
-                                    <constraint firstItem="ny5-4M-SSy" firstAttribute="leading" secondItem="FK4-eP-ZsW" secondAttribute="trailing" constant="2" id="ys1-hg-mpi"/>
-                                </constraints>
-                            </view>
-                        </box>
-                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="tLK-st-rLL">
-                            <rect key="frame" x="336" y="245" width="65" height="18"/>
-                            <buttonCell key="cell" type="check" title="Check" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="VJh-Dn-P0C">
-                                <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
-                        </button>
-                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="SAP-r8-yOW">
-                            <rect key="frame" x="354" y="225" width="37" height="16"/>
-                            <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="FP9-WZ-cOn">
-                                <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>
-                        <textField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="pkF-sT-JBT">
-                            <rect key="frame" x="397" y="222" width="300" height="21"/>
-                            <constraints>
-                                <constraint firstAttribute="width" constant="300" id="Mdn-W2-sze"/>
-                            </constraints>
-                            <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" id="qzs-Va-yaU">
-                                <font key="font" metaFont="system"/>
-                                <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                            </textFieldCell>
-                        </textField>
-                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="K9f-us-FkG">
-                            <rect key="frame" x="85" y="180" width="26" height="26"/>
-                            <buttonCell key="cell" type="round" title="Button" bezelStyle="circular" image="NSGoLeftTemplate" imagePosition="only" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="H93-rU-k6X">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
-                            <connections>
-                                <action selector="goPrevious:" target="-2" id="KUt-zo-kF2"/>
-                            </connections>
-                        </button>
-                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="u7Q-0V-OLh">
-                            <rect key="frame" x="130" y="182" width="61" height="22"/>
-                            <subviews>
-                                <textField focusRingType="none" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="auI-8C-JAb">
-                                    <rect key="frame" x="0.0" y="0.0" width="40" height="22"/>
-                                    <constraints>
-                                        <constraint firstAttribute="width" constant="40" id="6oI-8R-0Bk"/>
-                                        <constraint firstAttribute="height" constant="22" id="lQM-Pl-ywn"/>
-                                    </constraints>
-                                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="center" drawsBackground="YES" id="gUx-NJ-4wD">
-                                        <numberFormatter key="formatter" formatterBehavior="default10_4" usesGroupingSeparator="NO" groupingSize="0" minimumIntegerDigits="0" maximumIntegerDigits="42" id="PWM-ba-xo0">
-                                            <real key="minimum" value="1"/>
-                                        </numberFormatter>
-                                        <font key="font" metaFont="system"/>
-                                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                    </textFieldCell>
-                                </textField>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="W2y-dS-mSh">
-                                    <rect key="frame" x="43" y="3" width="20" height="16"/>
-                                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="/ 0" id="cZV-lp-F3g">
-                                        <font key="font" metaFont="system"/>
-                                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
-                                    </textFieldCell>
-                                </textField>
-                            </subviews>
-                            <constraints>
-                                <constraint firstItem="auI-8C-JAb" firstAttribute="top" secondItem="u7Q-0V-OLh" secondAttribute="top" id="276-zB-H4m"/>
-                                <constraint firstItem="W2y-dS-mSh" firstAttribute="leading" secondItem="auI-8C-JAb" secondAttribute="trailing" constant="5" id="71L-e7-icn"/>
-                                <constraint firstAttribute="bottom" secondItem="auI-8C-JAb" secondAttribute="bottom" id="EDE-K0-BDc"/>
-                                <constraint firstItem="W2y-dS-mSh" firstAttribute="centerY" secondItem="auI-8C-JAb" secondAttribute="centerY" id="cVJ-UH-Xv1"/>
-                                <constraint firstItem="auI-8C-JAb" firstAttribute="leading" secondItem="u7Q-0V-OLh" secondAttribute="leading" id="khY-Jl-ly3"/>
-                                <constraint firstAttribute="trailing" secondItem="W2y-dS-mSh" secondAttribute="trailing" id="uxo-8z-294"/>
-                            </constraints>
-                        </customView>
-                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="grh-Kn-g1l">
-                            <rect key="frame" x="210" y="180" width="26" height="26"/>
-                            <buttonCell key="cell" type="round" bezelStyle="circular" image="NSGoRightTemplate" imagePosition="only" alignment="center" borderStyle="border" inset="2" id="A9a-D9-oCR">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
-                            <connections>
-                                <action selector="goNext:" target="-2" id="0FB-JT-pWn"/>
-                            </connections>
-                        </button>
-                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="dCQ-Gq-Cst">
-                            <rect key="frame" x="8" y="11" width="75" height="32"/>
-                            <buttonCell key="cell" type="push" title="Button" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="WIS-RP-n1S">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
-                            <connections>
-                                <action selector="buttonClicked_Batch:" target="-2" id="Ix0-ax-gMh"/>
-                            </connections>
-                        </button>
-                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="V6K-Pu-pZ6">
-                            <rect key="frame" x="910" y="11" width="75" height="32"/>
-                            <buttonCell key="cell" type="push" title="Button" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="n0u-IX-Iff">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                                <string key="keyEquivalent" base64-UTF8="YES">
-DQ
-</string>
-                            </buttonCell>
-                            <connections>
-                                <action selector="buttonClicked_Done:" target="-2" id="mmP-pS-kCI"/>
-                            </connections>
-                        </button>
-                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="D5H-CW-WxN">
-                            <rect key="frame" x="842" y="11" width="75" height="32"/>
-                            <buttonCell key="cell" type="push" title="Button" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="cni-Uf-NpA">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
-                            <connections>
-                                <action selector="cancelButtonAction:" target="-2" id="OMN-Ow-Evt"/>
-                            </connections>
-                        </button>
-                    </subviews>
-                    <constraints>
-                        <constraint firstItem="V6K-Pu-pZ6" firstAttribute="centerY" secondItem="D5H-CW-WxN" secondAttribute="centerY" id="0oN-Fl-mGh"/>
-                        <constraint firstItem="u7Q-0V-OLh" firstAttribute="centerY" secondItem="K9f-us-FkG" secondAttribute="centerY" id="33T-mZ-dLQ"/>
-                        <constraint firstAttribute="trailing" secondItem="wuk-f8-DLJ" secondAttribute="trailing" constant="40" id="3fe-g2-DuY"/>
-                        <constraint firstItem="V6K-Pu-pZ6" firstAttribute="leading" secondItem="D5H-CW-WxN" secondAttribute="trailing" constant="7" id="5E9-37-hFE"/>
-                        <constraint firstItem="SAP-r8-yOW" firstAttribute="leading" secondItem="tLK-st-rLL" secondAttribute="leading" constant="18" id="AeH-bJ-jRp"/>
-                        <constraint firstAttribute="trailing" secondItem="V6K-Pu-pZ6" secondAttribute="trailing" constant="14" id="Anv-ih-qxF"/>
-                        <constraint firstItem="SAP-r8-yOW" firstAttribute="top" secondItem="tLK-st-rLL" secondAttribute="bottom" constant="5" id="BJh-Ba-MXJ"/>
-                        <constraint firstItem="dCQ-Gq-Cst" firstAttribute="leading" secondItem="rxq-as-8Qd" secondAttribute="leading" constant="15" id="EeL-0f-EBE"/>
-                        <constraint firstItem="wuk-f8-DLJ" firstAttribute="leading" secondItem="afp-IL-Bkr" secondAttribute="trailing" constant="42" id="EwO-Y7-2eK"/>
-                        <constraint firstItem="uVG-9U-es7" firstAttribute="trailing" secondItem="wuk-f8-DLJ" secondAttribute="trailing" id="FPA-n4-6Pu"/>
-                        <constraint firstItem="D5H-CW-WxN" firstAttribute="top" relation="greaterThanOrEqual" secondItem="pkF-sT-JBT" secondAttribute="bottom" constant="39" id="GrD-dG-HHe"/>
-                        <constraint firstItem="afp-IL-Bkr" firstAttribute="leading" secondItem="rxq-as-8Qd" secondAttribute="leading" constant="40" id="OTS-Zc-Pd7"/>
-                        <constraint firstItem="u7Q-0V-OLh" firstAttribute="top" secondItem="afp-IL-Bkr" secondAttribute="bottom" constant="15" id="PV2-YU-Ing"/>
-                        <constraint firstAttribute="bottom" secondItem="V6K-Pu-pZ6" secondAttribute="bottom" constant="18" id="Pn4-YB-RD4"/>
-                        <constraint firstItem="pkF-sT-JBT" firstAttribute="leading" secondItem="SAP-r8-yOW" secondAttribute="trailing" constant="8" id="SKL-cO-V5K"/>
-                        <constraint firstItem="tLK-st-rLL" firstAttribute="leading" secondItem="uVG-9U-es7" secondAttribute="leading" constant="16" id="TLY-dc-ocD"/>
-                        <constraint firstItem="tLK-st-rLL" firstAttribute="top" secondItem="uVG-9U-es7" secondAttribute="bottom" constant="18" id="Uui-go-7C9"/>
-                        <constraint firstItem="u7Q-0V-OLh" firstAttribute="leading" secondItem="K9f-us-FkG" secondAttribute="trailing" constant="22" id="Wbx-mt-6l3"/>
-                        <constraint firstItem="uVG-9U-es7" firstAttribute="top" secondItem="wuk-f8-DLJ" secondAttribute="bottom" constant="20" id="X8T-oM-iuF"/>
-                        <constraint firstItem="wuk-f8-DLJ" firstAttribute="top" secondItem="rxq-as-8Qd" secondAttribute="top" constant="18" id="YEy-cP-suU"/>
-                        <constraint firstItem="u7Q-0V-OLh" firstAttribute="centerX" secondItem="afp-IL-Bkr" secondAttribute="centerX" id="a7q-sr-6Kq"/>
-                        <constraint firstItem="afp-IL-Bkr" firstAttribute="top" secondItem="rxq-as-8Qd" secondAttribute="top" constant="36" id="diP-42-rJG"/>
-                        <constraint firstItem="pkF-sT-JBT" firstAttribute="firstBaseline" secondItem="SAP-r8-yOW" secondAttribute="firstBaseline" id="iqs-gM-id9"/>
-                        <constraint firstItem="uVG-9U-es7" firstAttribute="leading" secondItem="wuk-f8-DLJ" secondAttribute="leading" id="ljn-vW-5Ie"/>
-                        <constraint firstItem="grh-Kn-g1l" firstAttribute="leading" secondItem="u7Q-0V-OLh" secondAttribute="trailing" constant="22" id="mGt-lo-Kbi"/>
-                        <constraint firstItem="grh-Kn-g1l" firstAttribute="centerY" secondItem="u7Q-0V-OLh" secondAttribute="centerY" id="t6B-b6-hpv"/>
-                        <constraint firstItem="D5H-CW-WxN" firstAttribute="centerY" secondItem="dCQ-Gq-Cst" secondAttribute="centerY" id="vSf-Zw-pjB"/>
-                    </constraints>
-                </view>
-            </subviews>
-            <constraints>
-                <constraint firstAttribute="trailing" secondItem="rxq-as-8Qd" secondAttribute="trailing" id="VUA-Pk-la4"/>
-                <constraint firstItem="rxq-as-8Qd" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" id="Yok-uk-7aV"/>
-                <constraint firstItem="rxq-as-8Qd" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" id="udG-sL-Z3y"/>
-                <constraint firstAttribute="bottom" secondItem="rxq-as-8Qd" secondAttribute="bottom" id="wVp-1Z-vUf"/>
-            </constraints>
-            <point key="canvasLocation" x="268" y="292.5"/>
-        </customView>
-    </objects>
-    <resources>
-        <image name="NSGoLeftTemplate" width="12" height="17"/>
-        <image name="NSGoRightTemplate" width="12" height="17"/>
-    </resources>
-</document>

+ 0 - 233
PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Background/Background/View/KMBackgroundColorView.swift

@@ -1,233 +0,0 @@
-//
-//  KMBackgroundColorView.swift
-//  PDF Reader Pro
-//
-//  Created by tangchao on 2022/12/25.
-//
-
-import Cocoa
-
-typealias KMBackgroundColorItemViewClick = (_ itemID: Int) -> ()
-class KMBackgroundColorItemView: NSView {
-    
-    var itemID: Int = 0
-    var colorView = NSView()
-    var button = NSButton()
-    
-    var itemClick: KMBackgroundColorItemViewClick!
-    
-    var isSelected: Bool {
-        get {
-            if (self.layer?.borderWidth == 1) {
-                return true
-            } else {
-                return false
-            }
-        }
-        set {
-            if (newValue) {
-                self.layer?.borderWidth = 1
-                self.layer?.borderColor = NSColor.black.cgColor
-            } else {
-                self.layer?.borderWidth = 0
-            }
-        }
-    }
-    
-    override init(frame frameRect: NSRect) {
-        super.init(frame: frameRect)
-        
-        initSubviews()
-    }
-    
-    required init?(coder: NSCoder) {
-        super.init(coder: coder)
-        
-        initSubviews()
-    }
-    
-    func initSubviews() {
-        self.wantsLayer = true
-        
-        self.addSubview(self.colorView)
-        self.colorView.wantsLayer = true
-        self.colorView.layer?.cornerRadius = 10
-        
-        self.addSubview(self.button)
-        self.button.isBordered = false
-        self.button.title = ""
-        self.button.target = self
-        self.button.action = #selector(buttonAction)
-    }
-    
-    override func layout() {
-        super.layout()
-        
-        let width: CGFloat = NSWidth(self.bounds)
-        let height: CGFloat = NSHeight(self.bounds)
-        let margin: CGFloat = 6
-        self.colorView.frame = NSMakeRect(margin, margin, width-2*margin, height-2*margin)
-        self.button.frame = self.colorView.frame
-    }
-    
-    override func mouseUp(with event: NSEvent) {
-        super.mouseUp(with: event)
-        
-        guard let callback = itemClick else {
-            return
-        }
-        
-        callback(self.itemID)
-    }
-    
-    @objc func buttonAction() {
-        guard let callback = itemClick else {
-            return
-        }
-        
-        callback(self.itemID)
-    }
-}
-
-typealias KMBackgroundColorViewItemClick = (_ index: Int, _ color: NSColor) -> ()
-typealias KMBackgroundColorViewColorPlateClick = () -> ()
-class KMBackgroundColorView: NSView {
-
-    var titleLabel = NSTextField(labelWithString: "")
-    var itemViews: Array<KMBackgroundColorItemView> = []
-    
-    var rightBox = NSView()
-    var colorView = NSView()
-    var colorPlateButton = NSButton()
-    
-    var itemClick: KMBackgroundColorViewItemClick!
-    var colorPlateClick: KMBackgroundColorViewColorPlateClick!
-    
-    let colors = [NSColor.red, NSColor.green, NSColor.blue, NSColor.black]
-    
-    var myColor: NSColor!
-    var color: NSColor {
-        get {
-            return myColor
-        }
-        set {
-            myColor = newValue
-            
-            var count: Int = 1
-            for color in self.colors {
-                if (color.isEqual(to: newValue)) {
-                    break
-                }
-                count += 1
-            }
-            
-            self.dealItemViewsSelected(itemID: count)
-        }
-    }
-    
-    override var isFlipped: Bool {
-        return true
-    }
-    
-    override init(frame frameRect: NSRect) {
-        super.init(frame: frameRect)
-        
-        initSubviews()
-    }
-    
-    required init?(coder: NSCoder) {
-        super.init(coder: coder)
-        
-        initSubviews()
-    }
-    
-    func initSubviews() {
-        self.addSubview(self.titleLabel)
-        self.titleLabel.stringValue = NSLocalizedString("Color", comment: "")
-        
-        self.itemViews.removeAll()
-        
-        var count: Int = 1
-        for color in self.colors {
-            let itemView = KMBackgroundColorItemView()
-            itemView.colorView.layer?.backgroundColor = color.cgColor
-            itemView.itemID = count
-            
-            self.addSubview(itemView)
-            self.itemViews.append(itemView)
-            
-            itemView.itemClick = {
-                (itemID: Int) in
-                self.dealItemViewsSelected(itemID: itemID)
-                
-                guard let callback = self.itemClick else {
-                    return
-                }
-                
-                callback(itemID, color)
-            }
-            
-            count += 1
-        }
-        
-        self.addSubview(self.rightBox)
-        self.rightBox.addSubview(self.colorView)
-        self.rightBox.addSubview(self.colorPlateButton)
-        
-        self.rightBox.wantsLayer = true
-        self.rightBox.layer?.borderWidth = 1
-        self.rightBox.layer?.borderColor = NSColor.black.cgColor
-        self.colorView.wantsLayer = true
-        self.colorView.layer?.backgroundColor = NSColor.black.cgColor
-        self.colorView.layer?.cornerRadius = 10
-        self.colorPlateButton.wantsLayer = true
-        self.colorPlateButton.isBordered = false
-        self.colorPlateButton.title = ""
-        self.colorPlateButton.layer?.cornerRadius = 10
-        self.colorPlateButton.target = self
-        self.colorPlateButton.action = #selector(colorPlateButtonAction)
-    }
-    
-    override func layout() {
-        super.layout()
-        
-        let width: CGFloat = NSWidth(self.bounds)
-        let leftMargin: CGFloat = 16
-        self.titleLabel.frame = NSMakeRect(leftMargin, 0, width-2*leftMargin, 16)
-        
-        let itemSize: CGFloat = 32
-        let itemY: CGFloat = self.titleLabel.frame.maxY+10
-        var count: Int = 0
-        var hSpace: CGFloat = 8
-        
-        for itemView in self.itemViews {
-            itemView.frame = NSMakeRect(leftMargin + CGFloat(count) * (itemSize+hSpace), itemY, itemSize, itemSize)
-            count += 1
-        }
-        
-        let rightX: CGFloat = leftMargin + CGFloat(self.itemViews.count) * (itemSize+hSpace)
-        self.rightBox.frame = NSMakeRect(rightX, itemY, 64, 32)
-        let rightItemSize: CGFloat = 20
-        let rightItemMargin: CGFloat = 6
-        self.colorView.frame = NSMakeRect(rightItemMargin, rightItemMargin, rightItemSize, rightItemSize)
-        self.colorPlateButton.frame = NSMakeRect(self.colorView.frame.maxX+10, rightItemMargin, rightItemSize, rightItemSize)
-    }
-    
-    func dealItemViewsSelected(itemID: Int) {
-        for itemView in self.itemViews {
-            if (itemView.itemID == itemID) {
-                itemView.isSelected = !itemView.isSelected
-            } else {
-                itemView.isSelected = false
-            }
-        }
-    }
-    
-    @objc func colorPlateButtonAction() {
-        guard let callback = colorPlateClick else {
-            return
-        }
-        
-        callback()
-    }
-}

+ 0 - 21
PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Background/Background/View/KMBackgroundListCell.swift

@@ -1,21 +0,0 @@
-//
-//  KMBackgroundListCell.swift
-//  PDF Reader Pro
-//
-//  Created by tangchao on 2022/12/23.
-//
-
-import Cocoa
-
-class KMBackgroundListCell: KMWatermarkAdjectiveListTableCellView {
-
-    override init(frame frameRect: NSRect) {
-        super.init(frame: frameRect)
-        
-        self.frontImageView.imageScaling = .scaleAxesIndependently
-    }
-    
-    required init?(coder: NSCoder) {
-        super.init(coder: coder)
-    }
-}

+ 0 - 31
PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Background/Background/View/KMBackgroundOutsideView.swift

@@ -1,31 +0,0 @@
-//
-//  KMBackgroundOutsideView.swift
-//  PDF Reader Pro
-//
-//  Created by tangchao on 2022/12/25.
-//
-
-import Cocoa
-
-class KMBackgroundOutsideView: KMWatermarkAdjectiveOutsideView {
-
-    override init(frame frameRect: NSRect) {
-        super.init(frame: frameRect)
-        
-        self.pageAboveComboBox.isHidden = true
-    }
-    
-    required init?(coder: NSCoder) {
-        super.init(coder: coder)
-    }
-    
-    override func layout() {
-        super.layout()
-        
-        let width: CGFloat = NSWidth(self.bounds)
-        let leftMargin: CGFloat = 16
-        self.pageTargetScale.frame = NSMakeRect(leftMargin, self.rotateButton.frame.maxY+10, width-2*leftMargin, 16)
-        self.pageTargetScaleComboBox.frame = NSMakeRect(leftMargin, self.pageTargetScale.frame.maxY+10, 100, 22)
-    }
-    
-}

+ 0 - 42
PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Background/Background/View/KMBackgroundWindowController.swift

@@ -1,42 +0,0 @@
-//
-//  KMBackgroundWindowController.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2023/11/14.
-//
-
-import Cocoa
-
-typealias KMBackgroundWindowControllerOperateCallBack = (_ controller: NSWindowController, _ background: KMBackgroundModel, _ countType: Int) -> ()
-class KMBackgroundWindowController: KMBaseWindowController {
-    
-    @IBOutlet weak var addBackgroundView: KMAddBackgroundView!
-    
-    var background: KMBackgroundModel = KMBackgroundModel()
-    
-    var type: KMBackgroundManagerType = .use
-    var currentType: Int = 0
-    var operateCallBack: KMBackgroundWindowControllerOperateCallBack?
-    
-    override func windowDidLoad() {
-        super.windowDidLoad()
-        
-        // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
-        if type == .edit {
-            addBackgroundView.background = background
-            addBackgroundView.originalBackground = background
-        }
-        addBackgroundView.isHiddenBatchBtn = isBatch
-        addBackgroundView.type = type
-        addBackgroundView.currentType = currentType
-        addBackgroundView.pdfDocument = self.pdfDocument
-        addBackgroundView.cancelAction = { [unowned self] view in
-            cancelAction?(self)
-        }
-        
-        addBackgroundView.operateCallBack = { [unowned self] background, countType in
-            cancelAction?(self)
-            operateCallBack?(self, background, countType)
-        }
-    }
-}

+ 0 - 43
PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Background/Background/View/KMBackgroundWindowController.xib

@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22155" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22155"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMBackgroundWindowController" customModule="PDF_Master" customModuleProvider="target">
-            <connections>
-                <outlet property="addBackgroundView" destination="bdA-mZ-kJR" id="GBp-oG-DYg"/>
-                <outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <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="1009" height="466"/>
-            <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1415"/>
-            <view key="contentView" id="se5-gp-TjO">
-                <rect key="frame" x="0.0" y="0.0" width="1009" height="466"/>
-                <autoresizingMask key="autoresizingMask"/>
-                <subviews>
-                    <customView translatesAutoresizingMaskIntoConstraints="NO" id="bdA-mZ-kJR" customClass="KMAddBackgroundView" customModule="PDF_Master" customModuleProvider="target">
-                        <rect key="frame" x="0.0" y="0.0" width="1009" height="466"/>
-                    </customView>
-                </subviews>
-                <constraints>
-                    <constraint firstItem="bdA-mZ-kJR" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" id="5Gf-Sv-KmK"/>
-                    <constraint firstAttribute="bottom" secondItem="bdA-mZ-kJR" secondAttribute="bottom" id="8m7-1x-neg"/>
-                    <constraint firstAttribute="trailing" secondItem="bdA-mZ-kJR" secondAttribute="trailing" id="ZoB-hZ-GiI"/>
-                    <constraint firstItem="bdA-mZ-kJR" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" id="fH6-BD-syR"/>
-                </constraints>
-            </view>
-            <connections>
-                <outlet property="delegate" destination="-2" id="0bl-1N-AYu"/>
-            </connections>
-            <point key="canvasLocation" x="5" y="225"/>
-        </window>
-    </objects>
-</document>

+ 2 - 54
PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Watermark/Controller/KMBatchOperateAddWatermarkViewController.swift

@@ -338,32 +338,7 @@ class KMBatchOperateAddWatermarkViewController: KMBatchOperateBaseViewController
             cdocument = CPDFDocument(url: URL(fileURLWithPath: filePath))
         }
         if isBackground {
-            let controller = KMBackgroundWindowController(windowNibName: "KMBackgroundWindowController")
-            controller.isBatch = isBatchOperation
-            controller.type = .add
-            controller.currentType = self.currentBackgroundType.rawValue
-            controller.pdfDocument = cdocument
-            controller.cancelAction = { [weak self] controller in
-                self?.km_endSheet()
-            }
-            self.km_beginSheet(windowC: controller)
-            controller.operateCallBack = { controller, background, countType in
-                 self._loadData()
-                var haveBackgrounds = false
-                if self.currentBackgroundType == .color {
-                    self._currentColorData = background
-                    if self._textTemplateArray?.count ?? 0 > 0 {
-                        haveBackgrounds = true
-                    }
-                }
-                if haveBackgrounds {
-                    let indexPath = IndexPath(item: 0, section: 0)
-                    var set = Set<IndexPath>()
-                    set.insert(indexPath)
-                    self.collectionView.selectItems(at: set, scrollPosition: .bottom)
-                }
-                self._postNotification()
-            }
+             
         }else{
             let controller = KMWatermarkWindowController(windowNibName: "KMWatermarkWindowController")
             controller.isBatch = isBatchOperation
@@ -654,34 +629,7 @@ extension KMBatchOperateAddWatermarkViewController {
         }
         let cdocument = CPDFDocument(url: URL(fileURLWithPath: filePath))
         
-        let controller = KMBackgroundWindowController(windowNibName: "KMBackgroundWindowController")
-        controller.isBatch = isBatchOperation
-        controller.type = .edit
-        controller.background = background
-        controller.currentType = self.currentBackgroundType.rawValue
-        controller.pdfDocument = cdocument
-        controller.cancelAction = { [weak self] controller in
-            self?.km_endSheet()
-        }
-        self.km_beginSheet(windowC: controller)
-        controller.operateCallBack = { controller, background, countType in
-             self._loadData()
-            var haveBackgrounds = false
-            if self.currentBackgroundType == .color {
-                self._currentColorData = background
-                if self._textTemplateArray?.count ?? 0 > 0 {
-                    haveBackgrounds = true
-                }
-
-            }
-            if haveBackgrounds {
-                let indexPath = IndexPath(item: 0, section: 0)
-                var set = Set<IndexPath>()
-                set.insert(indexPath)
-                self.collectionView.selectItems(at: set, scrollPosition: .bottom)
-            }
-            self._postNotification()
-        }
+         
     }
 
     private func deleteBackground(_ background: KMBackgroundModel) {

+ 2 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Watermark/New/KMWatermarkController.swift

@@ -206,6 +206,8 @@ extension KMWatermarkController: KMNWatermarkPropertyControllerDelegate {
     func watermarkPropertyControllerCancelTemplateEdit(_ controller: KMNWatermarkPropertyController) {
         removeWatermark(currentWatermarkData?.watermark)
         
+        currentWatermarkData = controller.watermarkData
+        
         editSubType = .template
         resetUI()
         

+ 8 - 3
PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Watermark/New/Views/KMNWatermarkPropertyController.swift

@@ -385,10 +385,8 @@ class KMNWatermarkPropertyController: NSViewController {
         positionYInput.reloadData()
         
         positionTileHoriInput.properties.text = String(format: "%.0f", watermarkData.horizontalSpacing)
-        positionTileHoriInput.reloadData()
-        
+ 
         positionTileVertInput.properties.text = String(format: "%.0f", watermarkData.verticalSpacing)
-        positionTileVertInput.reloadData()
         
         if watermarkData.isTilePage {
             positionTileHorImage.image = NSImage(named: "tile_spacing_horiz")
@@ -407,6 +405,9 @@ class KMNWatermarkPropertyController: NSViewController {
         positionTileHoriInput.reloadData()
         positionTileVertInput.reloadData()
         
+        positionTileCheckbox.properties.checkboxType = watermarkData.isTilePage ? .selected : .normal
+        positionTileCheckbox.reloadData()
+        
     }
     
     func clearData() {
@@ -429,6 +430,10 @@ class KMNWatermarkPropertyController: NSViewController {
                     if response == NSApplication.ModalResponse.alertFirstButtonReturn {
                         self.templateButtonClicked(self.templateButton)
                     } else {
+                        if let dict = self.originalDataDict {
+                            KMWatermarkManager.defaultManager.setDictToWatermarK(dict: dict as NSDictionary, self.watermarkData)
+                            KMWatermarkManager.defaultManager.updateWatermark(watermark: self.watermarkData)
+                        }
                         self.delegate?.watermarkPropertyControllerCancelTemplateEdit?(self)
                         
                         self.isEditModeChanged = false

+ 6 - 5
PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Watermark/New/Views/Templates/KMNWatermarkTemplateItem.swift

@@ -48,11 +48,12 @@ class KMNWatermarkTemplateItem: NSCollectionViewItem {
     }
     
     func reloadData() {
-        watermarkItem.properties.icon = watermark?.resultImage
-        watermarkItem.properties.state = isSelected ? .pressed : .normal
-        watermarkItem.properties.text = watermark?.watermarkName
-        watermarkItem.reloadData()
-        
+        if let watermark = watermark {
+            watermarkItem.properties.icon = KMWatermarkManager.defaultManager.drawImageAtpageRect(rect: self.view.bounds, data: watermark)
+            watermarkItem.properties.state = isSelected ? .pressed : .normal
+            watermarkItem.properties.text = watermark.watermarkName
+            watermarkItem.reloadData()
+        }
     }
 }
 

+ 41 - 19
PDF Office/PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift

@@ -1425,31 +1425,53 @@ extension KMMainViewController: KMEditToolbarViewDelegate {
     }
     
     func kmEditToolbarViewDidChooseApply(_ view: KMEditToolbarView) {
-        if let model = watermarkViewController?.currentWatermarkData {
-            
-            let pageIndex = view.getSelectedPageIndex(listView.document)
-            if pageIndex.isEmpty {
-                let alert = NSAlert()
-                alert.alertStyle = .critical
-                alert.messageText = KMLocalizedString("Invalid page range or the page number is out of range. Please try again.")
-                alert.runModal()
-                return
+        if view.editType == .watermark {
+            if let model = watermarkViewController?.currentWatermarkData {
+                
+                let pageIndex = view.getSelectedPageIndex(listView.document)
+                if pageIndex.isEmpty {
+                    let alert = NSAlert()
+                    alert.alertStyle = .critical
+                    alert.messageText = KMLocalizedString("Invalid page range or the page number is out of range. Please try again.")
+                    alert.runModal()
+                    return
+                }
+                let pageString = view.getSelectedPageString(listView.document, pageIndex)
+                let watermark = KMPDFWatermarkData.returnWaterMarkWith(model, listView.document)
+                watermark.pageString = pageString
+                
+                listView.document.addWatermark(watermark)
+                listView.layoutDocumentView()
+                
+                exitWatermarkController()
             }
-            
-            let pageString = view.getSelectedPageString(listView.document, pageIndex)
-            let watermark = KMPDFWatermarkData.returnWaterMarkWith(model, listView.document)
-            watermark.pageString = pageString
-            
-            listView.document.addWatermark(watermark)
-            listView.layoutDocumentView()
-            
-            exitWatermarkController()
         }
         
     }
     
     func kmEditToolbarViewDidChooseExit(_ view: KMEditToolbarView) {
-        exitWatermarkController()
+        if view.editType == .watermark {
+            if view.applyEnable {
+                let alert = NSAlert()
+                alert.messageText = NSLocalizedString("There are unapplied watermark settings, do you want to apply them?", comment: "")
+                alert.informativeText = NSLocalizedString("If not, the changes will be lost.", comment: "")
+                alert.addButton(withTitle: NSLocalizedString("Apply", comment: ""))
+                alert.addButton(withTitle: NSLocalizedString("Don't Apply", comment: ""))
+                alert.addButton(withTitle: NSLocalizedString("Cancel", comment: ""))
+                let result = alert.runModal()
+                if (result == .alertFirstButtonReturn) {
+                    self.kmEditToolbarViewDidChooseApply(view)
+                } else if (result == .alertSecondButtonReturn) {
+                    //"Don't Apply"
+                    exitWatermarkController()
+                } else if (result == .alertThirdButtonReturn) {
+                    //Cancel
+                    
+                }
+            } else {
+                exitWatermarkController()
+            }
+        }
     }
 }
 

+ 0 - 64
PDF Office/PDF Reader Pro.xcodeproj/project.pbxproj

@@ -2602,18 +2602,6 @@
 		ADE86AB62B0343E600414DFA /* KMWatermarkView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADE86AB52B0343E600414DFA /* KMWatermarkView.swift */; };
 		ADE86AB72B0343E600414DFA /* KMWatermarkView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADE86AB52B0343E600414DFA /* KMWatermarkView.swift */; };
 		ADE86AB82B0343E600414DFA /* KMWatermarkView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADE86AB52B0343E600414DFA /* KMWatermarkView.swift */; };
-		ADE86AC02B034C7100414DFA /* KMBackgroundWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADE86ABE2B034C7100414DFA /* KMBackgroundWindowController.swift */; };
-		ADE86AC12B034C7100414DFA /* KMBackgroundWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADE86ABE2B034C7100414DFA /* KMBackgroundWindowController.swift */; };
-		ADE86AC22B034C7100414DFA /* KMBackgroundWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADE86ABE2B034C7100414DFA /* KMBackgroundWindowController.swift */; };
-		ADE86AC32B034C7100414DFA /* KMBackgroundWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = ADE86ABF2B034C7100414DFA /* KMBackgroundWindowController.xib */; };
-		ADE86AC42B034C7100414DFA /* KMBackgroundWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = ADE86ABF2B034C7100414DFA /* KMBackgroundWindowController.xib */; };
-		ADE86AC52B034C7100414DFA /* KMBackgroundWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = ADE86ABF2B034C7100414DFA /* KMBackgroundWindowController.xib */; };
-		ADE86AC82B034CB200414DFA /* KMAddBackgroundView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADE86AC72B034CB200414DFA /* KMAddBackgroundView.swift */; };
-		ADE86AC92B034CB200414DFA /* KMAddBackgroundView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADE86AC72B034CB200414DFA /* KMAddBackgroundView.swift */; };
-		ADE86ACA2B034CB200414DFA /* KMAddBackgroundView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADE86AC72B034CB200414DFA /* KMAddBackgroundView.swift */; };
-		ADE86ACC2B034CC000414DFA /* KMAddBackgroundView.xib in Resources */ = {isa = PBXBuildFile; fileRef = ADE86ACB2B034CC000414DFA /* KMAddBackgroundView.xib */; };
-		ADE86ACD2B034CC000414DFA /* KMAddBackgroundView.xib in Resources */ = {isa = PBXBuildFile; fileRef = ADE86ACB2B034CC000414DFA /* KMAddBackgroundView.xib */; };
-		ADE86ACE2B034CC000414DFA /* KMAddBackgroundView.xib in Resources */ = {isa = PBXBuildFile; fileRef = ADE86ACB2B034CC000414DFA /* KMAddBackgroundView.xib */; };
 		ADE86AD12B04BAEA00414DFA /* KMCompareFilesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADE86AD02B04BAEA00414DFA /* KMCompareFilesView.swift */; };
 		ADE86AD22B04BAEA00414DFA /* KMCompareFilesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADE86AD02B04BAEA00414DFA /* KMCompareFilesView.swift */; };
 		ADE86AD32B04BAEA00414DFA /* KMCompareFilesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADE86AD02B04BAEA00414DFA /* KMCompareFilesView.swift */; };
@@ -4977,18 +4965,9 @@
 		BBC3482429559506008D2CD1 /* KMBackgroundManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBC3482329559506008D2CD1 /* KMBackgroundManager.swift */; };
 		BBC3482529559506008D2CD1 /* KMBackgroundManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBC3482329559506008D2CD1 /* KMBackgroundManager.swift */; };
 		BBC3482629559506008D2CD1 /* KMBackgroundManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBC3482329559506008D2CD1 /* KMBackgroundManager.swift */; };
-		BBC3482929559B22008D2CD1 /* KMBackgroundListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBC3482829559B22008D2CD1 /* KMBackgroundListCell.swift */; };
-		BBC3482A29559B22008D2CD1 /* KMBackgroundListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBC3482829559B22008D2CD1 /* KMBackgroundListCell.swift */; };
-		BBC3482B29559B22008D2CD1 /* KMBackgroundListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBC3482829559B22008D2CD1 /* KMBackgroundListCell.swift */; };
 		BBC3482E29559E12008D2CD1 /* KMBackgroundModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBC3482D29559E12008D2CD1 /* KMBackgroundModel.swift */; };
 		BBC3482F29559E12008D2CD1 /* KMBackgroundModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBC3482D29559E12008D2CD1 /* KMBackgroundModel.swift */; };
 		BBC3483029559E12008D2CD1 /* KMBackgroundModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBC3482D29559E12008D2CD1 /* KMBackgroundModel.swift */; };
-		BBC3484A2958222C008D2CD1 /* KMBackgroundOutsideView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBC348492958222C008D2CD1 /* KMBackgroundOutsideView.swift */; };
-		BBC3484B2958222C008D2CD1 /* KMBackgroundOutsideView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBC348492958222C008D2CD1 /* KMBackgroundOutsideView.swift */; };
-		BBC3484C2958222C008D2CD1 /* KMBackgroundOutsideView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBC348492958222C008D2CD1 /* KMBackgroundOutsideView.swift */; };
-		BBC3484E29582920008D2CD1 /* KMBackgroundColorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBC3484D29582920008D2CD1 /* KMBackgroundColorView.swift */; };
-		BBC3484F29582920008D2CD1 /* KMBackgroundColorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBC3484D29582920008D2CD1 /* KMBackgroundColorView.swift */; };
-		BBC3485029582920008D2CD1 /* KMBackgroundColorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBC3484D29582920008D2CD1 /* KMBackgroundColorView.swift */; };
 		BBC4F9EA2AEB58290098A1A8 /* KMAlertWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBC4F9E92AEB58290098A1A8 /* KMAlertWindowController.swift */; };
 		BBC4F9EB2AEB58290098A1A8 /* KMAlertWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBC4F9E92AEB58290098A1A8 /* KMAlertWindowController.swift */; };
 		BBC4F9EC2AEB58290098A1A8 /* KMAlertWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBC4F9E92AEB58290098A1A8 /* KMAlertWindowController.swift */; };
@@ -6982,10 +6961,6 @@
 		ADE86AAC2B03438400414DFA /* KMWatermarkWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMWatermarkWindowController.swift; sourceTree = "<group>"; };
 		ADE86AAD2B03438400414DFA /* KMWatermarkWindowController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMWatermarkWindowController.xib; sourceTree = "<group>"; };
 		ADE86AB52B0343E600414DFA /* KMWatermarkView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMWatermarkView.swift; sourceTree = "<group>"; };
-		ADE86ABE2B034C7100414DFA /* KMBackgroundWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMBackgroundWindowController.swift; sourceTree = "<group>"; };
-		ADE86ABF2B034C7100414DFA /* KMBackgroundWindowController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMBackgroundWindowController.xib; sourceTree = "<group>"; };
-		ADE86AC72B034CB200414DFA /* KMAddBackgroundView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMAddBackgroundView.swift; sourceTree = "<group>"; };
-		ADE86ACB2B034CC000414DFA /* KMAddBackgroundView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMAddBackgroundView.xib; sourceTree = "<group>"; };
 		ADE86AD02B04BAEA00414DFA /* KMCompareFilesView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMCompareFilesView.swift; sourceTree = "<group>"; };
 		ADE86AD52B05A52B00414DFA /* KMCompareFilesConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMCompareFilesConfig.swift; sourceTree = "<group>"; };
 		ADE86ADB2B0AF4B600414DFA /* KMCompareContentSettingWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMCompareContentSettingWindowController.swift; sourceTree = "<group>"; };
@@ -7951,10 +7926,7 @@
 		BBC348002955403D008D2CD1 /* KMWatermarkFilePropertyInfoController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMWatermarkFilePropertyInfoController.swift; sourceTree = "<group>"; };
 		BBC348012955403D008D2CD1 /* KMWatermarkFilePropertyInfoController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMWatermarkFilePropertyInfoController.xib; sourceTree = "<group>"; };
 		BBC3482329559506008D2CD1 /* KMBackgroundManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMBackgroundManager.swift; sourceTree = "<group>"; };
-		BBC3482829559B22008D2CD1 /* KMBackgroundListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMBackgroundListCell.swift; sourceTree = "<group>"; };
 		BBC3482D29559E12008D2CD1 /* KMBackgroundModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMBackgroundModel.swift; sourceTree = "<group>"; };
-		BBC348492958222C008D2CD1 /* KMBackgroundOutsideView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMBackgroundOutsideView.swift; sourceTree = "<group>"; };
-		BBC3484D29582920008D2CD1 /* KMBackgroundColorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMBackgroundColorView.swift; sourceTree = "<group>"; };
 		BBC4F9E92AEB58290098A1A8 /* KMAlertWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMAlertWindowController.swift; sourceTree = "<group>"; };
 		BBC4F9ED2AEB58470098A1A8 /* KMAlertWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KMAlertWindowController.xib; sourceTree = "<group>"; };
 		BBC4F9F52AEB69940098A1A8 /* NSArray+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSArray+Extension.swift"; sourceTree = "<group>"; };
@@ -14649,25 +14621,10 @@
 				BB7256BB2CDC5B5300B6CE64 /* KMBackgroundController.swift */,
 				BB7256BC2CDC5B5300B6CE64 /* KMBackgroundController.xib */,
 				BB10E1632CDC94C600471D47 /* Views */,
-				BBC3482729559AF2008D2CD1 /* View */,
 			);
 			path = Background;
 			sourceTree = "<group>";
 		};
-		BBC3482729559AF2008D2CD1 /* View */ = {
-			isa = PBXGroup;
-			children = (
-				ADE86AC72B034CB200414DFA /* KMAddBackgroundView.swift */,
-				ADE86ACB2B034CC000414DFA /* KMAddBackgroundView.xib */,
-				ADE86ABE2B034C7100414DFA /* KMBackgroundWindowController.swift */,
-				ADE86ABF2B034C7100414DFA /* KMBackgroundWindowController.xib */,
-				BBC3482829559B22008D2CD1 /* KMBackgroundListCell.swift */,
-				BBC348492958222C008D2CD1 /* KMBackgroundOutsideView.swift */,
-				BBC3484D29582920008D2CD1 /* KMBackgroundColorView.swift */,
-			);
-			path = View;
-			sourceTree = "<group>";
-		};
 		BBC4F9FD2AEBC62D0098A1A8 /* Batch */ = {
 			isa = PBXGroup;
 			children = (
@@ -16251,7 +16208,6 @@
 				BBF62C6C2B033B5B007B7E86 /* KMPDFEditExtractWindow.xib in Resources */,
 				BB88106A2B4F771D00AFA63E /* KMVerificationInfoViewController.xib in Resources */,
 				BB6DD80F29347F77001F0544 /* KMSecureEncryptWindowController.xib in Resources */,
-				ADE86AC32B034C7100414DFA /* KMBackgroundWindowController.xib in Resources */,
 				9FF816E12AFA5BA80087EFC5 /* KMAnnotationTableViewController.xib in Resources */,
 				F30B22882CB8D9630041002E /* KMNQuickToolCollectionViewItem.xib in Resources */,
 				AD867FAA29DFB78200F00440 /* KMAnnotationOutlineView.xib in Resources */,
@@ -16323,7 +16279,6 @@
 				F337CC1F2CC6456D00D46AF4 /* KMNThumbnailBaseViewController.xib in Resources */,
 				AD3AAD1E2B0B5B4400DE5FE7 /* KMCompareCoveringWindowController.xib in Resources */,
 				BB8B17362907B64D001C5EA5 /* CipherTextView.xib in Resources */,
-				ADE86ACC2B034CC000414DFA /* KMAddBackgroundView.xib in Resources */,
 				ADBC374529CAD2D300D93208 /* SF-Pro-Text-Bold.otf in Resources */,
 				ADB5E51E2A3711DF007110A8 /* KMSubscribeWaterMarkView.xib in Resources */,
 				BB1B0B072B4FC6E900889528 /* KMGuideCoverView.xib in Resources */,
@@ -16716,7 +16671,6 @@
 				AD055E292B70B3C10035F824 /* KMBookmarkController.xib in Resources */,
 				BB3D970F2B2FEAF9007094C8 /* KMPDFRedactViewController.xib in Resources */,
 				BB69C960299116FD0001A9B1 /* plaid.pdf in Resources */,
-				ADE86AC42B034C7100414DFA /* KMBackgroundWindowController.xib in Resources */,
 				BB8810622B4F74DD00AFA63E /* KMRepeatTrialAlertController.xib in Resources */,
 				F328C0BA2CA16F0500BFDD23 /* KMPresentationTopViewController.xib in Resources */,
 				AD0FA4FF29A8DD8700EDEB50 /* KMRegisterSuccessView.xib in Resources */,
@@ -16997,7 +16951,6 @@
 				ADDF83752B391A5D00A81A4E /* CDSignatureDrawViewController.xib in Resources */,
 				BB6EA2952B70AF48000D4490 /* KMConvertCompareViewController.xib in Resources */,
 				BB5A9D652CB6521400F64C1F /* KMPDFSecToolbarController.xib in Resources */,
-				ADE86ACD2B034CC000414DFA /* KMAddBackgroundView.xib in Resources */,
 				ADDF834B2B391A5C00A81A4E /* DSignatureDetailsViewController.xib in Resources */,
 				BBFA1CD22B609EC50053AD4A /* KMScreenShotMaskWindowController.xib in Resources */,
 				BBB789B22BE8BF2400F7E09C /* AIChatTranslateResultItem.xib in Resources */,
@@ -17126,7 +17079,6 @@
 				BB986AE92AD5376100ADF172 /* WelcomeWindowController.xib in Resources */,
 				BBEC00DE295C39FD00A26C98 /* KMBatesPropertyInfoController.xib in Resources */,
 				AD3AAD582B0D87E500DE5FE7 /* KMCompareThumbItem.xib in Resources */,
-				ADE86ACE2B034CC000414DFA /* KMAddBackgroundView.xib in Resources */,
 				9F1F82D7292F6D510092C4B4 /* KMPDFInsertPreviewViewController.xib in Resources */,
 				ADE86AB32B03438400414DFA /* KMWatermarkWindowController.xib in Resources */,
 				BB234F062BA3D798008B3754 /* KMAIIconGuideView.xib in Resources */,
@@ -17631,7 +17583,6 @@
 				BB897263294C5DDA0045787C /* KMWatermarkPropertyInfoController.xib in Resources */,
 				BBA9223A2B4E97540061057A /* KMPurchaseFirstTrialWindowController.xib in Resources */,
 				BB52F5942CC245B3007418DB /* KMLinkPopupEmailView.xib in Resources */,
-				ADE86AC52B034C7100414DFA /* KMBackgroundWindowController.xib in Resources */,
 				BB5EC3672C2BDC9D0090EF27 /* KMTextAlignmentController.xib in Resources */,
 				BB42A5DC2B8F0F8C0092C524 /* KMTabbingHintWindowController.xib in Resources */,
 				BBB376A92B10A7FD009539CC /* a_3b.png in Resources */,
@@ -17770,7 +17721,6 @@
 				BB2C84752BAE71E400AF6142 /* KMThumbnailTableviewCell.swift in Sources */,
 				ADDF83772B391A5D00A81A4E /* CDSignatureCertificateCustomViewController.swift in Sources */,
 				BB7E59F62BBA427C0021E63D /* KMBrowserWindow.swift in Sources */,
-				BBC3484A2958222C008D2CD1 /* KMBackgroundOutsideView.swift in Sources */,
 				BB7BC4D82AD3D6B700D6BEE6 /* PDFListView+KMExtensions.swift in Sources */,
 				ADBC2CFA299CA6B9006280C8 /* KMPrintDuplexPrintingSetView.swift in Sources */,
 				654A5A8C2C8AE200001FBD4B /* KMAnalytics+KMExtensions.swift in Sources */,
@@ -17781,7 +17731,6 @@
 				9F1FE51129407B4000E952CA /* KMFileSearchView.swift in Sources */,
 				BB897279294DFD1E0045787C /* KMWatermarkTextView.swift in Sources */,
 				BBE789052CBD2464008086E2 /* TooltipVC.swift in Sources */,
-				BBC3484E29582920008D2CD1 /* KMBackgroundColorView.swift in Sources */,
 				ADF1569329A62D1D001D1018 /* KMLoginLeftImageView.swift in Sources */,
 				BBA762D229D2D98D00844513 /* KMCommonDefine.swift in Sources */,
 				AD3AAD2C2B0B6FFA00DE5FE7 /* KMCompareCoveringView.swift in Sources */,
@@ -18450,7 +18399,6 @@
 				BBE788CF2CBD2463008086E2 /* InputDemoVC.swift in Sources */,
 				BB147005299DC0D100784A6A /* OIDFieldMapping.m in Sources */,
 				BB6AAF4E2C217249009C4CB1 /* KMEditPDfHanddler.swift in Sources */,
-				ADE86AC82B034CB200414DFA /* KMAddBackgroundView.swift in Sources */,
 				BBB9B32E299A5D6D004F3235 /* GTMAppAuthFetcherAuthorization.m in Sources */,
 				BB3198162AC55E6D00107371 /* CPDFDocument+KMExtension.swift in Sources */,
 				F3A0F8592CC940DD00E7373F /* KMNPDFInsertBlankWindowController.swift in Sources */,
@@ -18477,7 +18425,6 @@
 				BB14701A299DC0D100784A6A /* OIDURLSessionProvider.m in Sources */,
 				BBEC00A4295BD42D00A26C98 /* KMHeaderFooterPageInfoView.swift in Sources */,
 				BBD1F787296FAC7C00343885 /* KMPageEditSettingBaseView.swift in Sources */,
-				ADE86AC02B034C7100414DFA /* KMBackgroundWindowController.swift in Sources */,
 				ADFA8F042B5666B6002595A4 /* KMAotuFlowExtension.swift in Sources */,
 				BB03D69C2B0249A2008C9976 /* KMPDFEditInsertPageWindow.swift in Sources */,
 				AD1CA3FF2A0603EE0070541F /* KMAnnotationScreenCollectionView.swift in Sources */,
@@ -18648,7 +18595,6 @@
 				ADE3C1F929A5C42300793B13 /* KMLightMemberUserInfo.swift in Sources */,
 				BB88E43B294023CB002B3655 /* KMDocumentModel.swift in Sources */,
 				AD1D48212AFB6BBA007AC1F0 /* KMMergeView.swift in Sources */,
-				BBC3482929559B22008D2CD1 /* KMBackgroundListCell.swift in Sources */,
 				BBB9B316299A5D6D004F3235 /* KMDropboxManager.m in Sources */,
 				89D2D2E2294C452B00BFF5FE /* KMPDFThumbnailView.swift in Sources */,
 				BB10FAE52AFE039E00F18D65 /* KMPDFEditPageRangeWindowController.swift in Sources */,
@@ -19117,7 +19063,6 @@
 				BBA00AC52B157C880043D903 /* KMToolbarZoomItemView.swift in Sources */,
 				BB1B0AC62B4FC6E900889528 /* KMGuideInfoWindow.swift in Sources */,
 				9F69DBBB2B55014F003D4C45 /* KMAnnotationButtonWidgetAppearanceViewController.swift in Sources */,
-				BBC3484B2958222C008D2CD1 /* KMBackgroundOutsideView.swift in Sources */,
 				AD1D48222AFB6BBA007AC1F0 /* KMMergeView.swift in Sources */,
 				653647DD2CDCA77300CDB13E /* KMTableHeaderCell.swift in Sources */,
 				BB90E4F32AF37F9F00B04B9F /* KMCustomViewButton.swift in Sources */,
@@ -19132,7 +19077,6 @@
 				9FCFEC812AD0E74C00EAD2CB /* KMPopMenuButtonCell.swift in Sources */,
 				BB89723B294B3C840045787C /* KMWatermarkPropertyController.swift in Sources */,
 				9FA607DF28FD4C9F00B46586 /* KMHomePopViewController.swift in Sources */,
-				BBC3484F29582920008D2CD1 /* KMBackgroundColorView.swift in Sources */,
 				F3A0F86E2CCA118D00E7373F /* KMNTools.swift in Sources */,
 				ADF1569429A62D1D001D1018 /* KMLoginLeftImageView.swift in Sources */,
 				AD3AAD352B0B7AF500DE5FE7 /* KMCompareThumbView.swift in Sources */,
@@ -19865,7 +19809,6 @@
 				BBF8A4042AE8E10100788BAC /* KMBatchConvertParameter.swift in Sources */,
 				F3EF17902CD5FD4B0007D364 /* KMNLeftSideViewController.swift in Sources */,
 				AD3AAD642B0DA3F600DE5FE7 /* KMCompareTextHeaderView.swift in Sources */,
-				ADE86AC92B034CB200414DFA /* KMAddBackgroundView.swift in Sources */,
 				BB67EE212B54FFEF00573BF0 /* ASIDataDecompressor.m in Sources */,
 				BB88E45929404752002B3655 /* KMPDFConvert.swift in Sources */,
 				9F080B15298CFDB300FC27DA /* KMTextImageButtonVC.swift in Sources */,
@@ -19978,7 +19921,6 @@
 				BB88107D2B4F7A1F00AFA63E /* KMActivityALertViewController.m in Sources */,
 				BB6B436C2A04935000E02B54 /* KMPDFThumbViewBaseController.swift in Sources */,
 				ADE3C1FA29A5C42300793B13 /* KMLightMemberUserInfo.swift in Sources */,
-				BBC3482A29559B22008D2CD1 /* KMBackgroundListCell.swift in Sources */,
 				ADAC0DE62AC2B04900FD4F52 /* KMNoteTypeImageView.swift in Sources */,
 				BBB9B317299A5D6D004F3235 /* KMDropboxManager.m in Sources */,
 				BB897266294C724D0045787C /* KMWatermarkAdjectiveOutsideView.swift in Sources */,
@@ -20059,7 +20001,6 @@
 				F34BF93629530708002C25A2 /* NSImage+PDFListView.m in Sources */,
 				65D6840D2C6A3669003A532E /* KMEraserAnnotationController.swift in Sources */,
 				9F1F82EB2935D02E0092C4B4 /* KMComboBox.swift in Sources */,
-				ADE86AC12B034C7100414DFA /* KMBackgroundWindowController.swift in Sources */,
 				AD9527EB2955520C0039D2BC /* KMBaseTextFieldModel.swift in Sources */,
 				BBB789A02BE8BF2400F7E09C /* AIChatView.swift in Sources */,
 				BB2F9AAC2AFCADA900F9DD93 /* KMProfileCellView.swift in Sources */,
@@ -20381,7 +20322,6 @@
 				ADFA8F062B5666B6002595A4 /* KMAotuFlowExtension.swift in Sources */,
 				9F1F82DC292F84D60092C4B4 /* KMHomeInsertActionViewController.swift in Sources */,
 				ADB5E5142A371131007110A8 /* KMSubscribeWaterMarkWindowController.swift in Sources */,
-				ADE86ACA2B034CB200414DFA /* KMAddBackgroundView.swift in Sources */,
 				AD1FE81F2BD7C98300AA4A9B /* KMBookletManager.m in Sources */,
 				AD7D5CEE2B96B9D6006562CD /* KMBookmarkOutlineRowView.swift in Sources */,
 				BBC8A7732B06408600FA9377 /* KMBotaSearchViewController.swift in Sources */,
@@ -20809,7 +20749,6 @@
 				9F9461892BD644BF0076574B /* KMTableCellData.m in Sources */,
 				BB4583C82CC91543005737F3 /* NSImage+Extension.swift in Sources */,
 				9F1FE4B329406E4700E952CA /* CTTabWindowController.m in Sources */,
-				ADE86AC22B034C7100414DFA /* KMBackgroundWindowController.swift in Sources */,
 				BBFE6E812930EBD400142C01 /* KMCompressWindowController.swift in Sources */,
 				9F1FE4BF29406E4700E952CA /* URLDropTarget.m in Sources */,
 				9FF816DF2AFA5B8E0087EFC5 /* KMAnnotationTableViewController.swift in Sources */,
@@ -20895,7 +20834,6 @@
 				BBD7FE092A13241E00F96075 /* KMOutlineEditViewController.swift in Sources */,
 				ADDEEA882AD7805200EF675D /* KMGeneralButton.swift in Sources */,
 				BBD54ED62A1CBD720012A230 /* NSView+KMExtension.swift in Sources */,
-				BBC3485029582920008D2CD1 /* KMBackgroundColorView.swift in Sources */,
 				AD1FE8192BD7C98300AA4A9B /* KMPDFMultiplePrintWindowController.m in Sources */,
 				BB4EEF3A2976451E003A3537 /* KMRedactContentBaseView.swift in Sources */,
 				BB853C9F2AF8E436009C20C1 /* KMBatchRemovePasswordOperation.swift in Sources */,
@@ -21420,7 +21358,6 @@
 				89E4E6EE2963D1B7002DBA6F /* KMColorPickerViewController.m in Sources */,
 				BBEC00A6295BD42D00A26C98 /* KMHeaderFooterPageInfoView.swift in Sources */,
 				AD867F9E29D9853200F00440 /* KMBOTAOutlineRowView.swift in Sources */,
-				BBC3482B29559B22008D2CD1 /* KMBackgroundListCell.swift in Sources */,
 				F34BF93729530708002C25A2 /* NSImage+PDFListView.m in Sources */,
 				BB4A94A62B04DA0C00940F8B /* KMGOCRManagerNew.swift in Sources */,
 				656C1E4F2CD0D19600295F82 /* KMConvertHtmlWindowController.swift in Sources */,
@@ -21644,7 +21581,6 @@
 				ADBC374329CAB1C300D93208 /* KMComparativeOutlineCell.swift in Sources */,
 				ADBC372B29CA950500D93208 /* KMComparativeOutlineView.swift in Sources */,
 				ADE86ADF2B0AF4B600414DFA /* KMCompareContentSettingWindowController.swift in Sources */,
-				BBC3484C2958222C008D2CD1 /* KMBackgroundOutsideView.swift in Sources */,
 				AD0FA51429A9FA8600EDEB50 /* KMResetPasswordView.swift in Sources */,
 				9F0CB49129683DEE00007028 /* KMPropertiesPanelLineSubVC.swift in Sources */,
 				F3D5D2B52CCE31AC00D4F1D5 /* KMNThumbnailCollectionView.swift in Sources */,

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

@@ -2892,5 +2892,21 @@
             </Locations>
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "D77D7406-6CC5-4B8A-92FA-F2EA8FB9001E"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/KMClass/KMPDFViewController/EditTool/Watermark/New/Views/KMNWatermarkPropertyController.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "320"
+            endingLineNumber = "320"
+            landmarkName = "reloadData()"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>