Forráskód Böngészése

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

tangchao 11 hónapja
szülő
commit
ce5a39ad50
25 módosított fájl, 3255 hozzáadás és 1059 törlés
  1. 1 1
      PDF Office/PDF Master/Class/PDFTools/AddHeaderFooter/Model/KMBatchAddHeaderFooterOperation.swift
  2. 7 7
      PDF Office/PDF Master/Class/PDFTools/AddHeaderFooter/New/View/KMHeaderFooterView.swift
  3. 25 25
      PDF Office/PDF Master/Class/PDFTools/AddHeaderFooter/VC/KMBatchOperateAddHeaderFooterViewController.swift
  4. 3 3
      PDF Office/PDF Master/Class/PDFTools/AddHeaderFooter/WindowComtroller/KMHeaderFooterManagerWindowController.swift
  5. 3 3
      PDF Office/PDF Master/Class/PDFTools/Bates/Controller/KMBatesPropertyController.swift
  6. 2 2
      PDF Office/PDF Master/Class/PDFTools/Bates/Controller/KMBatesPropertyHomeController.swift
  7. 3 3
      PDF Office/PDF Master/Class/PDFTools/HeaderFooter/Controller/KMHeaderFooterPropertyController.swift
  8. 2 2
      PDF Office/PDF Master/Class/PDFTools/HeaderFooter/Controller/KMHeaderFooterPropertyMainController.swift
  9. 18 7
      PDF Office/PDF Master/Class/PDFTools/HeaderFooter/Tools/KMHeaderFooterManager.swift
  10. 1 1
      PDF Office/PDF Master/Class/PDFTools/Watermark/Tools/KMWatermarkAdjectiveTools.swift
  11. 1 1
      PDF Office/PDF Master/Class/PDFTools/Watermark/View/KMWatermarkPDFView.swift
  12. 4 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Stamp/CStampSignatureObject.swift
  13. 17 13
      PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/KMGeneralAnnotationViewController.swift
  14. 14 0
      PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/View/KMFreeTextStylesViewController/KMFreeTextStylesViewController.h
  15. 653 0
      PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/View/KMFreeTextStylesViewController/KMFreeTextStylesViewController.m
  16. 218 0
      PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/View/KMFreeTextStylesViewController/KMFreeTextStylesViewController.xib
  17. 1 1
      PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/StampList/KMAnnotationStampViewController.swift
  18. 6 6
      PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/StampList/KMAnnotationStampViewController.xib
  19. 30 0
      PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/StampList/KMStampManager.swift
  20. 30 15
      PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift
  21. 2 0
      PDF Office/PDF Master/PDF_Reader_Pro DMG-Bridging-Header.h
  22. 2 0
      PDF Office/PDF Master/PDF_Reader_Pro Edition-Bridging-Header.h
  23. 2 0
      PDF Office/PDF Master/PDF_Reader_Pro-Bridging-Header.h
  24. 26 0
      PDF Office/PDF Reader Pro.xcodeproj/project.pbxproj
  25. 2184 969
      PDF Office/PDF Reader Pro.xcodeproj/xcuserdata/lizhe.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

+ 1 - 1
PDF Office/PDF Master/Class/PDFTools/AddHeaderFooter/Model/KMBatchAddHeaderFooterOperation.swift

