Browse Source

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

niehaoyu 10 tháng trước cách đây
mục cha
commit
d189bc6faf
18 tập tin đã thay đổi với 546 bổ sung96 xóa
  1. 3 3
      PDF Office/PDF Master/Class/PDFTools/AddPassword/New/View/KMSecurityView.swift
  2. 56 0
      PDF Office/PDF Master/Class/PDFTools/Compare/KMCompareWindowController.swift
  3. 4 3
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+UndoManager.m
  4. 94 35
      PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/ViewController/FormProperties/KMAnnotationChoiceWidgetAppearanceViewController.swift
  5. 84 46
      PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/ViewController/FormProperties/KMAnnotationFromViewController.swift
  6. 10 9
      PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift
  7. 3 0
      PDF Office/PDF Master/Class/README.md
  8. 28 0
      PDF Office/PDF Master/Strings/de.lproj/Localizable.strings
  9. 24 0
      PDF Office/PDF Master/Strings/en.lproj/Localizable.strings
  10. 26 0
      PDF Office/PDF Master/Strings/es.lproj/Localizable.strings
  11. 28 0
      PDF Office/PDF Master/Strings/fr.lproj/Localizable.strings
  12. 26 0
      PDF Office/PDF Master/Strings/it.lproj/Localizable.strings
  13. 26 0
      PDF Office/PDF Master/Strings/ja.lproj/Localizable.strings
  14. 28 0
      PDF Office/PDF Master/Strings/nl.lproj/Localizable.strings
  15. 26 0
      PDF Office/PDF Master/Strings/pl.lproj/Localizable.strings
  16. 26 0
      PDF Office/PDF Master/Strings/ru.lproj/Localizable.strings
  17. 26 0
      PDF Office/PDF Master/Strings/zh-Hans.lproj/Localizable.strings
  18. 28 0
      PDF Office/PDF Master/Strings/zh-Hant.lproj/Localizable.strings

+ 3 - 3
PDF Office/PDF Master/Class/PDFTools/AddPassword/New/View/KMSecurityView.swift

@@ -135,9 +135,9 @@ extension KMSecurityView {
         self.model.openPassword = openPassword.stringValue
         self.model.ownerPassword = ownerPassword.stringValue
         self.model.title = titleTextField.stringValue
-        self.model.author = authorLabel.stringValue
-        self.model.subject = subjectLabel.stringValue
-        self.model.keywords = keywordLabel.stringValue
+        self.model.author = authorTextField.stringValue
+        self.model.subject = subjectTextField.stringValue
+        self.model.keywords = keywordTextField.stringValue
         self.reloadData()
     }
     

+ 56 - 0
PDF Office/PDF Master/Class/PDFTools/Compare/KMCompareWindowController.swift

@@ -15,6 +15,8 @@ class KMCompareWindowController: KMBaseWindowController {
     @IBOutlet weak var compareView: KMCompareView!
     
     var pdfCompareContent: CPDFCompareContent?
+    var maskView: KMBookletMaskView?
+    var progressController: SKProgressController?
     
     var filePath: String = "" {
         didSet {
@@ -60,12 +62,14 @@ class KMCompareWindowController: KMBaseWindowController {
     
     func compareAction(config: KMCompareFilesConfig) {
         compareView.doneButton.isEnabled = false
+        self.showWaitting()
 
         guard let pdfOldDocument = config.fileOldAttribute.pdfDocument, let pdfNewDocument = config.fileNewAttribute.pdfDocument else {
             let alert = NSAlert()
             alert.alertStyle = .critical
             alert.messageText = NSLocalizedString("Please select two files to compare", comment: "")
             alert.runModal()
+            self.hideWaitting()
             return
         }
 
@@ -78,6 +82,7 @@ class KMCompareWindowController: KMBaseWindowController {
             alert.alertStyle = .critical
             alert.messageText = NSLocalizedString("The file has been deleted, please reselect a file.", comment: "")
             alert.runModal()
+            self.hideWaitting()
             return
         }
 
@@ -92,6 +97,8 @@ class KMCompareWindowController: KMBaseWindowController {
             config.fileNewAttribute.pagesType = .all
             
             compareView.reloadData()
+            
+            self.hideWaitting()
             return
         }
 
@@ -105,6 +112,8 @@ class KMCompareWindowController: KMBaseWindowController {
             config.fileOldAttribute.pagesType = .all
 
             compareView.reloadData()
+            
+            self.hideWaitting()
             return
         }
 
@@ -136,17 +145,25 @@ class KMCompareWindowController: KMBaseWindowController {
                 pdfCompareOverlay?.setBlendMod(config.blendMod())
 
                 if (pdfCompareOverlay?.compare() == true) {
+                    DispatchQueue.main.async {
+                        self.progressController?.doubleValue = 30.0
+                    }
+                    
                     guard let document = pdfCompareOverlay?.comparisonDocument() else {
                         DispatchQueue.main.async {
                             let alert = NSAlert()
                             alert.alertStyle = .critical
                             alert.messageText = NSLocalizedString("Failure", comment: "")
                             alert.runModal()
+                            
+                            self.hideWaitting()
                         }
                         return
                     }
                     
+                    
                     DispatchQueue.main.async {
+                        self.hideWaitting()
                         self.coveringComplete?(self, document)
                     }
                     debugPrint("合并成功")
@@ -184,6 +201,9 @@ class KMCompareWindowController: KMBaseWindowController {
 //                if self._compareCancel {
 //                    return
 //                }
+                DispatchQueue.main.async {
+                    self.progressController?.doubleValue = 30.0
+                }
                 
                 for i in 0..<maxIndex {
                     let oldPageIndex: Int
@@ -212,6 +232,7 @@ class KMCompareWindowController: KMBaseWindowController {
                 }
                 
                 DispatchQueue.main.async {
+                    self.hideWaitting()
                     self.contentComplete?(self, pdfCompareContent!, results, oldDoc!, doc!)
                     if results.count > 0 {
                         // Handle success case
@@ -227,3 +248,38 @@ class KMCompareWindowController: KMBaseWindowController {
 
     }
 }
+
+extension KMCompareWindowController {
+    func showWaitting() {
+        if self.maskView == nil {
+            self.maskView = KMBookletMaskView(frame: CGRect(x: 0, y: 0, width: self.window?.frame.size.width ?? 0, height: self.window?.frame.size.height ?? 0))
+        }
+        self.window?.contentView?.addSubview(self.maskView!)
+        
+        let progress = SKProgressController()
+        progress.window?.backgroundColor = NSColor.km_init(hex: "#36383B")
+        progress.window?.contentView?.wantsLayer = true
+        progress.window?.contentView?.layer?.backgroundColor = NSColor.km_init(hex: "#36383B").cgColor
+        progress.progressField.textColor = NSColor.white
+        progress.message = NSLocalizedString("Translating...", comment: "")
+
+        progress.closeBlock = { [unowned self] in
+            
+        }
+        
+        self.progressController = progress
+        self.window?.beginSheet(progress.window!)
+    }
+    func hideWaitting() {
+        DispatchQueue.main.async {
+            self.progressController?.doubleValue = 99.0
+        }
+        
+        self.maskView?.removeFromSuperview()
+
+        if (self.progressController != nil) {
+            self.window?.endSheet((self.progressController?.window)!)
+            self.progressController = nil
+        }
+    }
+}

+ 4 - 3
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+UndoManager.m

@@ -36,9 +36,10 @@ static NSString *CPDFListViewAnnotationPropertiesObservationContext = @"CPDFList
     for (CPDFAnnotation *note in newNotes) {
         if (![self.notes containsObject:note]) {
             [self.notes addObject:note];
-        }
-        for (NSString *key in [note keysForValuesToObserveForUndo]) {
-            [note addObserver:self forKeyPath:key options:(NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld) context:&CPDFListViewAnnotationPropertiesObservationContext];
+            
+            for (NSString *key in [note keysForValuesToObserveForUndo]) {
+                [note addObserver:self forKeyPath:key options:(NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld) context:&CPDFListViewAnnotationPropertiesObservationContext];
+            }
         }
     }
 }

+ 94 - 35
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/ViewController/FormProperties/KMAnnotationChoiceWidgetAppearanceViewController.swift

@@ -148,8 +148,10 @@ private enum KMPDFAnnotationFontWeightType: Int {
             var family = ""
             var style = ""
             if annotations.count > 0 {
-                family = annotation?.font.fontDescriptor.object(forKey: NSFontDescriptor.AttributeName.family) as? String ?? ""
-                style = annotation?.font.fontDescriptor.object(forKey: NSFontDescriptor.AttributeName.face) as? String ?? ""
+                if annotation?.font != nil {
+                    family = annotation?.font.fontDescriptor.object(forKey: NSFontDescriptor.AttributeName.family) as? String ?? ""
+                    style = annotation?.font.fontDescriptor.object(forKey: NSFontDescriptor.AttributeName.face) as? String ?? ""
+                }
             } else {
                 var annotationFont: NSFont
                 if annotationModel.fontName() != nil {
@@ -172,8 +174,10 @@ private enum KMPDFAnnotationFontWeightType: Int {
                     menu.addItem(item)
                     
                     if annotations.count > 0 {
-                        if annotation?.font.fontName == font.fontName {
-                            selectedIndex = index
+                        if annotation?.font != nil {
+                            if annotation?.font.fontName == font.fontName {
+                                selectedIndex = index
+                            }
                         }
                     } else {
                         if annotationModel.fontName() == font.fontName {
@@ -372,38 +376,93 @@ private enum KMPDFAnnotationFontWeightType: Int {
     }
     
     @IBAction func buttonClicked_ChangeFont(_ sender: Any) {
-//        guard let weakSelf = self else { return }
+        let selectItem = self.fontPopUpButton.selectedItem
+        guard let selectItem = selectItem else { return }
+        
+        let resultAtt = NSMutableAttributedString(attributedString: selectItem.attributedTitle!)
+        let familyString = resultAtt.string
+        let styleString = self.fontStylePopUpButton.selectedItem?.title
+        let attributeFontDescriptor = NSFontDescriptor(fontAttributes: [.family: familyString, .face: styleString as Any])
+        let fontSizeString = fontSizeComboBox.stringValue.replacingOccurrences(of: " pt", with: "")
+        let newFont = NSFont(descriptor: attributeFontDescriptor, size: fontSizeString.stringToCGFloat())
+        var fontAlignment: KMFreeTextAnnotationAlignmentType = .left
+        if annotationModel.alignment() == .left {
+            fontAlignment = .left
+        } else if annotationModel.alignment() == .center {
+            fontAlignment = .center
+        } else if annotationModel.alignment() == .right {
+            fontAlignment = .right
+        }
+        let fontModel = KMFontModel(fontName: familyString, fontWeight: styleString!, fontSize: fontSizeString.stringToCGFloat(), fontColor: colorPickerView.color ?? .black, fontAlignment: fontAlignment, annotationType: annotationModel.annotationType)
+        
+        let fontWindowController = KMAnnotationFontWindowController.initWindowController(fontModel)
+        let window = fontWindowController.window
+        fontWindowController.callback = { [weak self] model in
+            self!.colorPickerView.color = model.fontColor
+            
+            DispatchQueue.global(qos: .default).async { [self]
+                let fonts = NSFontManager.shared.availableFontFamilies
+                let menu = NSMenu()
+                var selectedIndex = 0
+                
+                for (index, fontName) in fonts.enumerated() {
+                    if let font = NSFont(name: fontName, size: 12.0) {
+                        let attributedString = NSAttributedString(string: fontName, attributes: [.font: font])
+                        let item = NSMenuItem()
+                        item.attributedTitle = attributedString
+                        menu.addItem(item)
+                        
+                        if let family = font.fontDescriptor.object(forKey: NSFontDescriptor.AttributeName.family) as? String,
+                           let style = font.fontDescriptor.object(forKey: NSFontDescriptor.AttributeName.face) as? String {
+                            if model.fontName == family {
+                                selectedIndex = index
+                            }
+                        }
+                    }
+                }
+                DispatchQueue.main.async {
+                    if self != nil {
+                        self!.fontPopUpButton.menu = menu
+                        self!.fontPopUpButton.selectItem(at: selectedIndex)
+                    }
+                }
+            }
+            let selectedStyleIndex = self!.setFontStyleWithFontName(model.fontName, currentStyle: model.fontWeight)
+            self!.fontStylePopUpButton.selectItem(at: Int(selectedStyleIndex))
+            self!.fontSizeComboBox.stringValue = String(format: "%.f pt", model.fontSize)
+            
+            if self!.annotationModel.annotations != nil {
+                let attributeFontDescriptor = NSFontDescriptor(fontAttributes: [.family: model.fontName, .face: model.fontWeight])
+                let annotationFont = NSFont(descriptor: attributeFontDescriptor, size: model.fontSize)
 
-//        let fontWindowController = KMAnnotationFontWindowController.sharedAnnotationFont()
-//        guard let window = fontWindowController.window else { return }
-//
-//        fontWindowController.annotations = weakSelf.annotations
-//
-//        fontWindowController.annotationAlignCallback = { selectedCount in
-//            for tAnnotation in weakSelf.annotations {
-//                tAnnotation.removeAllAppearanceStreams()
-//
-//                switch selectedCount {
-//                case 0:
-//                    tAnnotation.alignment = .left
-//                case 2:
-//                    tAnnotation.alignment = .center
-//                case 1:
-//                    tAnnotation.alignment = .right
-//                case 3:
-//                    tAnnotation.alignment = .justified
-//                default:
-//                    break
-//                }
-//            }
-//            weakSelf.pdfview.setNeedsDisplay(true)
-//        }
-//
-//        fontWindowController.annotationCallback = { annotation in
-//            // Handle annotation callback if needed
-//        }
-//
-//        window.orderFront(sender)
+                for tAnnotation in self!.annotations {
+                    if tAnnotation is CPDFAnnotation {
+                        (tAnnotation as! CPDFButtonWidgetAnnotation).font = annotationFont
+                        (tAnnotation as! CPDFButtonWidgetAnnotation).fontColor = model.fontColor
+//                        if model.fontAlignment == .left {
+//                            (tAnnotation as! CPDFButtonWidgetAnnotation).alignment = .left
+//                        } else if model.fontAlignment == .center {
+//                            (tAnnotation as! CPDFTextWidgetAnnotation).alignment = .center
+//                        } else if model.fontAlignment == .right {
+//                            (tAnnotation as! CPDFTextWidgetAnnotation).alignment = .right
+//                        }
+                    }
+                }
+                self!.updateAnnotation()
+            } else {
+                self!.annotationModel.setFontName(model.fontName)
+                self!.annotationModel.setFontSize(model.fontSize)
+                self!.annotationModel.setFontColor(model.fontColor)
+                if model.fontAlignment == .left {
+                    self!.annotationModel.setAlignment(.left)
+                } else if model.fontAlignment == .center {
+                    self!.annotationModel.setAlignment(.center)
+                } else if model.fontAlignment == .right {
+                    self!.annotationModel.setAlignment(.right)
+                }
+            }
+        }
+        window?.orderFront(sender)
     }
 
     @IBAction func fontColorButtonAction(_ sender: NSButton) {

+ 84 - 46
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/ViewController/FormProperties/KMAnnotationFromViewController.swift

@@ -572,55 +572,93 @@ import Cocoa
     }
     
     @IBAction func buttonClicked_ChangeFont(_ sender: Any) {
-        let fontWindowController = KMAnnotationFontWindowController.sharedAnnotationFont
-        let window = fontWindowController!.window
-        if fontWindowController != nil && window != nil {
-//            fontWindowController!.annotations = annotations
-            
-//            fontWindowController!.annotationAlignCallback = { [weak self] selectedCount in
-//                guard let self = self else { return }
-//                
-//                for tAnnotation in self.annotations {
-//                    var annotationString = ""
-//                    
-//                    
-//                    if tAnnotation.buttonWidgetStateString().isEmpty {
-//                        annotationString = " "
-//                    } else {
-//                        let lastString = String(tAnnotation.buttonWidgetStateString().suffix(1))
-//                        
-//                        if lastString == " " {
-//                            annotationString = String(tAnnotation.buttonWidgetStateString().prefix(tAnnotation.buttonWidgetStateString().count - 1))
-//                        } else {
-//                            annotationString = "\(tAnnotation.buttonWidgetStateString()) "
-//                        }
-//                    }
-//                    
-//                    switch selectedCount {
-//                    case 0:
-//                        (tAnnotation as! CPDFTextWidgetAnnotation).alignment = .left
-//                    case 2:
-//                        (tAnnotation as! CPDFTextWidgetAnnotation).alignment = .center
-//                    case 1:
-//                        (tAnnotation as! CPDFTextWidgetAnnotation).alignment = .right
-//                    case 3:
-//                        (tAnnotation as! CPDFTextWidgetAnnotation).alignment = .justified
-//                    default:
-//                        break
-//                    }
-//                    
-//                    tAnnotation.setButtonWidgetStateString(annotationString)
-//                }
-//                
-//                self.updateAnnotation()
-//            }
+        let selectItem = self.fontPopUpButton.selectedItem
+        guard let selectItem = selectItem else { return }
+        
+        let resultAtt = NSMutableAttributedString(attributedString: selectItem.attributedTitle!)
+        let familyString = resultAtt.string
+        let styleString = self.fontStylePopUpButton.selectedItem?.title
+        let attributeFontDescriptor = NSFontDescriptor(fontAttributes: [.family: familyString, .face: styleString as Any])
+        let fontSizeString = fontSizeComboBox.stringValue.replacingOccurrences(of: " pt", with: "")
+        let newFont = NSFont(descriptor: attributeFontDescriptor, size: fontSizeString.stringToCGFloat())
+        var fontAlignment: KMFreeTextAnnotationAlignmentType = .left
+        if annotationModel.alignment() == .left {
+            fontAlignment = .left
+        } else if annotationModel.alignment() == .center {
+            fontAlignment = .center
+        } else if annotationModel.alignment() == .right {
+            fontAlignment = .right
+        }
+        let fontModel = KMFontModel(fontName: familyString, fontWeight: styleString!, fontSize: fontSizeString.stringToCGFloat(), fontColor: colorPickerView.color ?? .black, fontAlignment: fontAlignment, annotationType: annotationModel.annotationType)
+        
+        let fontWindowController = KMAnnotationFontWindowController.initWindowController(fontModel)
+        let window = fontWindowController.window
+        fontWindowController.callback = { [weak self] model in
+            self!.colorPickerView.color = model.fontColor
             
-//            fontWindowController.annotationCallback = {
-//                
-//            }
+            DispatchQueue.global(qos: .default).async { [self]
+                let fonts = NSFontManager.shared.availableFontFamilies
+                let menu = NSMenu()
+                var selectedIndex = 0
+                
+                for (index, fontName) in fonts.enumerated() {
+                    if let font = NSFont(name: fontName, size: 12.0) {
+                        let attributedString = NSAttributedString(string: fontName, attributes: [.font: font])
+                        let item = NSMenuItem()
+                        item.attributedTitle = attributedString
+                        menu.addItem(item)
+                        
+                        if let family = font.fontDescriptor.object(forKey: NSFontDescriptor.AttributeName.family) as? String,
+                           let style = font.fontDescriptor.object(forKey: NSFontDescriptor.AttributeName.face) as? String {
+                            if model.fontName == family {
+                                selectedIndex = index
+                            }
+                        }
+                    }
+                }
+                DispatchQueue.main.async {
+                    if self != nil {
+                        self!.fontPopUpButton.menu = menu
+                        self!.fontPopUpButton.selectItem(at: selectedIndex)
+                    }
+                }
+            }
+            let selectedStyleIndex = self!.setFontStyle(withFontName: model.fontName, currentStyle: model.fontWeight)
+            self!.fontStylePopUpButton.selectItem(at: Int(selectedStyleIndex))
+            self!.fontSizeComboBox.stringValue = String(format: "%.f pt", model.fontSize)
             
-            window!.orderFront(sender)
+            if self!.annotationModel.annotations != nil {
+                let attributeFontDescriptor = NSFontDescriptor(fontAttributes: [.family: model.fontName, .face: model.fontWeight])
+                let annotationFont = NSFont(descriptor: attributeFontDescriptor, size: model.fontSize)
+
+                for tAnnotation in self!.annotations {
+                    if tAnnotation is CPDFTextWidgetAnnotation {
+                        (tAnnotation as! CPDFTextWidgetAnnotation).font = annotationFont
+                        (tAnnotation as! CPDFTextWidgetAnnotation).fontColor = model.fontColor
+                        if model.fontAlignment == .left {
+                            (tAnnotation as! CPDFTextWidgetAnnotation).alignment = .left
+                        } else if model.fontAlignment == .center {
+                            (tAnnotation as! CPDFTextWidgetAnnotation).alignment = .center
+                        } else if model.fontAlignment == .right {
+                            (tAnnotation as! CPDFTextWidgetAnnotation).alignment = .right
+                        }
+                    }
+                }
+                self!.updateAnnotation()
+            } else {
+                self!.annotationModel.setFontName(model.fontName)
+                self!.annotationModel.setFontSize(model.fontSize)
+                self!.annotationModel.setFontColor(model.fontColor)
+                if model.fontAlignment == .left {
+                    self!.annotationModel.setAlignment(.left)
+                } else if model.fontAlignment == .center {
+                    self!.annotationModel.setAlignment(.center)
+                } else if model.fontAlignment == .right {
+                    self!.annotationModel.setAlignment(.right)
+                }
+            }
         }
+        window?.orderFront(sender)
     }
 
     // MARK: NSNotification Action

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

@@ -127,17 +127,17 @@ extension KMMainViewController {
     }
     
     func corpImageMenuItem()->NSMenuItem {
-        let corpImageItem = NSMenuItem(title: NSLocalizedString("Confirm", comment: ""), action: #selector(menuItemEditingClick_CropImage), target: self)
+        let corpImageItem = NSMenuItem(title: NSLocalizedString("Confirm crop", comment: ""), action: #selector(menuItemEditingClick_CropImage), target: self)
         return corpImageItem
     }
     
     func cancelCorpImageMenuItem()->NSMenuItem {
-        let cancelCorpImageItem = NSMenuItem(title: NSLocalizedString("Cancel", comment: ""), action: #selector(menuItemEditingClick_CancelCrop), target: self)
+        let cancelCorpImageItem = NSMenuItem(title: NSLocalizedString("Cancel crop", comment: ""), action: #selector(menuItemEditingClick_CancelCrop), target: self)
         return cancelCorpImageItem
     }
     
     func restoreCorpImageMenuItem()->NSMenuItem {
-        let cancelCorpImageItem = NSMenuItem(title: NSLocalizedString("Restore", comment: ""), action: #selector(menuItemEditingClick_RestoreCrop), target: self)
+        let cancelCorpImageItem = NSMenuItem(title: NSLocalizedString("Restore crop", comment: ""), action: #selector(menuItemEditingClick_RestoreCrop), target: self)
         return cancelCorpImageItem
     }
     
@@ -1316,22 +1316,23 @@ extension KMMainViewController {
                 default:
                     break
                 }
+                self.rightSideViewController.isHidden = false
+                self.rightSideViewController.subViewType = .AnnotationProperts
                 if annotation != nil{
                     self.listView.activeAnnotations.removeAllObjects()
 //                    self.listView.activeAnnotations.add(annotation as Any)
                     var newAnnonations : [CPDFAnnotation] = []
                     newAnnonations.append(annotation!)
                     self.listView.updateActiveAnnotations(newAnnonations)
-                    self.openRightPane()
+//                    self.openRightPane()
                 }
                 //        self.rightSideViewController.view.isHidden = false
-                self.rightSideViewController.isHidden = false
-                self.rightSideViewController.subViewType = .AnnotationProperts
+              
             }
             
-            if (annotation != nil) {
-                self.listView.updateIsRightActiveAnnotations([annotation!])
-            }
+//            if (annotation != nil) {
+//                self.listView.updateIsRightActiveAnnotations([annotation!])
+//            }
         }
     }
     

+ 3 - 0
PDF Office/PDF Master/Class/README.md

@@ -104,6 +104,9 @@
 * KMLineInspector
 * KMAnnotationLineWindowController
 
+## 笔记类型窗口
+* KMNotesPanelController
+
 ## xxx
 
 [sign in](https://www.baidu.com) the [dashboard](https://www.baidu.com). to [sign up](https://www.baidu.com) 

+ 28 - 0
PDF Office/PDF Master/Strings/de.lproj/Localizable.strings

@@ -2756,3 +2756,31 @@
 
 /* Class = "NSButton"; gToolTip = "Revert all currently shown preferences to their original values"; ObjectID = "492"; */
 "Revert all currently shown preferences to their original values" = "Alle angezeigten Einstellungen auf Originalwerte zurücksetzen";
+
+"Select an area on the page to insert the image." = "Rahmen Sie einen Bereich auf der Seite ein und fügen Sie ein Bild hinzu";
+"ascending sort" = "Aufsteigend";
+"Please add notes" = "Bitte Notizinhalt hinzufügen";
+"Confirm crop" = "Bestätigen Sie das Zuschneiden";
+"Cancel crop" = "Zuschneiden abbrechen";
+"Restore crop" = "Nachschneiden";
+
+"1 button in group. At least 2 buttons needed." = "Die Gruppe muss mindestens 2 Schaltflächen enthalten.";
+"Close All Tabs" = "Alle Fenster schließen";
+"Open in a New Window" = "In einem neuen Fenster öffnen";
+"Anto" = "Adaptiv";
+"Edit text and image in PDF " = "Bearbeiten Sie Texte und Bilder im PDF";
+"Show All" = "zeige alles";
+"Done" = "Beenden";
+"State" = "Zustand";
+"Page" = "Seite";
+"Cancel" = "Stornieren";
+"Ok" = "bestätigen";
+"Note" = "Anmerkungen";
+"Text" = "Text";
+"Highlight" = "Markieren";
+"Anchored" = "Anmerkungen";
+"Underline" = "Unterstreichen";
+"Circle" = "runden";
+"Rectangle" = "Rechteck";
+"Strikethrough" = "durchgestrichen";
+"Line" = "gerade Linie";

+ 24 - 0
PDF Office/PDF Master/Strings/en.lproj/Localizable.strings

@@ -214,6 +214,7 @@
 "Edit text and image in PDF" = "Edit text and image in PDF";
 "Add Text" = "Add Text";
 "Add Image" = "Add Image";
+"Select an area on the page to insert the image." = "Select an area on the page to insert the image.";
 
 // MARK: 表单
 
@@ -3993,4 +3994,27 @@
 "Scanned PDF files are not supported" = "Scanned PDF files are not supported";
 "Limit document size to 10M, document page number to 30, 10w characters per month." = "Limit document size to 10M, document page number to 30, 10w characters per month.";
 "Documents cannot exceed 30 pages" = "Documents cannot exceed 30 pages";
+"ascending sort" = "ascending sort";
+"Confirm crop" = "Confirm crop";
+"Cancel crop" = "Cancel crop";
+"Restore crop" = "Restore crop";
 
+"1 button in group. At least 2 buttons needed." = "1 button in group. At least 2 buttons needed.";
+"Close All Tabs" = "Close All Tabs";
+"Anto" = "Anto";
+"Edit text and image in PDF " = "Edit text and image in PDF ";
+"Show All" = "Show All";
+"Done" = "Done";
+"State" = "State";
+"Page" = "Page";
+"Cancel" = "Cancel";
+"Ok" = "Ok";
+"Note" = "Note";
+"Text" = "Text";
+"Highlight" = "Highlight";
+"Anchored" = "Anchored";
+"Underline" = "Underline";
+"Circle" = "Circle";
+"Rectangle" = "Rectangle";
+"Strikethrough" = "Strikethrough";
+"Line" = "Line";

+ 26 - 0
PDF Office/PDF Master/Strings/es.lproj/Localizable.strings

@@ -2849,3 +2849,29 @@
 
 /* Class = "NSButton"; gToolTip = "Revert all currently shown preferences to their original values"; ObjectID = "492"; */
 "Revert all currently shown preferences to their original values" = "Revertir todas las preferencias mostradas a sus valores originales";
+
+"Select an area on the page to insert the image." = "Encuadre un área en la página y agregue una imagen";
+"ascending sort" = "Ascendente";
+"Please add notes" = "Por favor agregue contenido de nota";
+"Confirm crop" = "Confirmar recorte";
+"Cancel crop" = "Cancelar recorte";
+"Restore crop" = "Recortar";
+"1 button in group. At least 2 buttons needed." = "El grupo debe contener al menos 2 botones.";
+"Close All Tabs" = "Cierra todas las pestañas";
+"Anto" = "Adaptado";
+"Edit text and image in PDF " = "Editar texto e imágenes en PDF";
+"Show All" = "mostrar todo";
+"Done" = "Finalizar";
+"State" = "estado";
+"Page" = "página";
+"Cancel" = "Cancelar";
+"Ok" = "confirmar";
+"Note" = "notas";
+"Text" = "texto";
+"Highlight" = "Destacar";
+"Anchored" = "Notas";
+"Underline" = "Subrayar";
+"Circle" = "redondo";
+"Rectangle" = "rectángulo";
+"Strikethrough" = "tachado";
+"Line" = "línea recta";

+ 28 - 0
PDF Office/PDF Master/Strings/fr.lproj/Localizable.strings

@@ -2719,3 +2719,31 @@
 
 /* Class = "NSButton"; gToolTip = "Revert all currently shown preferences to their original values"; ObjectID = "492"; */
 "Revert all currently shown preferences to their original values" = "Réinitialiser les préférences affichées à leurs valeurs initiales";
+
+"Select an area on the page to insert the image." = "Encadrez une zone de la page et ajoutez une image";
+"ascending sort" = "Ascendant";
+"Please add notes" = "Veuillez ajouter le contenu de la note";
+"Confirm crop" = "Confirmer le recadrage";
+"Cancel crop" = "Annuler le recadrage";
+"Restore crop" = "Recadrer";
+
+"1 button in group. At least 2 buttons needed." = "Le groupe doit contenir au moins 2 boutons.";
+"Close All Tabs" = "Fermer tous les onglets";
+"Open in a New Window" = "Ouvrir dans une nouvelle fenêtre";
+"Anto" = "Adaptatif";
+"Edit text and image in PDF " = "Modifier du texte et des images en PDF";
+"Show All" = "Afficher tout";
+"Done" = "Finition";
+"State" = "État";
+"Page" = "page";
+"Cancel" = "Annuler";
+"Ok" = "confirmer";
+"Note" = "Remarques";
+"Text" = "texte";
+"Highlight" = "Souligner";
+"Anchored" = "Remarques";
+"Underline" = "Souligner";
+"Circle" = "rond";
+"Rectangle" = "rectangle";
+"Strikethrough" = "barré";
+"Line" = "ligne droite";

+ 26 - 0
PDF Office/PDF Master/Strings/it.lproj/Localizable.strings

@@ -2645,3 +2645,29 @@
 
 /* Class = "NSButton"; gToolTip = "Revert all currently shown preferences to their original values"; ObjectID = "492"; */
 "Revert all currently shown preferences to their original values" = "Reimposta tutte le preferenze correntemente visualizzate ai loro valori originali";
+
+"Select an area on the page to insert the image." = "Inquadra un'area della pagina e aggiungi un'immagine";
+"ascending sort" = "Ascendente";
+"Please add notes" = "Aggiungi il contenuto della nota";
+"Confirm crop" = "Conferma il ritaglio";
+"Cancel crop" = "Annulla il ritaglio";
+"Restore crop" = "Ritagliare";
+"1 button in group. At least 2 buttons needed." = "Il gruppo deve contenere almeno 2 pulsanti.";
+"Close All Tabs" = "Chiudi tutte le schede";
+"Anto" = "Adattivo";
+"Edit text and image in PDF " = "Modifica testo e immagini in PDF";
+"Show All" = "mostra tutto";
+"Done" = "Fine";
+"State" = "stato";
+"Page" = "pagina";
+"Cancel" = "Annulla";
+"Ok" = "Confermare";
+"Note" = "Appunti";
+"Text" = "testo";
+"Highlight" = "Evidenziare";
+"Anchored" = "Appunti";
+"Underline" = "Sottolineare";
+"Circle" = "girare";
+"Rectangle" = "rettangolo";
+"Strikethrough" = "barrato";
+"Line" = "retta";

+ 26 - 0
PDF Office/PDF Master/Strings/ja.lproj/Localizable.strings

@@ -2912,3 +2912,29 @@
 
 // Class = "NSButton"; gToolTip = "Revert all currently shown preferences to their original values"; ObjectID = "492";
 "Revert all currently shown preferences to their original values" = "現在表示されている項目を全て元の値に戻る";
+
+"Select an area on the page to insert the image." = "ページ上の領域を枠に囲んで画像を追加します";
+"ascending sort" = "上昇";
+"Please add notes" = "メモ内容を追加してください";
+"Confirm crop" = "トリミングを確認する";
+"Cancel crop" = "トリミングをキャンセルする";
+"Restore crop" = "再クロップ";
+"1 button in group. At least 2 buttons needed." = "グループには少なくとも 2 つのボタンが含まれている必要があります。";
+"Close All Tabs" = "新しいウィンドウで開きます";
+"Anto" = "アダプティブ";
+"Edit text and image in PDF " = "PDF 内のテキストと画像を編集する";
+"Show All" = "すべて表示する";
+"Done" = "仕上げる";
+"State" = "州";
+"Page" = "ページ";
+"Cancel" = "キャンセル";
+"Ok" = "確認する";
+"Note" = "ノート";
+"Text" = "文章";
+"Highlight" = "ハイライト";
+"Anchored" = "ノート";
+"Underline" = "下線";
+"Circle" = "ラウンド";
+"Rectangle" = "矩形";
+"Strikethrough" = "取り消し線";
+"Line" = "直線";

+ 28 - 0
PDF Office/PDF Master/Strings/nl.lproj/Localizable.strings

@@ -2921,3 +2921,31 @@
 
 /* Class = "NSButton"; gToolTip = "Revert all currently shown preferences to their original values"; ObjectID = "492"; */
 "Revert all currently shown preferences to their original values" = "Herstel alle nu zichtbare standaardinstellingen naar hun oorspronkelijke waarden";
+
+"Select an area on the page to insert the image." = "Kadreer een gebied op de pagina en voeg een afbeelding toe";
+"ascending sort" = "Rosnąco";
+"Please add notes" = "Voeg notitie-inhoud toe";
+"Confirm crop" = "Bevestig het bijsnijden";
+"Cancel crop" = "Annuleer het bijsnijden";
+"Restore crop" = "Opnieuw bijsnijden";
+
+"1 button in group. At least 2 buttons needed." = "De groep moet minimaal 2 knoppen bevatten.";
+"Close All Tabs" = "Sluit alle tabbladen";
+"Open in a New Window" = "Openen in een nieuw venster";
+"Anto" = "Aangepaste";
+"Edit text and image in PDF " = "Bewerk tekst en afbeeldingen in PDF";
+"Show All" = "toon alles";
+"Done" = "Finish";
+"State" = "staat";
+"Page" = "bladzijde";
+"Cancel" = "Annuleren";
+"Ok" = "bevestigen";
+"Note" = "notities";
+"Text" = "tekst";
+"Highlight" = "Hoogtepunt";
+"Anchored" = "Opmerkingen";
+"Underline" = "Onderstrepen";
+"Circle" = "ronde";
+"Rectangle" = "rechthoek";
+"Strikethrough" = "doorhalen";
+"Line" = "rechte lijn";

+ 26 - 0
PDF Office/PDF Master/Strings/pl.lproj/Localizable.strings

@@ -2861,3 +2861,29 @@
 
 /* Class = "NSButton"; gToolTip = "Revert all currently shown preferences to their original values"; ObjectID = "492"; */
 "Revert all currently shown preferences to their original values" = "Przywraca wszystkie obecnie pokazywane ustawienia do wartości domyślnych";
+
+"Select an area on the page to insert the image." = "Wykadruj obszar na stronie i dodaj obraz";
+"ascending sort" = "Rosnąco";
+"Please add notes" = "Proszę dodać treść notatki";
+"Confirm crop" = "Potwierdź przycięcie";
+"Cancel crop" = "Anuluj przycinanie";
+"Restore crop" = "Przytnij ponownie";
+"1 button in group. At least 2 buttons needed." = "Grupa musi zawierać co najmniej 2 przyciski.";
+"Close All Tabs" = "Zamknąć wszystkie zakładki";
+"Anto" = "Adaptacyjny";
+"Edit text and image in PDF " = "Edytuj tekst i obrazy w formacie PDF";
+"Show All" = "Pokaż wszystko";
+"Done" = "Skończyć";
+"State" = "państwo";
+"Page" = "strona";
+"Cancel" = "Anulować";
+"Ok" = "potwierdzać";
+"Note" = "notatki";
+"Text" = "tekst";
+"Highlight" = "Atrakcja";
+"Anchored" = "Notatki";
+"Underline" = "Podkreślać";
+"Circle" = "okrągły";
+"Rectangle" = "prostokąt";
+"Strikethrough" = "przekreślenie";
+"Line" = "linia prosta";

+ 26 - 0
PDF Office/PDF Master/Strings/ru.lproj/Localizable.strings

@@ -2786,3 +2786,29 @@
 
 /* Class = "NSButton"; gToolTip = "Revert all currently shown preferences to their original values"; ObjectID = "492"; */
 "Revert all currently shown preferences to their original values" = "Вернуть все показанные настройки к стандартным значениям";
+
+"Select an area on the page to insert the image." = "Выделите область на странице и добавьте изображение";
+"ascending sort" = "Восходящий";
+"Please add notes" = "Пожалуйста, добавьте содержание заметки";
+"Confirm crop" = "Подтвердить обрезку";
+"Cancel crop" = "Отменить обрезку";
+"Restore crop" = "Повторная обрезка";
+"1 button in group. At least 2 buttons needed." = "В группе должно быть минимум 2 кнопки.";
+"Close All Tabs" = "Закрыть все вкладки";
+"Anto" = "Адаптивный";
+"Edit text and image in PDF " = "Редактируйте текст и изображения в PDF";
+"Show All" = "показать все";
+"Done" = "Заканчивать";
+"State" = "состояние";
+"Page" = "страница";
+"Cancel" = "Отмена";
+"Ok" = "подтверждать";
+"Note" = "примечания";
+"Text" = "текст";
+"Highlight" = "Выделять";
+"Anchored" = "Примечания";
+"Underline" = "Подчеркнуть";
+"Circle" = "круглый";
+"Rectangle" = "прямоугольник";
+"Strikethrough" = "зачеркивание";
+"Line" = "прямая линия";

+ 26 - 0
PDF Office/PDF Master/Strings/zh-Hans.lproj/Localizable.strings

@@ -3825,3 +3825,29 @@
 
 /* Class = "NSButton"; gToolTip = "Revert all currently shown preferences to their original values"; ObjectID = "492"; */
 "Revert all currently shown preferences to their original values" = "撤消所有当前显示的选项设置为原始值";
+
+"Select an area on the page to insert the image." = "在页面中框选区域,并添加图像";
+"ascending sort" = "升序排列";
+"Please add notes" = "请新增笔记内容";
+"Confirm crop" = "确认裁剪";
+"Cancel crop" = "取消裁剪";
+"Restore crop" = "重新裁剪";
+"1 button in group. At least 2 buttons needed." = "群组内至少包含2个按钮。";
+"Close All Tabs" = "关闭所有页签";
+"Anto" = "自适配";
+"Edit text and image in PDF " = "编辑PDF中的文本和图片";
+"Show All" = "展示所有";
+"Done" = "完成";
+"State" = "州";
+"Page" = "页面";
+"Cancel" = "取消";
+"Ok" = "确认";
+"Note" = "笔记";
+"Text" = "文本";
+"Highlight" = "高亮";
+"Anchored" = "便签";
+"Underline" = "下划线";
+"Circle" = "圆形";
+"Rectangle" = "矩形";
+"Strikethrough" = "删除线";
+"Line" = "直线";

+ 28 - 0
PDF Office/PDF Master/Strings/zh-Hant.lproj/Localizable.strings

@@ -3954,3 +3954,31 @@
 
 /* Class = "NSButton"; gToolTip = "Revert all currently shown preferences to their original values"; ObjectID = "492"; */
 "Revert all currently shown preferences to their original values" = "回存所有目前顯示的偏好設定至原始值";
+
+"Select an area on the page to insert the image." = "在頁面中框選區域,並新增圖像";
+"ascending sort" = "升序排列";
+"Please add notes" = "請新增筆記內容";
+"Confirm crop" = "確認裁切";
+"Cancel crop" = "取消裁切";
+"Restore crop" = "重新裁剪";
+
+"1 button in group. At least 2 buttons needed." = "群組內至少包含2個按鈕。";
+"Close All Tabs" = "關閉所有頁籤";
+"Open in a New Window" = "在新視窗中開啟";
+"Anto" = "自適配";
+"Edit text and image in PDF " = "編輯PDF中的文字和圖片";
+"Show All" = "展示所有";
+"Done" = "完成";
+"State" = "州";
+"Page" = "頁面";
+"Cancel" = "取消";
+"Ok" = "確認";
+"Note" = "筆記";
+"Text" = "文字";
+"Highlight" = "高亮";
+"Anchored" = "便籤";
+"Underline" = "底線";
+"Circle" = "圓形";
+"Rectangle" = "長方形";
+"Strikethrough" = "刪除線";
+"Line" = "直線";