@@ -270,7 +270,7 @@ func convertPageFormat(oldString: String, startPage: String, pageCount: String)
 }
 func convertDateFormat(oldString: String) -> String { 
     var newString = oldString
-    for dateFormat in KMHeaderFooterManager.defaultManager().dateFormatArray {
+    for dateFormat in KMHeaderFooterManager.defaultManager.dateFormatArray {
         if newString.contains(dateFormat) {
             let formatString = dateFormat.replacingOccurrences(of: "m", with: "M")
             let replace = "<<\(dateFormat)>>"

+ 7 - 7
PDF Office/PDF Master/Class/PDFTools/AddHeaderFooter/New/View/KMHeaderFooterView.swift

@@ -190,7 +190,7 @@ class KMHeaderFooterView: KMBaseXibView, NSTextViewDelegate, NSComboBoxDelegate
     var originalHeaderFooterObj: KMHeaderFooterObject = KMHeaderFooterObject()
     var dateFormatArray: [Any] {
         get {
-            return KMHeaderFooterManager.defaultManager().dateFormatArray
+            return KMHeaderFooterManager.defaultManager.dateFormatArray
         }
     }
     
@@ -198,9 +198,9 @@ class KMHeaderFooterView: KMBaseXibView, NSTextViewDelegate, NSComboBoxDelegate
     var isBates: Bool = false {
         didSet {
             if (self.isBates) {
-                headerFooterObj.id = KMHeaderFooterManager.defaultManager().fetchBatesAvailableName()
+                headerFooterObj.id = KMHeaderFooterManager.defaultManager.fetchBatesAvailableName()
             } else {
-                headerFooterObj.id = KMHeaderFooterManager.defaultManager().fetchHeaderFooterAvailableName()
+                headerFooterObj.id = KMHeaderFooterManager.defaultManager.fetchHeaderFooterAvailableName()
             }
             headerFooterObj.isBates = self.isBates
             self.reloadData()
@@ -1119,7 +1119,7 @@ extension KMHeaderFooterView {
             }
             
             headerFooterObj.id = templateNameTextField.stringValue
-            KMHeaderFooterManager.defaultManager().addHeaderFooter(headerFooterObj)
+            KMHeaderFooterManager.defaultManager.addHeaderFooter(headerFooterObj)
         }
         
         if let operateCallBack = operateCallBack {
@@ -1183,7 +1183,7 @@ extension KMHeaderFooterView {
                 } else {
                     headerFooterObj.id = templateNameTextField.stringValue
                 }
-                KMHeaderFooterManager.defaultManager().addHeaderFooter(headerFooterObj)
+                KMHeaderFooterManager.defaultManager.addHeaderFooter(headerFooterObj)
             }
             if let operateCallBack = operateCallBack {
                 operateCallBack(headerFooterObj)
@@ -1197,7 +1197,7 @@ extension KMHeaderFooterView {
                 }
                 
                 originalHeaderFooterObj = headerFooterObj.copy() as! KMHeaderFooterObject
-                KMHeaderFooterManager.defaultManager().store()
+                KMHeaderFooterManager.defaultManager.store()
             }
             if let operateCallBack = operateCallBack {
                 operateCallBack(originalHeaderFooterObj)
@@ -1226,7 +1226,7 @@ extension KMHeaderFooterView {
                         } else {
                             self.headerFooterObj.id = self.templateNameTextField.stringValue
                         }
-                        KMHeaderFooterManager.defaultManager().addHeaderFooter(self.headerFooterObj)
+                        KMHeaderFooterManager.defaultManager.addHeaderFooter(self.headerFooterObj)
                         NotificationCenter.default.post(name: NSNotification.Name("KMBatchOperateHeaderFootersNotification"), object: self)
                     }
                 }

+ 25 - 25
PDF Office/PDF Master/Class/PDFTools/AddHeaderFooter/VC/KMBatchOperateAddHeaderFooterViewController.swift

@@ -244,16 +244,16 @@ class KMBatchOperateAddHeaderFooterViewController: KMBatchOperateBaseViewControl
     }
     func deleteAll() {
         if self.isBates {
-            for waterMark in KMHeaderFooterManager.defaultManager().onlyBatesObjects {
-                KMHeaderFooterManager.defaultManager().removeHeaderFooter(waterMark)
+            for waterMark in KMHeaderFooterManager.defaultManager.onlyBatesObjects {
+                KMHeaderFooterManager.defaultManager.removeHeaderFooter(waterMark)
             }
         } else {
-            for waterMark in KMHeaderFooterManager.defaultManager().onlyHeaderFooterObjects {
-                KMHeaderFooterManager.defaultManager().removeHeaderFooter(waterMark)
+            for waterMark in KMHeaderFooterManager.defaultManager.onlyHeaderFooterObjects {
+                KMHeaderFooterManager.defaultManager.removeHeaderFooter(waterMark)
             }
         }
-        loadData()
         reloadTable()
+        loadData()
         postNotification()
     }
     func reloadTable() {
@@ -261,11 +261,11 @@ class KMBatchOperateAddHeaderFooterViewController: KMBatchOperateBaseViewControl
         var count = 0
         var array: [KMHeaderFooterObject] = []
         if self.isBates {
-            count = KMHeaderFooterManager.defaultManager().onlyBatesObjects.count
-            array = KMHeaderFooterManager.defaultManager().onlyBatesObjects
+            count = KMHeaderFooterManager.defaultManager.onlyBatesObjects.count
+            array = KMHeaderFooterManager.defaultManager.onlyBatesObjects
         } else {
-            count = KMHeaderFooterManager.defaultManager().onlyHeaderFooterObjects.count
-            array = KMHeaderFooterManager.defaultManager().onlyHeaderFooterObjects
+            count = KMHeaderFooterManager.defaultManager.onlyHeaderFooterObjects.count
+            array = KMHeaderFooterManager.defaultManager.onlyHeaderFooterObjects
         }
         if array.contains(self.currentObject ?? KMHeaderFooterObject()) {
             let row = array.firstIndex(of: self.currentObject!)!
@@ -340,9 +340,9 @@ class KMBatchOperateAddHeaderFooterViewController: KMBatchOperateBaseViewControl
                     return
                 } else {
                     if (self.isBates) {
-                        headFooter = KMHeaderFooterManager.defaultManager().onlyBatesObjects[row]
+                        headFooter = KMHeaderFooterManager.defaultManager.onlyBatesObjects[row]
                     } else {
-                        headFooter = KMHeaderFooterManager.defaultManager().onlyHeaderFooterObjects[row]
+                        headFooter = KMHeaderFooterManager.defaultManager.onlyHeaderFooterObjects[row]
                     }
                 }
 
@@ -407,9 +407,9 @@ class KMBatchOperateAddHeaderFooterViewController: KMBatchOperateBaseViewControl
                     return;
                 } else {
                     if (self.isBates) {
-                        headFooter = KMHeaderFooterManager.defaultManager().onlyBatesObjects[row]
+                        headFooter = KMHeaderFooterManager.defaultManager.onlyBatesObjects[row]
                     } else {
-                        headFooter = KMHeaderFooterManager.defaultManager().onlyHeaderFooterObjects[row]
+                        headFooter = KMHeaderFooterManager.defaultManager.onlyHeaderFooterObjects[row]
                     }
                 }
                 
@@ -542,7 +542,7 @@ class KMBatchOperateAddHeaderFooterViewController: KMBatchOperateBaseViewControl
         
     }
     func delete(obj: KMHeaderFooterObject) {
-        KMHeaderFooterManager.defaultManager().removeHeaderFooter(obj)
+        KMHeaderFooterManager.defaultManager.removeHeaderFooter(obj)
         loadData()
         reloadTable()
         postNotification()
@@ -550,7 +550,7 @@ class KMBatchOperateAddHeaderFooterViewController: KMBatchOperateBaseViewControl
     func validateMenuItem(_ menuItem: NSMenuItem) -> Bool {
         let action = menuItem.action
         if action == #selector(buttonItemClick_CleanAll(_:)) {
-            if (self.isBates && KMHeaderFooterManager.defaultManager().onlyBatesObjects.count < 1) || (!self.isBates && KMHeaderFooterManager.defaultManager().onlyHeaderFooterObjects.count < 1){
+            if (self.isBates && KMHeaderFooterManager.defaultManager.onlyBatesObjects.count < 1) || (!self.isBates && KMHeaderFooterManager.defaultManager.onlyHeaderFooterObjects.count < 1){
                 return false
             }
             return true
@@ -559,14 +559,14 @@ class KMBatchOperateAddHeaderFooterViewController: KMBatchOperateBaseViewControl
     }
     func headerFooterInterfaceSelectHeaderFooter(headerFooter: KMHeaderFooterObject) {
         self.tableView.reloadData()
-        if let index = KMHeaderFooterManager.defaultManager().onlyHeaderFooterObjects.firstIndex(of: headerFooter) {
+        if let index = KMHeaderFooterManager.defaultManager.onlyHeaderFooterObjects.firstIndex(of: headerFooter) {
             let indexSet = IndexSet(integer: index)
             self.tableView.selectRowIndexes(indexSet, byExtendingSelection: false)
         }
     }
     func batesInterfaceSelectBates(headerFooter: KMHeaderFooterObject) {
         self.tableView.reloadData()
-        if let index = KMHeaderFooterManager.defaultManager().onlyBatesObjects.firstIndex(of: headerFooter) {
+        if let index = KMHeaderFooterManager.defaultManager.onlyBatesObjects.firstIndex(of: headerFooter) {
             let indexSet = IndexSet(integer: index)
             self.tableView.selectRowIndexes(indexSet, byExtendingSelection: false)
         }
@@ -575,9 +575,9 @@ class KMBatchOperateAddHeaderFooterViewController: KMBatchOperateBaseViewControl
     func numberOfRows(in tableView: NSTableView) -> Int {
         var count = 0
         if self.isBates {
-            count = KMHeaderFooterManager.defaultManager().onlyBatesObjects.count
+            count = KMHeaderFooterManager.defaultManager.onlyBatesObjects.count
         } else {
-            count = KMHeaderFooterManager.defaultManager().onlyHeaderFooterObjects.count
+            count = KMHeaderFooterManager.defaultManager.onlyHeaderFooterObjects.count
         }
         self.blankView.isHidden = count != 0
         return count
@@ -585,9 +585,9 @@ class KMBatchOperateAddHeaderFooterViewController: KMBatchOperateBaseViewControl
     func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView? {
         var obj: KMHeaderFooterObject? = nil
         if self.isBates {
-            obj = KMHeaderFooterManager.defaultManager().onlyBatesObjects[row]
+            obj = KMHeaderFooterManager.defaultManager.onlyBatesObjects[row]
         } else {
-            obj = KMHeaderFooterManager.defaultManager().onlyHeaderFooterObjects[row]
+            obj = KMHeaderFooterManager.defaultManager.onlyHeaderFooterObjects[row]
         }
         guard let cellView = tableView.makeView(withIdentifier: NSUserInterfaceItemIdentifier(rawValue: "mainCell"), owner: self) as? KMHeaderFooterTableCellView else {
             return nil
@@ -612,9 +612,9 @@ class KMBatchOperateAddHeaderFooterViewController: KMBatchOperateBaseViewControl
     }
     func tableView(_ tableView: NSTableView, heightOfRow row: Int) -> CGFloat { 
         if self.isBates {
-            return KMHeaderFooterManager.defaultManager().onlyBatesObjects[row].cellHeight
+            return KMHeaderFooterManager.defaultManager.onlyBatesObjects[row].cellHeight
         } else {
-            return KMHeaderFooterManager.defaultManager().onlyHeaderFooterObjects[row].cellHeight
+            return KMHeaderFooterManager.defaultManager.onlyHeaderFooterObjects[row].cellHeight
         }
     }
     func tableView(_ tableView: NSTableView, shouldSelect tableColumn: NSTableColumn?) -> Bool {
@@ -628,7 +628,7 @@ class KMBatchOperateAddHeaderFooterViewController: KMBatchOperateBaseViewControl
         updateActionButtonbackgroundColor()
         if row == -1 { return }
         if self.isBates {
-            let bates = KMHeaderFooterManager.defaultManager().onlyBatesObjects[row]
+            let bates = KMHeaderFooterManager.defaultManager.onlyBatesObjects[row]
             self.currentObject = bates
             for i in 0..<(self.files?.count ?? 0) {
                 let file = self.files?[i]
@@ -644,7 +644,7 @@ class KMBatchOperateAddHeaderFooterViewController: KMBatchOperateBaseViewControl
                 }
             }
         } else {
-            let headerFooter = KMHeaderFooterManager.defaultManager().onlyHeaderFooterObjects[row]
+            let headerFooter = KMHeaderFooterManager.defaultManager.onlyHeaderFooterObjects[row]
             self.currentObject = headerFooter
             for i in 0..<(self.files?.count ?? 0) {
                 let file = self.files?[i]

+ 3 - 3
PDF Office/PDF Master/Class/PDFTools/AddHeaderFooter/WindowComtroller/KMHeaderFooterManagerWindowController.swift

@@ -25,16 +25,16 @@ class KMHeaderFooterManagerWindowController: NSWindowController{
         let obj = KMHeaderFooterObject()
         obj.isBates = self.isBates
         if self.isBates {
-            obj.id = KMHeaderFooterManager.defaultManager().fetchBatesAvailableName()
+            obj.id = KMHeaderFooterManager.defaultManager.fetchBatesAvailableName()
         }else {
-            obj.id = KMHeaderFooterManager.defaultManager().fetchHeaderFooterAvailableName()
+            obj.id = KMHeaderFooterManager.defaultManager.fetchHeaderFooterAvailableName()
         }
         initialID = obj.id
         return obj
     }()
     var originalHeaderFooterObj: KMHeaderFooterObject?
     lazy var dateFormatArray: Array<Any> = {
-        let arr = KMHeaderFooterManager.defaultManager().dateFormatArray
+        let arr = KMHeaderFooterManager.defaultManager.dateFormatArray
         return arr
     }()
     var initialID: String?

+ 3 - 3
PDF Office/PDF Master/Class/PDFTools/Bates/Controller/KMBatesPropertyController.swift

@@ -40,11 +40,11 @@ class KMBatesPropertyController: KMWatermarkAdjectivePropertyBaseController {
     
     func reloadDatas () {
         let controller: KMHeaderFooterListController = childViewController[0] as! KMHeaderFooterListController
-        controller.initDatas(datas: KMHeaderFooterManager.defaultManager().headFooterObjects)
+        controller.initDatas(datas: KMHeaderFooterManager.defaultManager.headFooterObjects)
     }
     
     func deleteTemplateModel(_ templateModel: KMHeaderFooterObject) -> Bool {
-        return KMHeaderFooterManager.defaultManager().addHeaderFooter(templateModel)
+        return KMHeaderFooterManager.defaultManager.addHeaderFooter(templateModel)
     }
     
     func deleteTemplateModel(in controller: KMHeaderFooterListController, index: Int) {
@@ -59,7 +59,7 @@ class KMBatesPropertyController: KMWatermarkAdjectivePropertyBaseController {
     }
     
     func deleteAllTemplateModel(in controller: KMHeaderFooterListController) {
-        if (KMHeaderFooterManager.defaultManager().removeAllHeaderFooter()) {
+        if (KMHeaderFooterManager.defaultManager.removeAllHeaderFooter()) {
             reloadDatas()
         }
     }

+ 2 - 2
PDF Office/PDF Master/Class/PDFTools/Bates/Controller/KMBatesPropertyHomeController.swift

@@ -69,7 +69,7 @@ class KMBatesPropertyHomeController: KMWatermarkAdjectivePropertyMainController
                     alert.runModal()
                     return
                 }
-                let result = KMHeaderFooterManager.defaultManager().addHeaderFooter(model)
+                let result = KMHeaderFooterManager.defaultManager.addHeaderFooter(model)
                 if (result) {
                     guard let callback = self!.modelDidChange else {
                         return
@@ -106,7 +106,7 @@ class KMBatesPropertyHomeController: KMWatermarkAdjectivePropertyMainController
             let editController: KMCreateBatesController = self!.currentController as! KMCreateBatesController
             if (editController.isEdited) {
                 /// 更新模板
-                let result = KMHeaderFooterManager.defaultManager().store()
+                let result = KMHeaderFooterManager.defaultManager.store()
 //                if (result) {
                     
                 self!.gotoHomeController("")

+ 3 - 3
PDF Office/PDF Master/Class/PDFTools/HeaderFooter/Controller/KMHeaderFooterPropertyController.swift

@@ -41,11 +41,11 @@ class KMHeaderFooterPropertyController: KMWatermarkAdjectivePropertyBaseControll
     
     func reloadDatas () {
         let controller: KMHeaderFooterListController = childViewController[0] as! KMHeaderFooterListController
-        controller.initDatas(datas: KMHeaderFooterManager.defaultManager().headFooterObjects)
+        controller.initDatas(datas: KMHeaderFooterManager.defaultManager.headFooterObjects)
     }
     
     func deleteTemplateModel(_ templateModel: KMHeaderFooterObject) -> Bool {
-        return KMHeaderFooterManager.defaultManager().removeHeaderFooter(templateModel)
+        return KMHeaderFooterManager.defaultManager.removeHeaderFooter(templateModel)
     }
     
     func deleteTemplateModel(in controller: KMHeaderFooterListController, index: Int) {
@@ -60,7 +60,7 @@ class KMHeaderFooterPropertyController: KMWatermarkAdjectivePropertyBaseControll
     }
     
     func deleteAllTemplateModel(in controller: KMHeaderFooterListController) {
-        KMHeaderFooterManager.defaultManager().removeAllHeaderFooter()
+        KMHeaderFooterManager.defaultManager.removeAllHeaderFooter()
         reloadDatas()
     }
     

+ 2 - 2
PDF Office/PDF Master/Class/PDFTools/HeaderFooter/Controller/KMHeaderFooterPropertyMainController.swift

@@ -69,7 +69,7 @@ class KMHeaderFooterPropertyMainController: KMWatermarkAdjectivePropertyMainCont
                     return
                 }
                 
-                KMHeaderFooterManager.defaultManager().addHeaderFooter(createController.model as! KMHeaderFooterObject)
+                KMHeaderFooterManager.defaultManager.addHeaderFooter(createController.model as! KMHeaderFooterObject)
                 guard let callback = self!.modelDidChange else {
                     return
                 }
@@ -106,7 +106,7 @@ class KMHeaderFooterPropertyMainController: KMWatermarkAdjectivePropertyMainCont
             let editController: KMCreateHeaderFooterController = self!.currentController as! KMCreateHeaderFooterController
             if (editController.isEdited) {
                 /// 更新模板
-                let result = KMHeaderFooterManager.defaultManager().store()
+                let result = KMHeaderFooterManager.defaultManager.store()
 //                if (result) {
                     
                 self!.gotoHomeController("")

+ 18 - 7
PDF Office/PDF Master/Class/PDFTools/HeaderFooter/Tools/KMHeaderFooterManager.swift

@@ -4,9 +4,11 @@ private let kHeaderFooterInfoSaveKey = "kHeaderFooterInfoSaveKey"
 
 class KMHeaderFooterManager: NSObject, NSCoding {
     var headFooterObjects: [KMHeaderFooterObject] = []
+    static let defaultManager = KMHeaderFooterManager()
 
     override init() {
         super.init()
+        self.reloadData()
     }
 
     required init?(coder: NSCoder) {
@@ -17,19 +19,28 @@ class KMHeaderFooterManager: NSObject, NSCoding {
         coder.encode(headFooterObjects, forKey: "headFooterObjects")
     }
 
-    static func defaultManager() -> KMHeaderFooterManager {
+    func reloadData() {
         let storedData = UserDefaults.standard.value(forKey: kHeaderFooterInfoSaveKey) as? Data
         if let storedData = storedData {
             if let manager = try? NSKeyedUnarchiver.unarchiveTopLevelObjectWithData(storedData) as? KMHeaderFooterManager {
-                return manager
+                
+                self.headFooterObjects = manager.headFooterObjects
             }
         }
-        let manager = KMHeaderFooterManager()
-        if manager.headFooterObjects.isEmpty {
-            manager.headFooterObjects = []
-        }
-        return manager
     }
+//    static func defaultManager() -> KMHeaderFooterManager {
+//        let storedData = UserDefaults.standard.value(forKey: kHeaderFooterInfoSaveKey) as? Data
+//        if let storedData = storedData {
+//            if let manager = try? NSKeyedUnarchiver.unarchiveTopLevelObjectWithData(storedData) as? KMHeaderFooterManager {
+//                return manager
+//            }
+//        }
+//        let manager = KMHeaderFooterManager()
+//        if manager.headFooterObjects.isEmpty {
+//            manager.headFooterObjects = []
+//        }
+//        return manager
+//    }
 
     var onlyHeaderFooterObjects: [KMHeaderFooterObject] {
         return headFooterObjects.filter { !$0.isBates }

+ 1 - 1
PDF Office/PDF Master/Class/PDFTools/Watermark/Tools/KMWatermarkAdjectiveTools.swift

@@ -172,7 +172,7 @@ case bates = 4
         }
         
         DispatchQueue.global().async {
-            let document: CPDFDocument = pdfView.document
+            let document: CPDFDocument = CPDFDocument(url: pdfView.document.documentURL)
             if (type == .bates) {
                 let property = document.bates()
                 property?.clear()

+ 1 - 1
PDF Office/PDF Master/Class/PDFTools/Watermark/View/KMWatermarkPDFView.swift

@@ -582,7 +582,7 @@ class KMWatermarkPDFView: CPDFView {
     static func convertDateFormat(_ oldString: String) -> String {
         var newString = oldString
         
-        for dateFormat in KMHeaderFooterManager.defaultManager().dateFormatArray {
+        for dateFormat in KMHeaderFooterManager.defaultManager.dateFormatArray {
             if newString.contains(dateFormat) {
                 let formatString = dateFormat.replacingOccurrences(of: "m", with: "M")
                 let replace = "<<\(dateFormat)>>"

+ 4 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Stamp/CStampSignatureObject.swift

@@ -346,6 +346,7 @@ let CPDFListStampFolderPath = ApplicationSupportDirectory.stringByAppendingPathC
             page?.addAnnotation(stamp)
             image = stamp!.stampImage()
         } else if self.stampCategoryType == CPDFStampType.text || self.stampCategoryType == CPDFStampType.init(rawValue: CPDFStampTypeDynamic) {
+            updateDetailText()
             let annotation = CPDFListStampAnnotation(document: document, text: self.text, detailText: self.detailText, style: self.style, shape: self.shape)
             annotation!.bounds = NSRect(x: 0, y: 0, width: annotation!.bounds.size.width, height: annotation!.bounds.size.height)
             let page = document!.page(at: 0)
@@ -356,6 +357,9 @@ let CPDFListStampFolderPath = ApplicationSupportDirectory.stringByAppendingPathC
         return image
     }
 
+    func updateDetailText() {
+        self.detailText = KMStampManager.defaultManager.getNameAndDateString()
+    }
 
     func sizeOfString(_ string: String, withFontSize fontSize: CGFloat) -> CGSize {
         let font = NSFont(name: "Helvetica", size: fontSize)

+ 17 - 13
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/KMGeneralAnnotationViewController.swift

@@ -856,20 +856,24 @@ let KMColorPickerViewHeight: CGFloat = 64
     }
     
     func openFreeTextStylesViewController() {
-//        let vc = KMFreeTextStylesViewController()
-//        vc.annotations = self.annotations
-//        vc.view.frame = CGRect(x: 0, y: 0, width: 280, height: CGRectGetHeight(self.view.window?.frame ?? CGRect.zero) - 300)
-//        
-//        let createFilePopover = NSPopover()
-//        createFilePopover.contentViewController = vc
-//        createFilePopover.animates = true
-//        createFilePopover.behavior = .transient
-//        createFilePopover.show(relativeTo: CGRect(x: _textImageBox.bounds.origin.x, y: 10, width: _textImageBox.bounds.size.width, height: _textImageBox.bounds.size.height), of: _textImageBox, preferredEdge: .minY)
-//        
-//        // Assuming _textImageBox is an NSView instance
-//        createFilePopover.show(relativeTo: _textImageBox.bounds, of: _textImageBox, preferredEdge: .minY)
+        if annotations.count == 0 {
+            return
+        }
+        
+        let vc = KMFreeTextStylesViewController()
+        vc.annotations = annotations
+        vc.view.frame = CGRect(x: 0, y: 0, width: 280, height: CGRectGetHeight(self.view.window?.frame ?? CGRect.zero) - 300)
+        
+        let createFilePopover = NSPopover()
+        createFilePopover.contentViewController = vc
+        createFilePopover.animates = true
+        createFilePopover.behavior = .transient
+        createFilePopover.show(relativeTo: CGRect(x: textImageBox.bounds.origin.x, y: 10, width: textImageBox.bounds.size.width, height: textImageBox.bounds.size.height), of: textImageBox, preferredEdge: .minY)
+        
+        // Assuming _textImageBox is an NSView instance
+        createFilePopover.show(relativeTo: textImageBox.bounds, of: textImageBox, preferredEdge: .minY)
         
-        // Release is not needed in Swift due to automatic reference counting (ARC)
+//         Release is not needed in Swift due to automatic reference counting (ARC)
     }
 
     func changeStoredFontInfo(_ sender: Any) {

+ 14 - 0
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/View/KMFreeTextStylesViewController/KMFreeTextStylesViewController.h

@@ -0,0 +1,14 @@
+//
+//  KMFreeTextStylesViewController.h
+//  PDF Reader Pro Edition
+//
+//  Created by KdanWJ on 2021/1/29.
+//
+
+#import <Cocoa/Cocoa.h>
+
+@interface KMFreeTextStylesViewController : NSViewController
+
+@property (nonatomic, retain) NSArray *annotations;
+
+@end

+ 653 - 0
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/View/KMFreeTextStylesViewController/KMFreeTextStylesViewController.m

@@ -0,0 +1,653 @@
+//
+//  KMFreeTextStylesViewController.m
+//  PDF Reader Pro Edition
+//
+//  Created by KdanWJ on 2021/1/29.
+//
+
+#import "KMFreeTextStylesViewController.h"
+#import "PDF_Reader_Pro-Swift.h"
+//#import "NSMenu_SKExtensions.h"
+//#import <SkimNotes/SkimNotes.h>
+//#import "PDFAnnotation_SKExtensions.h"
+
+typedef NS_ENUM(NSUInteger, KMFreeTextMenuActionType) {
+    KMFreeTextMenuActionType_Redefine = 0,
+    KMFreeTextMenuActionType_Rename,
+    KMFreeTextMenuActionType_Delete,
+    KMFreeTextMenuActionType_Default
+};
+
+#pragma mark - KMScstyleTableRowView
+
+@interface KMScstyleTableRowView : NSTableRowView
+@end
+@implementation KMScstyleTableRowView
+
+- (instancetype)init {
+    self = [super init];
+    if (self) {
+        [self addTrackingArea];
+    }
+    return self;
+}
+
+- (void)addTrackingArea {
+    NSTrackingArea *trackingArea = [[NSTrackingArea alloc] initWithRect:self.bounds options:NSTrackingMouseEnteredAndExited | NSTrackingInVisibleRect | NSTrackingActiveAlways |NSTrackingMouseMoved owner:self userInfo:nil];
+    [self addTrackingArea:trackingArea];
+}
+
+- (void)drawSelectionInRect:(NSRect)dirtyRect {
+        NSRect selectionRect = self.bounds;
+        [[KMAppearance KMColor_Status_Sel] setFill];
+         NSBezierPath *selectionPath = [NSBezierPath bezierPathWithRoundedRect:selectionRect xRadius:0 yRadius:0];
+         [selectionPath fill];
+}
+
+- (void)mouseEntered:(NSEvent *)event {
+    [super mouseEntered:event];
+}
+
+@end
+
+@interface KMFreeTextStyleTableViewCell:NSTableCellView <NSTextFieldDelegate>
+
+@property (nonatomic, retain) IBOutlet NSImageView *checkImageView;
+
+@property (nonatomic, retain) IBOutlet NSButton *updateButton;
+
+@property (nonatomic, retain) IBOutlet NSButton *moreButton;
+
+@property (nonatomic, retain) IBOutlet NSTextField *styleLabel;
+
+@property (assign) IBOutlet NSLayoutConstraint *styleLabelHeightConstant;
+
+@property (nonatomic, copy) void (^mouseMoveCallback) (BOOL mouseEntered);
+
+@property (nonatomic, copy) void (^menuActionCallback) (KMFreeTextMenuActionType memuType);
+
+@property (nonatomic, copy) void (^renameActionCallback) (NSString *count, KMFreeTextMenuActionType memuType);
+
+@property (nonatomic, retain) NSArray *annotations;
+
+@property (nonatomic, retain) NSArray *styleTitles;
+
+@property (nonatomic, assign) NSInteger *selectRow;
+
+@end
+
+@implementation KMFreeTextStyleTableViewCell
+
+- (void)dealloc {
+
+}
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    
+    self.checkImageView.hidden = YES;
+        
+    self.updateButton.wantsLayer = YES;
+    self.updateButton.title = @"􀅈";
+    self.updateButton.layer.cornerRadius = CGRectGetWidth(_updateButton.bounds)/2;
+    self.updateButton.layer.backgroundColor = [KMAppearance KMColor_Layout_H2].CGColor;
+    self.updateButton.hidden = YES;
+        
+    self.moreButton.image = [NSImage imageNamed:@"KMImageNameUXIconBtnArrowRight"];
+    _moreButton.hidden = YES;
+    _moreButton.enabled = NO;
+    
+    self.styleLabel.editable = NO;
+    
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(contextDidEndEdit:) name:NSControlTextDidEndEditingNotification object:_styleLabel];
+}
+
+- (void)viewDidMoveToWindow {
+    [super viewDidMoveToWindow];
+    if ([self window] != nil) {
+        [self addTrackingRect:[self bounds]
+                        owner:self
+                     userData:NULL
+                 assumeInside:NO];
+    }
+}
+
+- (void)setFrameSize:(NSSize)newSize {
+    [super setFrameSize:newSize];
+    [self addTrackingRect:NSMakeRect(0, 0, newSize.width, newSize.height)
+                    owner:self
+                 userData:NULL
+             assumeInside:NO];
+}
+
+- (void)mouseEntered:(NSEvent *)event {
+    if (self.mouseMoveCallback) {
+        self.mouseMoveCallback(YES);
+    }
+}
+
+- (void)mouseExited:(NSEvent *)event {
+    if (self.mouseMoveCallback) {
+        self.mouseMoveCallback(NO);
+    }
+}
+
+- (BOOL) isChange {
+    int selectInt = (int)self.selectRow;
+
+    NSAttributedString *string = self.styleLabel.attributedStringValue;
+    if(string.length < 1) {
+        return NO;
+    }
+    NSDictionary *dict = [string attributesAtIndex:0 effectiveRange:nil];
+    NSFont *font = dict[NSFontAttributeName];
+    NSColor *color = dict[NSForegroundColorAttributeName];
+    NSInteger alignment = self.styleLabel.alignment;
+    
+    BOOL colorIsEqual = NO;
+    BOOL alignEqual = NO;
+    BOOL fontSizeEqual = NO;
+    BOOL fontWeightEqual = NO;
+    BOOL fontNameEqual = NO;
+    BOOL stringEqual = NO;
+    
+    NSColor *color2 = nil;
+    if (_styleTitles[selectInt][@"Font Color"]) {
+        color2 = [NSUnarchiver unarchiveObjectWithData:_styleTitles[selectInt][@"Font Color"]];
+    }
+    if (CGColorEqualToColor(color.CGColor, color2.CGColor)){
+        colorIsEqual = YES;
+    }
+    NSString *alignString = @"NSTextAlignmentLeft";
+    if (_styleLabel.alignment == NSTextAlignmentLeft) {
+        alignment = @"NSTextAlignmentLeft";
+    } else if (_styleLabel.alignment == NSTextAlignmentCenter) {
+        alignment = @"NSTextAlignmentCenter";
+    } else if (_styleLabel.alignment == NSTextAlignmentRight) {
+        alignment = @"NSTextAlignmentRight";
+    } else if (_styleLabel.alignment == NSTextAlignmentJustified) {
+        alignment = @"NSTextAlignmentJustified";
+    }
+    if ([alignString isEqualToString:_styleTitles[selectInt][@"Font Alignment"]]) {
+        alignEqual = YES;
+    }
+    if ([_styleLabel.stringValue isEqualToString:_styleTitles[selectInt][@"StringValue"]]) {
+        stringEqual = YES;
+    }
+    NSString *fontSize = [NSString stringWithFormat:@"%.f",font.pointSize];
+    if ([fontSize isEqualToString:_styleTitles[selectInt][@"Font Size"]]) {
+        fontSizeEqual = YES;
+    }
+    if ([font.fontName isEqualToString:_styleTitles[selectInt][@"Font Name"]]) {
+        fontNameEqual = YES;
+    }
+    NSString *weight = [font.fontDescriptor objectForKey:NSFontFaceAttribute];
+    if ([weight isEqualToString:_styleTitles[selectInt][@"Font Weight"]]) {
+        fontWeightEqual = YES;
+    }
+    
+    if (colorIsEqual && alignEqual && fontSizeEqual && fontWeightEqual && stringEqual) {
+        return NO;
+    } else {
+        return YES;
+    }
+}
+
+#pragma mark - Action
+
+- (IBAction)updateButtonAction:(NSButton *)sender {
+    
+}
+
+- (IBAction)moreButtonAction:(NSButton *)sender {
+    NSMenu *menu = [[NSMenu alloc] init];
+    NSMenuItem *redefineItem = [menu addItemWithTitle:NSLocalizedString(@"Redefine from Selection", nil) action:@selector(redefineAction:) target:self];
+    [redefineItem setRepresentedObject:self];
+    [menu addItem:[NSMenuItem separatorItem]];
+    NSMenuItem *renameItem = [menu addItemWithTitle:NSLocalizedString(@"Rename Style", nil) action:@selector(renameAction:) target:self];
+    [renameItem setRepresentedObject:self];
+    [menu addItem:[NSMenuItem separatorItem]];
+    NSMenuItem *deleteItem = [menu addItemWithTitle:NSLocalizedString(@"Delete style", nil) action:@selector(deleteAction:) target:self];
+    [deleteItem setRepresentedObject:self];
+    NSMenuItem *defaultItem = [menu addItemWithTitle:NSLocalizedString(@"Restore Default Style", nil) action:@selector(defaultAction:) target:self];
+    [defaultItem setRepresentedObject:self];
+    [NSMenu popUpContextMenu:menu withEvent:[NSApp currentEvent] forView:(NSButton *)sender];
+}
+
+- (IBAction)redefineAction:(id)sender {
+    if (self.menuActionCallback) {
+        self.menuActionCallback(KMFreeTextMenuActionType_Redefine);
+    }
+}
+
+- (IBAction)renameAction:(id)sender {
+    _styleLabel.editable = YES;
+    [_styleLabel becomeFirstResponder];
+}
+
+- (IBAction)deleteAction:(id)sender {
+    if (self.menuActionCallback) {
+        self.menuActionCallback(KMFreeTextMenuActionType_Delete);
+    }
+}
+
+- (IBAction)defaultAction:(id)sender {
+    if (self.menuActionCallback) {
+        self.menuActionCallback(KMFreeTextMenuActionType_Default);
+    }
+}
+
+- (BOOL)validateMenuItem:(NSMenuItem *)menuItem {
+    SEL action = [menuItem action];
+    if (action == @selector(redefineAction:)) {
+        PDFAnnotation *annotation = _annotations.firstObject;
+//        if (annotation.string != nil) {
+//            return YES;
+//        } else {
+            return NO;
+//        }
+    } else if (action == @selector(deleteAction:)) {
+        if (_styleTitles.count > 1) {
+            return YES;
+        } else {
+            return NO;
+        }
+    } else if (action == @selector(defaultAction:)) {
+        if (_selectRow > 9) {
+            return NO;
+        } else {
+            if (_styleTitles.count > 1) {
+                if ([self isChange]) {
+                    return YES;
+                } else {
+                    return NO;
+                }
+            }
+            return YES;
+        }
+    }
+    return YES;
+}
+
+#pragma mark - NSNotification
+
+- (void)contextDidEndEdit:(NSNotification *)notification {
+    NSTextField *textField = (NSTextField *)notification.object;
+    
+    if (self.renameActionCallback) {
+        self.renameActionCallback(textField.stringValue, KMFreeTextMenuActionType_Rename);
+    }
+}
+
+@end
+
+@interface KMFreeTextStylesViewController () <NSTableViewDelegate, NSTableViewDataSource>
+
+@property (assign) IBOutlet NSTextField *defaultStylesLabel;
+@property (assign) IBOutlet NSButton *styleAddButton;
+@property (assign) IBOutlet NSButton *styleMoreButton;
+
+@property (assign) IBOutlet NSScrollView *styleScrollView;
+@property (assign) IBOutlet NSTableView *scstyleTableView;
+
+@property (nonatomic, retain) NSMutableArray <NSDictionary *>*freetextStyles;
+
+@property (nonatomic, assign) NSInteger lastSelectRow;
+
+@end
+
+@implementation KMFreeTextStylesViewController
+
+- (void)dealloc {
+
+}
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do view setup here.
+    
+    self.defaultStylesLabel.stringValue = NSLocalizedString(@"Default Style", nil);
+    
+    self.styleAddButton.image = [NSImage imageNamed:@"KMImageNameUXIconBtnAddNor"];
+    self.styleMoreButton.image = [NSImage imageNamed:@"KMImageNameUXIconBtnSidebarMoreSecondary"];
+    
+    [[_defaultStylesLabel cell] setLineBreakMode:NSLineBreakByCharWrapping];
+    [[_defaultStylesLabel cell] setTruncatesLastVisibleLine:YES];
+    
+    self.lastSelectRow = -1;
+}
+
+#pragma mark - View Methods
+
+#pragma mark - freetextStyles
+
+- (void)setFreetextStyles:(NSMutableArray<NSDictionary *> *)freetextStyles {
+    [[NSUserDefaults standardUserDefaults] setObject:freetextStyles forKey:@"KMFreetextAnnotationStylesKey"];
+    [[NSUserDefaults standardUserDefaults] synchronize];
+}
+
+- (NSMutableArray<NSDictionary *> *)freetextStyles {
+    if ([[NSUserDefaults standardUserDefaults] objectForKey:@"KMFreetextAnnotationStylesKey"]) {
+        return [[NSUserDefaults standardUserDefaults] objectForKey:@"KMFreetextAnnotationStylesKey"];
+    } else {
+        return [self defaultFreetextStyles];
+    }
+}
+
+- (NSMutableArray <NSDictionary *>*)defaultFreetextStyles {
+    return @[@{@"Font Name" : @"PingFang HK", @"Font Size" : @"40", @"Font Weight" : @"Semibold", @"Font Color" : [self dataForColor:[NSColor colorWithRed:36/255.0 green:42/255.0 blue:51/255.0 alpha:1.0]], @"Font Alignment" : @"NSTextAlignmentLeft", @"StringValue" : NSLocalizedString(@"The Headlines", nil)},
+             @{@"Font Name" : @"PingFang HK", @"Font Size" : @"32", @"Font Weight" : @"Semibold", @"Font Color" : [self dataForColor:[NSColor colorWithRed:36/255.0 green:42/255.0 blue:51/255.0 alpha:1.0]], @"Font Alignment" : @"NSTextAlignmentLeft", @"StringValue" : NSLocalizedString(@"Title (small)", nil)},
+             @{@"Font Name" : @"PingFang HK", @"Font Size" : @"24", @"Font Weight" : @"Semibold", @"Font Color" : [self dataForColor:[NSColor colorWithRed:36/255.0 green:42/255.0 blue:51/255.0 alpha:1.0]], @"Font Alignment" : @"NSTextAlignmentLeft", @"StringValue" : NSLocalizedString(@"Subtitle (Bold)", nil)},
+             @{@"Font Name" : @"PingFang HK", @"Font Size" : @"24", @"Font Weight" : @"Regular", @"Font Color" : [self dataForColor:[NSColor colorWithRed:36/255.0 green:42/255.0 blue:51/255.0 alpha:1.0]], @"Font Alignment" : @"NSTextAlignmentLeft", @"StringValue" : NSLocalizedString(@"Subtitle", nil)},
+             @{@"Font Name" : @"PingFang HK", @"Font Size" : @"20", @"Font Weight" : @"Regular", @"Font Color" : [self dataForColor:[NSColor colorWithRed:36/255.0 green:42/255.0 blue:51/255.0 alpha:1.0]], @"Font Alignment" : @"NSTextAlignmentLeft", @"StringValue" : NSLocalizedString(@"Text", nil)},
+             @{@"Font Name" : @"PingFang HK", @"Font Size" : @"16", @"Font Weight" : @"Regular", @"Font Color" : [self dataForColor:[NSColor colorWithRed:36/255.0 green:42/255.0 blue:51/255.0 alpha:1.0]], @"Font Alignment" : @"NSTextAlignmentLeft", @"StringValue" : NSLocalizedString(@"Text (small)", nil)},
+             @{@"Font Name" : @"PingFang HK", @"Font Size" : @"16", @"Font Weight" : @"Regular", @"Font Color" : [self dataForColor:[NSColor colorWithRed:117/255.0 green:119/255.0 blue:128/255.0 alpha:1.0]], @"Font Alignment" : @"NSTextAlignmentLeft", @"StringValue" : NSLocalizedString(@"Text (grey)", nil)},
+             @{@"Font Name" : @"PingFang HK", @"Font Size" : @"14", @"Font Weight" : @"Semibold", @"Font Color" : [self dataForColor:[NSColor colorWithRed:36/255.0 green:42/255.0 blue:51/255.0 alpha:1.0]], @"Font Alignment" : @"NSTextAlignmentLeft", @"StringValue" : NSLocalizedString(@"Instructions", nil)},
+             @{@"Font Name" : @"PingFang HK", @"Font Size" : @"16", @"Font Weight" : @"Semibold", @"Font Color" : [self dataForColor:[NSColor colorWithRed:200/255.0 green:38/255.0 blue:6/255.0 alpha:1.0]], @"Font Alignment" : @"NSTextAlignmentLeft", @"StringValue" : NSLocalizedString(@"Instructions (red)", nil)},
+             @{@"Font Name" : @"PingFang HK", @"Font Size" : @"12", @"Font Weight" : @"Regular", @"Font Color" : [self dataForColor:[NSColor colorWithRed:36/255.0 green:42/255.0 blue:51/255.0 alpha:1.0]], @"Font Alignment" : @"NSTextAlignmentLeft", @"StringValue" : NSLocalizedString(@"Annotations", nil)}];
+}
+
+- (NSColor *)colorForData:(NSData *)data {
+    NSColor *color = nil;
+    if (data) {
+        color = [NSUnarchiver unarchiveObjectWithData:data];
+    }
+    return color;
+}
+
+- (NSData *)dataForColor:(NSColor *)color {
+    NSData *data = color ? [NSArchiver archivedDataWithRootObject:color] : nil;
+    return data;
+}
+
+- (CGFloat)heightForNoteStringValue:(NSString *)text attrited:(NSDictionary *)attrited {
+    CGSize maxSize = CGSizeMake(MAXFLOAT, MAXFLOAT);
+    NSStringDrawingOptions opts = NSStringDrawingUsesLineFragmentOrigin| NSStringDrawingUsesFontLeading;
+    CGRect rect = [text boundingRectWithSize:maxSize
+                                     options:opts
+                                  attributes:attrited
+                                     context:nil];
+    return rect.size.height;
+}
+
+#pragma mark - Action
+
+- (IBAction)styleAddButtonAction:(NSButton *)sender {
+    PDFAnnotationFreeText *annotation = (PDFAnnotationFreeText *)self.annotations.firstObject;
+    NSString *fontName = [annotation.font.fontDescriptor objectForKey:NSFontFamilyAttribute] ? : @"PingFang HK";
+    NSString *fontSize = [NSString stringWithFormat:@"%f", annotation.font.pointSize] ? : @"20";
+    NSString *fontWeight = [annotation.font.fontDescriptor objectForKey:NSFontFaceAttribute] ? : @"Regular";
+    NSColor *fontColor = annotation.fontColor ? : [NSColor colorWithRed:36/255.0 green:42/255.0 blue:51/255.0 alpha:1.0];
+    NSString *alignmentType = @"NSTextAlignmentLeft";
+    if (annotation.alignment == NSTextAlignmentLeft) {
+        alignmentType = @"NSTextAlignmentLeft";
+    } else if (annotation.alignment == NSTextAlignmentCenter) {
+        alignmentType = @"NSTextAlignmentCenter";
+    } else if (annotation.alignment == NSTextAlignmentRight) {
+        alignmentType = @"NSTextAlignmentRight";
+    } else if (annotation.alignment == NSTextAlignmentJustified) {
+        alignmentType = @"NSTextAlignmentJustified";
+    }
+    NSString *fontAlignment = alignmentType ? : @"NSTextAlignmentLeft";
+    NSString *noteString = /*annotation.string ? :*/ NSLocalizedString(@"Text", nil);
+    NSDictionary *dict = @{@"Font Name" : fontName, @"Font Size" : fontSize, @"Font Weight" : fontWeight, @"Font Color" : [self dataForColor:fontColor], @"Font Alignment" : fontAlignment, @"StringValue" : noteString};
+    NSMutableArray <NSDictionary *>*styleArr = [NSMutableArray arrayWithArray:[self freetextStyles]];
+    [styleArr addObject:dict];
+    [self setFreetextStyles:styleArr];
+    
+    [_scstyleTableView reloadData];
+    
+    NSIndexSet *indexSet = [NSIndexSet indexSetWithIndex:(styleArr.count - 1)];
+    [self.scstyleTableView selectRowIndexes:indexSet byExtendingSelection:NO];
+    [self.scstyleTableView.enclosingScrollView.contentView scrollToPoint:NSMakePoint(0, ((NSView*)self.scstyleTableView.enclosingScrollView.documentView).frame.size.height - self.scstyleTableView.enclosingScrollView.contentSize.height)];
+}
+
+- (IBAction)styleMoreButtonAction:(NSButton *)sender {
+    NSMenu *menu = [[NSMenu alloc] init];
+    NSMenuItem *moreItem = [menu addItemWithTitle:NSLocalizedString(@"Restore Default Style", nil) action:@selector(freetextNote_moreAction:) target:self];
+    [moreItem setRepresentedObject:self];
+    [NSMenu popUpContextMenu:menu withEvent:[NSApp currentEvent] forView:(NSButton *)sender];
+}
+
+- (IBAction)freetextNote_moreAction:(id)sender {
+    [self setFreetextStyles:[self defaultFreetextStyles]];
+    
+    [_scstyleTableView reloadData];
+}
+
+- (void)redefineAction:(NSInteger)count {
+    if (self.annotations.count > 0) {
+        PDFAnnotationFreeText *tAnnotation = (PDFAnnotationFreeText *)self.annotations.firstObject;
+        NSString * family =   [tAnnotation.font.fontDescriptor objectForKey:NSFontFamilyAttribute];
+        NSString * style =   [tAnnotation.font.fontDescriptor objectForKey:NSFontFaceAttribute];
+        NSString *fontSize = [NSString stringWithFormat:@"%f",tAnnotation.font.pointSize];
+        NSColor *color = tAnnotation.fontColor;
+        NSString *alignment = @"NSTextAlignmentLeft";
+        if (tAnnotation.alignment == NSTextAlignmentLeft) {
+            alignment = @"NSTextAlignmentLeft";
+        } else if (tAnnotation.alignment == NSTextAlignmentCenter) {
+            alignment = @"NSTextAlignmentCenter";
+        } else if (tAnnotation.alignment == NSTextAlignmentRight) {
+            alignment = @"NSTextAlignmentRight";
+        } else if (tAnnotation.alignment == NSTextAlignmentJustified) {
+            alignment = @"NSTextAlignmentJustified";
+        }
+        NSString *stringValue = @"";
+        /*if (tAnnotation.string && tAnnotation.string.length > 0) {
+            stringValue = tAnnotation.string;
+        } else */if (count < (NSInteger)self.defaultFreetextStyles.count) {
+            NSDictionary *dict = self.defaultFreetextStyles[count];
+            stringValue = dict[@"StringValue"] ? : @"";
+        }
+        
+        NSMutableArray <NSDictionary *>*dictArr = [NSMutableArray arrayWithArray:[self freetextStyles]];
+        dictArr[count] = @{@"Font Name" : family, @"Font Size" : fontSize, @"Font Weight" : style, @"Font Color" : [self dataForColor:color], @"Font Alignment" : alignment, @"StringValue" : stringValue};
+        [self setFreetextStyles:dictArr];
+        [_scstyleTableView reloadData];
+    }
+}
+
+- (IBAction)renameAction:(NSString *)value
+                   Count:(NSInteger)count {
+    if(count >= [self freetextStyles].count) return;
+    NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithDictionary:[self freetextStyles][count]];
+    [dict setObject:value forKey:@"StringValue"];
+    NSMutableArray *styleArr = [NSMutableArray arrayWithArray:[self freetextStyles]];
+    styleArr[count] = (NSDictionary *)dict;
+    [self setFreetextStyles:styleArr];
+    
+    NSInteger selectRow = _scstyleTableView.selectedRow;
+    [_scstyleTableView reloadData];
+    NSIndexSet *indexSet = [NSIndexSet indexSetWithIndex:selectRow];
+    [self.scstyleTableView selectRowIndexes:indexSet byExtendingSelection:NO];
+}
+
+- (IBAction)deleteAction:(NSInteger)count {
+    NSMutableArray *styleArr = [NSMutableArray arrayWithArray:[self freetextStyles]];
+    [styleArr removeObjectAtIndex:count];
+    [self setFreetextStyles:styleArr];
+    
+    [self.scstyleTableView reloadData];
+}
+
+- (IBAction)defaultAction:(NSInteger)count {
+    if (count < 10) {
+        NSDictionary *dict = [self defaultFreetextStyles][count];
+        
+        NSMutableArray *styleArr = [NSMutableArray arrayWithArray:[self freetextStyles]];
+        styleArr[count] = dict;
+        [self setFreetextStyles:styleArr];
+        
+        NSMutableIndexSet *rowIndexSet = [[NSMutableIndexSet alloc] init];
+        [rowIndexSet addIndex:count];
+        NSMutableIndexSet *columnIndexSet = [[NSMutableIndexSet alloc] init];
+        [columnIndexSet addIndex:0];
+        [self.scstyleTableView reloadDataForRowIndexes:rowIndexSet columnIndexes:columnIndexSet];
+    }
+}
+
+#pragma mark - NSTableViewDelegate, NSTableViewDataSource
+
+- (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView {
+    return [self freetextStyles].count;
+}
+
+- (CGFloat)tableView:(NSTableView *)tableView heightOfRow:(NSInteger)row {
+    NSDictionary *dict = [self freetextStyles][row];
+    NSString *fontName = dict[@"Font Name"];
+    CGFloat fontSize = [dict[@"Font Size"] floatValue];
+    NSString *fontWeight = dict[@"Font Weight"];
+    NSString *fontStringValue = dict[@"StringValue"];
+    
+    NSMutableParagraphStyle *paragraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
+    paragraphStyle.lineBreakMode = NSLineBreakByWordWrapping;
+    paragraphStyle.alignment = NSTextAlignmentLeft;
+    paragraphStyle.lineSpacing = 1;
+    
+    NSFontDescriptor *attributeFontDescriptor = [NSFontDescriptor fontDescriptorWithFontAttributes:@{NSFontFamilyAttribute:fontName,NSFontFaceAttribute:fontWeight}];
+    NSFont *font = [NSFont fontWithDescriptor:attributeFontDescriptor size:fontSize];
+    NSDictionary *attrited = @{NSFontAttributeName:font, NSParagraphStyleAttributeName: paragraphStyle};
+       
+   CGRect rect = [fontStringValue boundingRectWithSize:CGSizeMake(135.0, CGRectMaxYEdge)
+                                        options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading
+                                     attributes:attrited
+                                        context:nil];
+    return CGRectGetHeight(rect);
+}
+
+- (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row {
+    NSString *identifier = [tableColumn identifier];
+    KMFreeTextStyleTableViewCell *cellView = [tableView makeViewWithIdentifier:identifier owner:self];
+    NSDictionary *dict = [self freetextStyles][row];
+    NSString *fontName = dict[@"Font Name"];
+    CGFloat fontSize = [dict[@"Font Size"] floatValue];
+    NSString *fontWeight = dict[@"Font Weight"];
+    NSColor *fontColor = [self colorForData:dict[@"Font Color"]];
+    NSString *fontAlignment = dict[@"Font Alignment"];
+    NSString *fontStringValue = dict[@"StringValue"];
+    
+    if (@available(macOS 10.14, *)) {
+        cellView.styleLabel.wantsLayer = YES;
+        NSAppearanceName appearanceName = [[NSApp effectiveAppearance] bestMatchFromAppearancesWithNames:@[NSAppearanceNameAqua, NSAppearanceNameDarkAqua]];
+        if ([appearanceName isEqualToString:NSAppearanceNameDarkAqua]) {
+            if (row == 0 || row == 1 || row == 2 || row == 3 || row == 4 || row == 5  || row == 7 || row == 9) {
+                cellView.styleLabel.layer.backgroundColor = [KMAppearance KMColor_Layout_W30].CGColor;
+            } else {
+                cellView.styleLabel.layer.backgroundColor = [NSColor clearColor].CGColor;
+            }
+        } else {
+            cellView.styleLabel.layer.backgroundColor = [NSColor clearColor].CGColor;
+        }
+    }
+    
+    NSFontDescriptor *attributeFontDescriptor = [NSFontDescriptor fontDescriptorWithFontAttributes:@{NSFontFamilyAttribute:fontName,NSFontFaceAttribute:fontWeight}];
+    NSFont *font = [NSFont fontWithDescriptor:attributeFontDescriptor size:fontSize];
+    NSDictionary *attrited = @{NSFontAttributeName:font, NSForegroundColorAttributeName:fontColor};
+    NSAttributedString *string = [[NSAttributedString alloc] initWithString:fontStringValue attributes:attrited];
+    cellView.styleLabel.attributedStringValue = string;
+    if ([fontAlignment isEqualToString:@"NSTextAlignmentLeft"]) {
+        cellView.styleLabel.alignment = NSTextAlignmentLeft;
+    } else if ([fontAlignment isEqualToString:@"NSTextAlignmentCenter"]) {
+        cellView.styleLabel.alignment = NSTextAlignmentCenter;
+    } else if ([fontAlignment isEqualToString:@"NSTextAlignmentRight"]) {
+        cellView.styleLabel.alignment = NSTextAlignmentRight;
+    } else if ([fontAlignment isEqualToString:@"NSTextAlignmentJustified"]) {
+        cellView.styleLabel.alignment = NSTextAlignmentJustified;
+    }
+    cellView.styleLabelHeightConstant.constant = [self heightForNoteStringValue:fontStringValue attrited:attrited];
+    
+    cellView.annotations = _annotations;
+    cellView.styleTitles = [self freetextStyles];
+    cellView.selectRow = row;
+    
+    if (row != tableView.selectedRow) {
+        cellView.moreButton.hidden = YES;
+        cellView.moreButton.enabled = NO;
+    }
+    
+    cellView.mouseMoveCallback = ^(BOOL mouseEntered) {
+        if (mouseEntered) {
+            cellView.moreButton.hidden = NO;
+            cellView.moreButton.enabled = YES;
+        } else {
+            if (row != tableView.selectedRow) {
+                cellView.moreButton.hidden = YES;
+                cellView.moreButton.enabled = NO;
+            }
+        }
+    };
+    
+    __block typeof(self) blockSelf = self;
+    cellView.menuActionCallback = ^(KMFreeTextMenuActionType memuType) {
+        switch (memuType) {
+            case KMFreeTextMenuActionType_Redefine:
+                [blockSelf redefineAction:row];
+                break;
+            case KMFreeTextMenuActionType_Delete:
+                [blockSelf deleteAction:row];
+                break;
+            case KMFreeTextMenuActionType_Default:
+                [blockSelf defaultAction:row];
+                break;
+            default:
+                break;
+        }
+    };
+    
+    cellView.renameActionCallback = ^(NSString *count, KMFreeTextMenuActionType memuType) {
+        if (memuType == KMFreeTextMenuActionType_Rename) {
+            [blockSelf renameAction:count Count:row];
+        }
+    };
+    
+    return cellView;
+}
+
+- (void)tableViewSelectionDidChange:(NSNotification *)notification {
+    NSTableView *tableView = (NSTableView *)notification.object;
+    NSInteger selectRow = tableView.selectedRow;
+    if(selectRow < 0) return;
+    if (_lastSelectRow != selectRow && _lastSelectRow != -1) {
+        NSMutableIndexSet *rowIndexSet = [[NSMutableIndexSet alloc] init];
+        [rowIndexSet addIndex:_lastSelectRow];
+        NSMutableIndexSet *columnIndexSet = [[NSMutableIndexSet alloc] init];
+        [columnIndexSet addIndex:0];
+        [tableView reloadDataForRowIndexes:rowIndexSet columnIndexes:columnIndexSet];
+    }
+    _lastSelectRow = selectRow;
+    
+    NSDictionary *dict = [self freetextStyles][selectRow];
+    NSString *fontName = dict[@"Font Name"];
+    CGFloat fontSize = [dict[@"Font Size"] floatValue];
+    NSString *fontWeight = dict[@"Font Weight"];
+    NSColor *fontColor = [self colorForData:dict[@"Font Color"]];
+    NSString *fontAlignment = dict[@"Font Alignment"];
+    
+    for (PDFAnnotation *tAnnotation in self.annotations) {
+        NSFontDescriptor *attributeFontDescriptor = [NSFontDescriptor fontDescriptorWithFontAttributes:@{NSFontFamilyAttribute:fontName,NSFontFaceAttribute:fontWeight}];
+        NSFont *font = [NSFont fontWithDescriptor:attributeFontDescriptor size:fontSize];
+        if (font) {
+            tAnnotation.font = font;
+        }
+        if (fontColor) {
+            tAnnotation.fontColor = fontColor;
+        }
+        
+        if ([fontAlignment isEqualToString:@"NSTextAlignmentLeft"]) {
+            tAnnotation.alignment = NSTextAlignmentLeft;
+        } else if ([fontAlignment isEqualToString:@"NSTextAlignmentCenter"]) {
+            tAnnotation.alignment = NSTextAlignmentCenter;
+        } else if ([fontAlignment isEqualToString:@"NSTextAlignmentRight"]) {
+            tAnnotation.alignment = NSTextAlignmentRight;
+        } else if ([fontAlignment isEqualToString:@"NSTextAlignmentJustified"]) {
+            tAnnotation.alignment = NSTextAlignmentJustified;
+        }
+    }
+}
+
+- (NSTableRowView *)tableView:(NSTableView *)tableView rowViewForRow:(NSInteger)row {
+    KMScstyleTableRowView *rowView = [[KMScstyleTableRowView alloc] init];
+    return rowView;
+}
+
+@end

+ 218 - 0
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/View/KMFreeTextStylesViewController/KMFreeTextStylesViewController.xib

@@ -0,0 +1,218 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+    <dependencies>
+        <deployment identifier="macosx"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <customObject id="-2" userLabel="File's Owner" customClass="KMFreeTextStylesViewController">
+            <connections>
+                <outlet property="defaultStylesLabel" destination="Gzb-9T-0tE" id="Gmc-hB-Zzh"/>
+                <outlet property="scstyleTableView" destination="Z7J-YB-AAs" id="THM-R9-2TJ"/>
+                <outlet property="styleAddButton" destination="k3S-hD-FHn" id="2j8-lO-MhV"/>
+                <outlet property="styleMoreButton" destination="13Z-Zn-F1p" id="CPL-5g-fyk"/>
+                <outlet property="styleScrollView" destination="7y1-Xw-f9S" id="y6W-oa-LAL"/>
+                <outlet property="view" destination="Hz6-mo-xeY" id="0bl-1N-x8E"/>
+            </connections>
+        </customObject>
+        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
+        <customView misplaced="YES" id="Hz6-mo-xeY">
+            <rect key="frame" x="0.0" y="0.0" width="280" height="350"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+            <subviews>
+                <customView translatesAutoresizingMaskIntoConstraints="NO" id="oKi-FG-j4C">
+                    <rect key="frame" x="0.0" y="236" width="280" height="30"/>
+                    <subviews>
+                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Gzb-9T-0tE">
+                            <rect key="frame" x="121" y="8" width="39" height="15"/>
+                            <textFieldCell key="cell" lineBreakMode="clipping" alignment="center" title="Label" id="V6W-Qz-DGI">
+                                <font key="font" metaFont="cellTitle"/>
+                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                            </textFieldCell>
+                        </textField>
+                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="k3S-hD-FHn">
+                            <rect key="frame" x="232" y="7" width="16" height="16"/>
+                            <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="KMImageNameUXIconBtnAddNor" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="ltt-nH-5Da">
+                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                <font key="font" metaFont="system"/>
+                            </buttonCell>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="16" id="ryH-wu-HIA"/>
+                                <constraint firstAttribute="width" constant="16" id="xXX-Rj-Ur3"/>
+                            </constraints>
+                            <connections>
+                                <action selector="styleAddButtonAction:" target="-2" id="7Le-QW-AWT"/>
+                            </connections>
+                        </button>
+                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="13Z-Zn-F1p">
+                            <rect key="frame" x="256" y="7" width="16" height="16"/>
+                            <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="KMImageNameUXIconBtnSidebarMoreSecondary" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="4e5-xG-0os">
+                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                <font key="font" metaFont="system"/>
+                            </buttonCell>
+                            <constraints>
+                                <constraint firstAttribute="width" constant="16" id="At0-OD-C3r"/>
+                                <constraint firstAttribute="height" constant="16" id="n8c-lz-3tg"/>
+                            </constraints>
+                            <connections>
+                                <action selector="styleMoreButtonAction:" target="-2" id="Ehx-EB-NAR"/>
+                            </connections>
+                        </button>
+                        <box verticalHuggingPriority="750" boxType="separator" translatesAutoresizingMaskIntoConstraints="NO" id="eSd-Jr-1St">
+                            <rect key="frame" x="12" y="-2" width="256" height="5"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="1" id="l9W-d2-K3y"/>
+                            </constraints>
+                        </box>
+                    </subviews>
+                    <constraints>
+                        <constraint firstItem="13Z-Zn-F1p" firstAttribute="centerY" secondItem="k3S-hD-FHn" secondAttribute="centerY" id="01U-VO-f5a"/>
+                        <constraint firstItem="Gzb-9T-0tE" firstAttribute="centerY" secondItem="oKi-FG-j4C" secondAttribute="centerY" id="HxR-o0-ZiH"/>
+                        <constraint firstItem="13Z-Zn-F1p" firstAttribute="centerY" secondItem="oKi-FG-j4C" secondAttribute="centerY" id="JwJ-qT-HBo"/>
+                        <constraint firstAttribute="bottom" secondItem="eSd-Jr-1St" secondAttribute="bottom" id="SJy-pf-AUT"/>
+                        <constraint firstItem="13Z-Zn-F1p" firstAttribute="leading" secondItem="k3S-hD-FHn" secondAttribute="trailing" constant="8" id="VPx-m3-5v6"/>
+                        <constraint firstAttribute="trailing" secondItem="13Z-Zn-F1p" secondAttribute="trailing" constant="8" id="hhi-Va-RnO"/>
+                        <constraint firstAttribute="height" constant="30" id="kCJ-zE-5Im"/>
+                        <constraint firstItem="Gzb-9T-0tE" firstAttribute="centerX" secondItem="oKi-FG-j4C" secondAttribute="centerX" id="mQl-Oc-r0G"/>
+                        <constraint firstAttribute="trailing" secondItem="eSd-Jr-1St" secondAttribute="trailing" constant="12" id="tqk-eU-RRn"/>
+                        <constraint firstItem="eSd-Jr-1St" firstAttribute="leading" secondItem="oKi-FG-j4C" secondAttribute="leading" constant="12" id="ycp-eC-o09"/>
+                    </constraints>
+                </customView>
+                <scrollView borderType="none" autohidesScrollers="YES" horizontalLineScroll="77" horizontalPageScroll="10" verticalLineScroll="77" verticalPageScroll="10" hasHorizontalScroller="NO" hasVerticalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7y1-Xw-f9S">
+                    <rect key="frame" x="0.0" y="0.0" width="280" height="236"/>
+                    <clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="60s-CE-t8g">
+                        <rect key="frame" x="0.0" y="0.0" width="280" height="236"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnSelection="YES" multipleSelection="NO" autosaveColumns="NO" rowHeight="75" rowSizeStyle="automatic" viewBased="YES" id="Z7J-YB-AAs">
+                                <rect key="frame" x="0.0" y="0.0" width="280" height="236"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                <size key="intercellSpacing" width="3" height="2"/>
+                                <color key="backgroundColor" white="1" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
+                                <tableColumns>
+                                    <tableColumn width="248" minWidth="40" maxWidth="1000" id="g77-Mp-maO">
+                                        <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border">
+                                            <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
+                                            <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
+                                        </tableHeaderCell>
+                                        <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" title="Text Cell" id="ah1-fv-9UC">
+                                            <font key="font" metaFont="system"/>
+                                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                                            <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                        </textFieldCell>
+                                        <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
+                                        <prototypeCellViews>
+                                            <tableCellView id="V0s-yA-xvK" customClass="KMFreeTextStyleTableViewCell">
+                                                <rect key="frame" x="11" y="1" width="257" height="75"/>
+                                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                                <subviews>
+                                                    <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="aLR-Ih-hWR">
+                                                        <rect key="frame" x="16" y="32" width="12" height="12"/>
+                                                        <constraints>
+                                                            <constraint firstAttribute="height" constant="12" id="IbQ-oP-04G"/>
+                                                            <constraint firstAttribute="width" constant="12" id="Zo8-Kk-h7o"/>
+                                                        </constraints>
+                                                        <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="OXu-8s-2tx"/>
+                                                    </imageView>
+                                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Qhl-y5-raD">
+                                                        <rect key="frame" x="34" y="30" width="37" height="16"/>
+                                                        <constraints>
+                                                            <constraint firstAttribute="height" constant="16" id="2PZ-nq-Zuf"/>
+                                                        </constraints>
+                                                        <textFieldCell key="cell" lineBreakMode="truncatingTail" truncatesLastVisibleLine="YES" title="Label" id="uyo-Vx-wIU">
+                                                            <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>
+                                                    <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="IEp-Vd-zdP">
+                                                        <rect key="frame" x="233" y="0.0" width="16" height="75"/>
+                                                        <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="KMImageNameUXIconBtnArrowRight" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="8gv-dG-17v">
+                                                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                                            <font key="font" metaFont="system"/>
+                                                        </buttonCell>
+                                                        <constraints>
+                                                            <constraint firstAttribute="width" constant="16" id="CJm-1M-RzL"/>
+                                                            <constraint firstAttribute="height" constant="75" id="xrA-mG-p9T"/>
+                                                        </constraints>
+                                                        <connections>
+                                                            <action selector="moreButtonAction:" target="V0s-yA-xvK" id="a1w-NU-Ns3"/>
+                                                        </connections>
+                                                    </button>
+                                                    <button hidden="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="oWq-Xq-NnS">
+                                                        <rect key="frame" x="213" y="30" width="16" height="16"/>
+                                                        <buttonCell key="cell" type="square" title="􀅈" bezelStyle="shadowlessSquare" alignment="center" imageScaling="proportionallyDown" inset="2" id="aax-vk-qBo">
+                                                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                                            <font key="font" metaFont="system"/>
+                                                        </buttonCell>
+                                                        <constraints>
+                                                            <constraint firstAttribute="height" constant="16" id="kMC-12-jI3"/>
+                                                            <constraint firstAttribute="width" constant="16" id="lGn-Lf-Rbg"/>
+                                                        </constraints>
+                                                        <connections>
+                                                            <action selector="updateButtonAction:" target="-1" id="1i1-6N-jwn"/>
+                                                        </connections>
+                                                    </button>
+                                                </subviews>
+                                                <constraints>
+                                                    <constraint firstItem="Qhl-y5-raD" firstAttribute="centerY" secondItem="V0s-yA-xvK" secondAttribute="centerY" id="4pK-IB-vBf"/>
+                                                    <constraint firstItem="Qhl-y5-raD" firstAttribute="centerY" secondItem="aLR-Ih-hWR" secondAttribute="centerY" id="7Ir-u1-hao"/>
+                                                    <constraint firstItem="Qhl-y5-raD" firstAttribute="leading" secondItem="aLR-Ih-hWR" secondAttribute="trailing" constant="8" id="Deo-JU-p01"/>
+                                                    <constraint firstItem="aLR-Ih-hWR" firstAttribute="leading" secondItem="V0s-yA-xvK" secondAttribute="leading" constant="16" id="L9h-Fh-zpe"/>
+                                                    <constraint firstItem="IEp-Vd-zdP" firstAttribute="centerY" secondItem="V0s-yA-xvK" secondAttribute="centerY" id="SDB-bs-pwu"/>
+                                                    <constraint firstItem="oWq-Xq-NnS" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="Qhl-y5-raD" secondAttribute="trailing" constant="8" id="T7e-D5-eej"/>
+                                                    <constraint firstItem="IEp-Vd-zdP" firstAttribute="centerY" secondItem="oWq-Xq-NnS" secondAttribute="centerY" id="pjW-5R-LRw"/>
+                                                    <constraint firstItem="IEp-Vd-zdP" firstAttribute="leading" secondItem="oWq-Xq-NnS" secondAttribute="trailing" constant="4" id="rzb-mG-mn1"/>
+                                                    <constraint firstAttribute="trailing" secondItem="IEp-Vd-zdP" secondAttribute="trailing" constant="8" id="vCp-7e-MRO"/>
+                                                </constraints>
+                                                <connections>
+                                                    <outlet property="checkImageView" destination="aLR-Ih-hWR" id="lF9-xZ-EdI"/>
+                                                    <outlet property="moreButton" destination="IEp-Vd-zdP" id="Uz7-h5-sL3"/>
+                                                    <outlet property="styleLabel" destination="Qhl-y5-raD" id="7sJ-x9-HGp"/>
+                                                    <outlet property="styleLabelHeightConstant" destination="2PZ-nq-Zuf" id="WBt-jw-8Pa"/>
+                                                    <outlet property="updateButton" destination="oWq-Xq-NnS" id="c6M-As-848"/>
+                                                </connections>
+                                            </tableCellView>
+                                        </prototypeCellViews>
+                                    </tableColumn>
+                                </tableColumns>
+                                <connections>
+                                    <outlet property="dataSource" destination="-2" id="VsW-ZF-DsS"/>
+                                    <outlet property="delegate" destination="-2" id="pK8-Ci-u3S"/>
+                                </connections>
+                            </tableView>
+                        </subviews>
+                        <color key="backgroundColor" white="1" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    </clipView>
+                    <scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="ynv-cX-WoY">
+                        <rect key="frame" x="-100" y="-100" width="238" height="16"/>
+                        <autoresizingMask key="autoresizingMask"/>
+                    </scroller>
+                    <scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="Duu-lp-Acy">
+                        <rect key="frame" x="-100" y="-100" width="15" height="102"/>
+                        <autoresizingMask key="autoresizingMask"/>
+                    </scroller>
+                </scrollView>
+            </subviews>
+            <constraints>
+                <constraint firstItem="7y1-Xw-f9S" firstAttribute="top" secondItem="oKi-FG-j4C" secondAttribute="bottom" id="1de-mf-urb"/>
+                <constraint firstAttribute="trailing" secondItem="oKi-FG-j4C" secondAttribute="trailing" id="CWq-WD-pMz"/>
+                <constraint firstAttribute="bottom" secondItem="7y1-Xw-f9S" secondAttribute="bottom" id="D5j-5t-puu"/>
+                <constraint firstItem="7y1-Xw-f9S" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" id="GhX-vN-Xak"/>
+                <constraint firstAttribute="trailing" secondItem="7y1-Xw-f9S" secondAttribute="trailing" id="GrU-6h-3Tp"/>
+                <constraint firstItem="oKi-FG-j4C" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" id="Oid-bB-xfe"/>
+                <constraint firstItem="oKi-FG-j4C" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" id="e96-SO-RzR"/>
+            </constraints>
+            <point key="canvasLocation" x="139" y="173.5"/>
+        </customView>
+    </objects>
+    <resources>
+        <image name="KMImageNameUXIconBtnAddNor" width="16" height="16"/>
+        <image name="KMImageNameUXIconBtnArrowRight" width="17" height="16"/>
+        <image name="KMImageNameUXIconBtnSidebarMoreSecondary" width="16" height="16"/>
+    </resources>
+</document>

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

@@ -566,7 +566,7 @@ let KMPDFDynamicStampNeedAuthorKey1 = "km_pdfview_dynamic_stamp_need_author"
         dynamicStampNeedsAuthor = !isNeedAuthor
         selectButton.state = dynamicStampNeedsAuthor ? .on : .off
         
-        let author = KMPreference.shared.author
+        let author = KMDataManager.ud_string(forKey: KMUserNameKey) ?? KMPreference.shared.author
         
         if dynamicStampNeedsAuthor {
             authorTextField.isEditable = true

+ 6 - 6
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/StampList/KMAnnotationStampViewController.xib

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22155" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22155"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -232,7 +232,7 @@
                     <rect key="frame" x="0.0" y="60" width="234" height="507"/>
                     <clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="QFb-tg-EJh">
                         <rect key="frame" x="0.0" y="0.0" width="234" height="507"/>
-                        <autoresizingMask key="autoresizingMask"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" tableStyle="fullWidth" columnSelection="YES" multipleSelection="NO" autosaveColumns="NO" rowHeight="64" viewBased="YES" id="bps-jM-pPg">
                                 <rect key="frame" x="0.0" y="0.0" width="234" height="507"/>
@@ -269,7 +269,7 @@
                                                     </button>
                                                     <button translatesAutoresizingMaskIntoConstraints="NO" id="eTj-uO-pMw">
                                                         <rect key="frame" x="42" y="5" width="150" height="53"/>
-                                                        <buttonCell key="cell" type="bevel" title="Button" bezelStyle="rounded" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="PUm-n8-CM1">
+                                                        <buttonCell key="cell" type="bevel" bezelStyle="regularSquare" imagePosition="only" alignment="center" lineBreakMode="truncatingMiddle" imageScaling="proportionallyUpOrDown" inset="2" id="PUm-n8-CM1">
                                                             <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                                             <font key="font" metaFont="system"/>
                                                         </buttonCell>
@@ -503,7 +503,7 @@
             <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES"/>
             <clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="NDK-ok-tvh">
                 <rect key="frame" x="1" y="1" width="260" height="597"/>
-                <autoresizingMask key="autoresizingMask"/>
+                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                 <subviews>
                     <view id="Aj7-0M-710">
                         <rect key="frame" x="0.0" y="0.0" width="245" height="582"/>
@@ -631,7 +631,7 @@
                                             <rect key="frame" x="0.0" y="176" width="213" height="110"/>
                                             <clipView key="contentView" drawsBackground="NO" id="wcx-5m-Dzd">
                                                 <rect key="frame" x="0.0" y="0.0" width="213" height="110"/>
-                                                <autoresizingMask key="autoresizingMask"/>
+                                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                                 <subviews>
                                                     <textView importsGraphics="NO" verticallyResizable="YES" usesFontPanel="YES" findStyle="panel" continuousSpellChecking="YES" allowsUndo="YES" usesRuler="YES" allowsNonContiguousLayout="YES" quoteSubstitution="YES" dashSubstitution="YES" spellingCorrection="YES" smartInsertDelete="YES" id="lq6-MU-1hZ">
                                                         <rect key="frame" x="0.0" y="0.0" width="213" height="110"/>

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

@@ -227,6 +227,36 @@ let CPDFDynamicStampNeedAuthorKey1 = "km_pdfview_dynamic_stamp_need_author"
         return dynamic
     }
     
+    func getNameAndDateString() -> String {
+        
+        let dateStyleIndicate = UserDefaults.standard.string(forKey: CPDFDynamicStampDateStyleKey1)
+        var dateFormatterString = ""
+        
+        if dateStyleIndicate?.isEmpty ?? true {
+            dateFormatterString = dateStyleArray().last ?? ""
+        } else {
+            if let index = dateStyleArray().firstIndex(of: dateStyleIndicate!) {
+                dateFormatterString = dateStyleIndicate!
+            }
+        }
+        
+        var dateString = setDynamicStampDateStringWithDateStyle(dateFormatterString)
+        
+        let dynamicArray = ["REVISED", "REVIEWED", "RECEIVED", "APPROVED", "Michael"]
+        var author = KMDataManager.ud_string(forKey: KMUserNameKey) ?? ""
+        
+        // Retrieve need author flag from UserDefaults
+        let isNeedAuthor = UserDefaults.standard.bool(forKey: CPDFDynamicStampNeedAuthorKey1)
+        
+        if !isNeedAuthor {
+            author = author.isEmpty ? NSFullUserName() : author
+            dateString = "By \(author) at \(dateString)"
+        }else{
+            dateString = ""
+        }
+        return dateString
+    }
+    
     func dynamicStamps() -> [CStampObject] {
         var dynamicStampArray: [CStampObject] = []
         

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

@@ -4296,23 +4296,38 @@ extension KMMainViewController : KMMainToolbarControllerDelegate {
                             
                             KMBaseWindowController.checkPassword(url: self.document!.documentURL!, type: .owner) { [unowned self] success, resultPassword in
                                 if success {
-                                    /// 删除安全性设置
-                                    if (!self.listView.document!.allowsCopying || !self.listView.document!.allowsPrinting) {
-                                        self.isSaveKeyChain = false
-                                        self.listView.document.unlock(withPassword: password)
-                                        self.hiddenSecureLimitTip()
-                                        self.recordRemoveSecureFlag()
+                                    
+                                    let savePanelAccessoryViewController = KMSavePanelAccessoryController()
+                                    let savePanel = NSSavePanel()
+                                    savePanel.nameFieldStringValue = self.listView.document.documentURL.deletingPathExtension().lastPathComponent
+                                    savePanel.allowedFileTypes = ["pdf"]
+                                    savePanel.accessoryView = savePanelAccessoryViewController.view
+
+                                    savePanel.beginSheetModal(for: NSApp.mainWindow!) {[unowned self] result in
+                                        guard result == .OK else { return }
                                         
-                                        let tip = KMRemovePasswordResultTipView()
-                                        tip.result = .success
-                                        tip.showInView(superView: (self.listView.superview)!)
-                                    } else {
-                                        self.recordRemoveSecureFlag()
-                                        let tip = KMRemovePasswordResultTipView()
-                                        tip.result = .success
-                                        self.hiddenSecureLimitTip()
+                                        /// 删除安全性设置
+                                        if (!self.listView.document!.allowsCopying || !self.listView.document!.allowsPrinting) {
+                                            self.isSaveKeyChain = false
+                                            self.listView.document.unlock(withPassword: resultPassword)
+                                        }
                                         
-                                        tip.showInView(superView: self.listView.superview!)
+                                        let document = CPDFDocument.init(url: self.listView.document.documentURL)
+                                        guard let document = document else { return }
+                                        
+                                        document.unlock(withPassword: resultPassword)
+                                        let success = document.writeDecrypt(to: savePanel.url)
+                                        if success {
+                                            self.hiddenSecureLimitTip()
+                                            let tip = KMRemovePasswordResultTipView()
+                                            tip.result = .success
+                                            tip.showInView(superView: (self.listView.superview)!)
+                                        } else {
+                                            self.hiddenSecureLimitTip()
+                                            let tip = KMRemovePasswordResultTipView()
+                                            tip.result = .failure
+                                            tip.showInView(superView: (self.listView.superview)!)
+                                        }
                                     }
                                 }
                             }

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

@@ -104,6 +104,8 @@
 #import "SKBookmarkSheetController.h"
 #import "SKBookmarkController.h"
 #import "SKBookmark.h"
+//文字
+#import "KMFreeTextStylesViewController.h"
 
 #import "AutoSavePopController.h"
 #import "SKFileUpdateChecker.h"

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

@@ -100,6 +100,8 @@
 #import "SKBookmarkSheetController.h"
 #import "SKBookmarkController.h"
 #import "SKBookmark.h"
+//文字
+#import "KMFreeTextStylesViewController.h"
 
 #import "AutoSavePopController.h"
 #import "SKFileUpdateChecker.h"

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

@@ -100,6 +100,8 @@
 #import "SKBookmarkSheetController.h"
 #import "SKBookmarkController.h"
 #import "SKBookmark.h"
+//文字
+#import "KMFreeTextStylesViewController.h"
 
 #import "AutoSavePopController.h"
 #import "SKFileUpdateChecker.h"

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

@@ -2134,6 +2134,12 @@
 		ADD272D429B9CFE20032B5D6 /* KMLightNoNetworkView.xib in Resources */ = {isa = PBXBuildFile; fileRef = ADD272D329B9CFE20032B5D6 /* KMLightNoNetworkView.xib */; };
 		ADD272D529B9CFE20032B5D6 /* KMLightNoNetworkView.xib in Resources */ = {isa = PBXBuildFile; fileRef = ADD272D329B9CFE20032B5D6 /* KMLightNoNetworkView.xib */; };
 		ADD272D629B9CFE20032B5D6 /* KMLightNoNetworkView.xib in Resources */ = {isa = PBXBuildFile; fileRef = ADD272D329B9CFE20032B5D6 /* KMLightNoNetworkView.xib */; };
+		ADD56F572BB3F48300E87ED9 /* KMFreeTextStylesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = ADD56F542BB3F48200E87ED9 /* KMFreeTextStylesViewController.m */; };
+		ADD56F582BB3F48300E87ED9 /* KMFreeTextStylesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = ADD56F542BB3F48200E87ED9 /* KMFreeTextStylesViewController.m */; };
+		ADD56F592BB3F48300E87ED9 /* KMFreeTextStylesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = ADD56F542BB3F48200E87ED9 /* KMFreeTextStylesViewController.m */; };
+		ADD56F5A2BB3F48300E87ED9 /* KMFreeTextStylesViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = ADD56F552BB3F48200E87ED9 /* KMFreeTextStylesViewController.xib */; };
+		ADD56F5B2BB3F48300E87ED9 /* KMFreeTextStylesViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = ADD56F552BB3F48200E87ED9 /* KMFreeTextStylesViewController.xib */; };
+		ADD56F5C2BB3F48300E87ED9 /* KMFreeTextStylesViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = ADD56F552BB3F48200E87ED9 /* KMFreeTextStylesViewController.xib */; };
 		ADD5AE552A64D31200C14249 /* KMPurchaseAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADD5AE542A64D31200C14249 /* KMPurchaseAlertView.swift */; };
 		ADD5AE562A64D31200C14249 /* KMPurchaseAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADD5AE542A64D31200C14249 /* KMPurchaseAlertView.swift */; };
 		ADD5AE572A64D31200C14249 /* KMPurchaseAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADD5AE542A64D31200C14249 /* KMPurchaseAlertView.swift */; };
@@ -6006,6 +6012,9 @@
 		ADD1B70929471FA500C3FFF7 /* KMPrintChoosePresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMPrintChoosePresenter.swift; sourceTree = "<group>"; };
 		ADD272CF29B9CFD30032B5D6 /* KMLightNoNetworkView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMLightNoNetworkView.swift; sourceTree = "<group>"; };
 		ADD272D329B9CFE20032B5D6 /* KMLightNoNetworkView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMLightNoNetworkView.xib; sourceTree = "<group>"; };
+		ADD56F542BB3F48200E87ED9 /* KMFreeTextStylesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KMFreeTextStylesViewController.m; sourceTree = "<group>"; };
+		ADD56F552BB3F48200E87ED9 /* KMFreeTextStylesViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KMFreeTextStylesViewController.xib; sourceTree = "<group>"; };
+		ADD56F562BB3F48200E87ED9 /* KMFreeTextStylesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KMFreeTextStylesViewController.h; sourceTree = "<group>"; };
 		ADD5AE542A64D31200C14249 /* KMPurchaseAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMPurchaseAlertView.swift; sourceTree = "<group>"; };
 		ADD5AE582A64DD2600C14249 /* KMPurchaseAlertView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMPurchaseAlertView.xib; sourceTree = "<group>"; };
 		ADDDCE1B2B43A32A005B4AB5 /* AppSandboxFileAccess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppSandboxFileAccess.h; sourceTree = "<group>"; };
@@ -7729,6 +7738,7 @@
 		89E4E6F82963D341002DBA6F /* View */ = {
 			isa = PBXGroup;
 			children = (
+				ADD56F532BB3F48200E87ED9 /* KMFreeTextStylesViewController */,
 				ADDEEA712AD3EFE200EF675D /* KMButton.swift */,
 				BBA922212B4E7D340061057A /* HyperLinkButton.swift */,
 				ADDEEA792AD3F4C800EF675D /* KMPopUpButton.swift */,
@@ -9926,6 +9936,16 @@
 			path = TextField;
 			sourceTree = "<group>";
 		};
+		ADD56F532BB3F48200E87ED9 /* KMFreeTextStylesViewController */ = {
+			isa = PBXGroup;
+			children = (
+				ADD56F562BB3F48200E87ED9 /* KMFreeTextStylesViewController.h */,
+				ADD56F542BB3F48200E87ED9 /* KMFreeTextStylesViewController.m */,
+				ADD56F552BB3F48200E87ED9 /* KMFreeTextStylesViewController.xib */,
+			);
+			path = KMFreeTextStylesViewController;
+			sourceTree = "<group>";
+		};
 		ADD5AE532A64D29600C14249 /* Alert */ = {
 			isa = PBXGroup;
 			children = (
@@ -14017,6 +14037,7 @@
 				ADDF83472B391A5C00A81A4E /* DSignatureCreateInfoViewController.xib in Resources */,
 				AD7D5C982B8F20FE006562CD /* synctex_parser_readme.txt in Resources */,
 				AD0FA4FE29A8DD8700EDEB50 /* KMRegisterSuccessView.xib in Resources */,
+				ADD56F5A2BB3F48300E87ED9 /* KMFreeTextStylesViewController.xib in Resources */,
 				9F0CB49229683DEE00007028 /* KMPropertiesPanelLineSubVC.xib in Resources */,
 				BBE9D09B2AF0CEEB002E83CE /* KMBatchOperateCompressViewController.xib in Resources */,
 				BB88108E2B4F7C4100AFA63E /* KMVerificationExpiredViewController.xib in Resources */,
@@ -14405,6 +14426,7 @@
 				9F8539FA2947137500DF644E /* newtab_p.pdf in Resources */,
 				BB853C962AF8DCC7009C20C1 /* KMBatchOperateRemovePasswordViewController.xib in Resources */,
 				BB1B0AE42B4FC6E900889528 /* KMOpenFileGuideToolbar.xib in Resources */,
+				ADD56F5B2BB3F48300E87ED9 /* KMFreeTextStylesViewController.xib in Resources */,
 				9F5752ED2B58FF73005DC303 /* KMAnnotationFromViewController.xib in Resources */,
 				BB04FD112B206F4000D80F7B /* KMPlanViewController.xib in Resources */,
 				BBB376AB2B10A7FD009539CC /* a_3a.png in Resources */,
@@ -14913,6 +14935,7 @@
 				BBAFC8412985194800D0648E /* KMPDFEditAppendWindow.xib in Resources */,
 				BBA19F3829ADACC5001A285A /* signPicture_nor.pdf in Resources */,
 				9FBA0EE628FEC253001117AF /* KMProductPromotionViewController.xib in Resources */,
+				ADD56F5C2BB3F48300E87ED9 /* KMFreeTextStylesViewController.xib in Resources */,
 				89E9B3FB295BE2EC00AEFA61 /* KMEditPDFTextPropertyViewController.xib in Resources */,
 				ADFCEB662B4FBFC50001EBAF /* ad_cancel_button00@2x.png in Resources */,
 				9F02018B2A1DA28B00C9B673 /* KMAILanguagePopVC.xib in Resources */,
@@ -15461,6 +15484,7 @@
 				F3599222292CA27B000D25DE /* CPDFListViewRuntime.m in Sources */,
 				BB1331542AD7A6A1008F6791 /* KMFileAttribute.swift in Sources */,
 				BB0A55182A3074F400B6E84B /* KMHoverView.swift in Sources */,
+				ADD56F572BB3F48300E87ED9 /* KMFreeTextStylesViewController.m in Sources */,
 				9F53D54F2AD677A000CCF9D8 /* CPDFListViewConfig.swift in Sources */,
 				AD7D5CB32B9070AF006562CD /* KMSyncDot.swift in Sources */,
 				BB2A98522B270B3300647AF3 /* KMBatchAddBackgroundOperation.swift in Sources */,
@@ -17494,6 +17518,7 @@
 				9F0CB4DE2986554D00007028 /* KMDesignToken+HorizontalPadding.swift in Sources */,
 				BBBAED112B57E76400266BD3 /* NSGraphics_SKExtensions.m in Sources */,
 				9F1FE49A29406E4700E952CA /* NewTabButton.m in Sources */,
+				ADD56F582BB3F48300E87ED9 /* KMFreeTextStylesViewController.m in Sources */,
 				9F512CD02B469A7700EC0BC3 /* KMPageDisplayThemeCollectionViewItem.swift in Sources */,
 				BBF2455E2AE78FF900037D08 /* KMBatchWindow.swift in Sources */,
 				BBC4F9FB2AEB9E200098A1A8 /* KMBatchTableCellView.swift in Sources */,
@@ -17801,6 +17826,7 @@
 				9F0CB4F7298655D500007028 /* KMDesignToken+Fill.swift in Sources */,
 				BB49ED1F293F4FB200C82CA2 /* KMConvertPPTsSettingView.swift in Sources */,
 				BB14703D299DC0D200784A6A /* OIDErrorUtilities.m in Sources */,
+				ADD56F592BB3F48300E87ED9 /* KMFreeTextStylesViewController.m in Sources */,
 				BBFE6E772930E53000142C01 /* KMMergePopoverViewController.swift in Sources */,
 				ADF6B8782A48155E0090CB78 /* KMComparativeViewCollectionItem.swift in Sources */,
 				BB65A07A2AF8E2F2003A27A0 /* KMSyncPreferences.swift in Sources */,

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 2184 - 969
PDF Office/PDF Reader Pro.xcodeproj/xcuserdata/lizhe.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist