Browse Source

【EditPDF】悬浮窗文本类型细节补充

tangchao 8 months ago
parent
commit
b997d8c668

+ 36 - 26
PDF Office/PDF Master/Class/PDFTools/EditPDF/Controller/KMEditPDFPopToolBarController.swift

@@ -112,6 +112,30 @@ class KMEditPDFPopToolBarController: NSViewController {
         }
     }
     
+    @objc func textAlignmentItemClick(_ sender: NSButton) {
+        let vc = KMTextAlignmentController(nibName: "KMTextAlignmentController", bundle: nil)
+        let createFilePopover: NSPopover = NSPopover.init()
+        createFilePopover.contentViewController = vc
+//        createFilePopover.delegate = self
+        createFilePopover.animates = true
+        createFilePopover.behavior = .semitransient
+        createFilePopover.setValue(true, forKey: "shouldHideAnchor")
+        createFilePopover.show(relativeTo: CGRect(x: sender.bounds.origin.x, y: 20, width: sender.bounds.size.width, height: sender.bounds.size.height), of: sender, preferredEdge: .maxY)
+        
+        vc.itemAction = { [weak self] idx, _ in
+            var data: NSTextAlignment = .left
+            if idx == 0 {
+                data = .left
+            } else if idx == 1 {
+                data = .center
+            } else if idx == 2 {
+                data = .right
+            }
+            self?.itemClick?(.textAlignment, data)
+            createFilePopover.close()
+        }
+    }
+    
     @objc func colorPanelAction(_ sender: NSColorPanel) {
         let color = sender.color
         let colorView = (self.toolbarView?.itemViews.first as? KMEditPDFToolbarItemView)?.view as? KMEditPDFColorView
@@ -159,6 +183,17 @@ extension KMEditPDFPopToolBarController: KMEditPDFToolbarViewDelegate {
             view.strokeColor = NSColor(hex: "#DADBDE")
             colorView.view = view
             return colorView
+        } else if itemKey == .textAlignment {
+            let colorView = KMEditPDFToolbarItemView()
+            let viewC = KMDesignButton(withType: .Image)
+            colorView.view = viewC.view
+            colorView.obj = viewC
+            viewC.pagination()
+//            viewC.tag = index
+            viewC.target = self
+            viewC.action = #selector(textAlignmentItemClick)
+            viewC.image = NSImage(named: "KMImageNameEditPDFAlignCenterSelect")!
+            return colorView
         }
         let colorView = KMEditPDFToolbarItemView()
         let viewC = KMDesignButton(withType: .Image)
@@ -231,32 +266,7 @@ extension KMEditPDFPopToolBarController: KMEditPDFToolbarViewDelegate {
 
 extension KMEditPDFPopToolBarController: KMSelectPopButtonDelegate {
     func km_comboBoxSelectionDidChange(_ obj: KMDesignSelect) {
-//        if (self.lineWidthVC == obj) {
-//            let index = self.lineWidthVC.indexOfSelectedItem
-//            if index < 0 {
-//                return
-//            }
-//
-//            let width = self.lineWidthVC.stringValue.replacingOccurrences(of: "pt", with: "")
-//            if annotationModel.stampAnnotationType() == .signDot {
-//                annotationModel.setNoteWidth(CGFloat(width.stringToCGFloat())*5)
-//                annotationModel.setNoteHeight(CGFloat(width.stringToCGFloat())*5)
-//            } else {
-//                annotationModel.setLineWidth(width.stringToCGFloat())
-//            }
-//        } else if (self.opacityVC == obj) {
-//            let index = self.opacityVC.indexOfSelectedItem
-//            if index < 0 {
-//                return
-//            }
-//
-//            let opacity = self.opacityVC.stringValue.replacingOccurrences(of: "%", with: "")
-//            self.opacitySlider.floatValue = Float(opacity.stringToCGFloat()/100)
-//            annotationModel.setOpacity(opacity.stringToCGFloat()/100)
-//        }
-//
-//        refreshUI()
-//        updateAnnotation()
+        self.itemClick?(.fontStyle, obj.stringValue)
     }
     
     func km_controlTextDidEndEditing(_ obj: KMDesignSelect) {

+ 58 - 0
PDF Office/PDF Master/Class/PDFTools/EditPDF/Controller/KMTextAlignmentController.swift

@@ -0,0 +1,58 @@
+//
+//  KMTextAlignmentController.swift
+//  PDF Reader Pro
+//
+//  Created by tangchao on 2024/6/26.
+//
+
+import Cocoa
+
+class KMTextAlignmentController: NSViewController {
+    @IBOutlet weak var leftBox: NSBox!
+    @IBOutlet weak var centerBox: NSBox!
+    @IBOutlet weak var rightBox: NSBox!
+    
+    private var leftVc_: KMDesignButton?
+    private var centerVc_: KMDesignButton?
+    private var rightVc_: KMDesignButton?
+    
+    var itemAction: KMCommonClickBlock?
+    
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        
+        self.view.wantsLayer = true
+        self.view.layer?.backgroundColor = .white
+        
+        self.leftVc_ = KMDesignButton(withType: .Image)
+        self.leftBox.contentView = self.leftVc_!.view
+        self.leftBox.borderWidth = 0
+        self.leftVc_?.pagination()
+        self.leftVc_?.target = self
+        self.leftVc_?.action = #selector(_itemClick)
+        self.leftVc_?.image = NSImage(named: "KMImageNameEditPDFAlignLeftSelect")!
+        self.leftVc_?.tag = 0
+        
+        self.centerVc_ = KMDesignButton(withType: .Image)
+        self.centerBox.contentView = self.centerVc_!.view
+        self.centerBox.borderWidth = 0
+        self.centerVc_?.pagination()
+        self.centerVc_?.target = self
+        self.centerVc_?.action = #selector(_itemClick)
+        self.centerVc_?.image = NSImage(named: "KMImageNameEditPDFAlignCenterSelect")!
+        self.centerVc_?.tag = 1
+        
+        self.rightVc_ = KMDesignButton(withType: .Image)
+        self.rightBox.contentView = self.rightVc_!.view
+        self.rightBox.borderWidth = 0
+        self.rightVc_?.pagination()
+        self.rightVc_?.target = self
+        self.rightVc_?.action = #selector(_itemClick)
+        self.rightVc_?.image = NSImage(named: "KMImageNameEditPDFAlignRightSelect")!
+        self.rightVc_?.tag = 2
+    }
+    
+    @objc private func _itemClick(_ sender: NSButton) {
+        self.itemAction?(sender.tag)
+    }
+}

+ 69 - 0
PDF Office/PDF Master/Class/PDFTools/EditPDF/Controller/KMTextAlignmentController.xib

@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+    <dependencies>
+        <deployment identifier="macosx"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <customObject id="-2" userLabel="File's Owner" customClass="KMTextAlignmentController" customModule="PDF_Reader_Pro" customModuleProvider="target">
+            <connections>
+                <outlet property="centerBox" destination="EDc-6v-ugO" id="vDe-hH-rBf"/>
+                <outlet property="leftBox" destination="nXC-hl-TzA" id="fa8-72-4d4"/>
+                <outlet property="rightBox" destination="fXc-UW-E0g" id="fue-B5-Ut2"/>
+                <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 id="Hz6-mo-xeY">
+            <rect key="frame" x="0.0" y="0.0" width="116" height="40"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+            <subviews>
+                <box boxType="custom" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="nXC-hl-TzA">
+                    <rect key="frame" x="4" y="4" width="32" height="32"/>
+                    <view key="contentView" id="Q78-eu-UsB">
+                        <rect key="frame" x="1" y="1" width="30" height="30"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                    </view>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="32" id="Yha-qi-GLs"/>
+                        <constraint firstAttribute="width" constant="32" id="g3X-kI-bh5"/>
+                    </constraints>
+                </box>
+                <box boxType="custom" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="EDc-6v-ugO">
+                    <rect key="frame" x="40" y="4" width="32" height="32"/>
+                    <view key="contentView" id="KuU-73-lSC">
+                        <rect key="frame" x="1" y="1" width="30" height="30"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                    </view>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="32" id="mnL-v5-ZRn"/>
+                        <constraint firstAttribute="width" constant="32" id="wOs-oS-Aky"/>
+                    </constraints>
+                </box>
+                <box boxType="custom" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="fXc-UW-E0g">
+                    <rect key="frame" x="76" y="4" width="32" height="32"/>
+                    <view key="contentView" id="aSp-aS-DP5">
+                        <rect key="frame" x="1" y="1" width="30" height="30"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                    </view>
+                    <constraints>
+                        <constraint firstAttribute="width" constant="32" id="fWc-7e-VeW"/>
+                        <constraint firstAttribute="height" constant="32" id="zCX-Cm-OIq"/>
+                    </constraints>
+                </box>
+            </subviews>
+            <constraints>
+                <constraint firstItem="fXc-UW-E0g" firstAttribute="centerY" secondItem="EDc-6v-ugO" secondAttribute="centerY" id="12E-no-M2Q"/>
+                <constraint firstItem="nXC-hl-TzA" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" constant="4" id="70u-p4-gjJ"/>
+                <constraint firstItem="EDc-6v-ugO" firstAttribute="centerY" secondItem="nXC-hl-TzA" secondAttribute="centerY" id="C0R-19-dL4"/>
+                <constraint firstItem="nXC-hl-TzA" firstAttribute="centerY" secondItem="Hz6-mo-xeY" secondAttribute="centerY" id="G7g-mj-5Af"/>
+                <constraint firstItem="nXC-hl-TzA" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="4" id="azS-Gg-I7W"/>
+                <constraint firstItem="EDc-6v-ugO" firstAttribute="leading" secondItem="nXC-hl-TzA" secondAttribute="trailing" constant="4" id="fxV-Bz-X2W"/>
+                <constraint firstItem="fXc-UW-E0g" firstAttribute="leading" secondItem="EDc-6v-ugO" secondAttribute="trailing" constant="4" id="vs9-WJ-0K1"/>
+            </constraints>
+            <point key="canvasLocation" x="138" y="154"/>
+        </customView>
+    </objects>
+</document>

+ 215 - 13
PDF Office/PDF Master/Class/PDFTools/EditPDF/Tools/KMEditPDfHanddler.swift

@@ -113,6 +113,18 @@ class KMEditPDfHanddler: NSObject {
         }
     }
     
+    func fontStyleAction(fontName: String?) {
+        guard let font = CPDFFont.mappingFont(withFontString: fontName) else {
+            return
+        }
+        let editingAreas = self.editingAreas
+        for area in editingAreas {
+            if let data = area as? CPDFEditTextArea {
+                self.listView?.setEditSelectionCFont(font, with: data)
+            }
+        }
+    }
+    
     func fontAddAction() {
         let editingAreas = self.editingAreas
         if editingAreas.isEmpty {
@@ -174,8 +186,13 @@ class KMEditPDfHanddler: NSObject {
         self.listView?.setCurrentSelectionIsItalic(true, with: area as! CPDFEditTextArea)
     }
     
-    func textAlignmentAction() {
-        KMPrint("textAlignmentAction")
+    func textAlignmentAction(align: NSTextAlignment) {
+        let editingAreas = self.editingAreas
+        for area in editingAreas {
+            if let data = area as? CPDFEditTextArea {
+                self.listView?.setCurrentSelectionAlignment(align, with: data)
+            }
+        }
     }
     
     func leftRotateAction() {
@@ -333,8 +350,191 @@ class KMEditPDfHanddler: NSObject {
         }
     }
     
-    func alignmentAction() {
-        KMPrint("alignmentAction")
+    func alignmentAction(align: CPDFActiveAreasAlignType) {
+        KMPrint("updateFormAearsAlignMangent")
+        let stype = align
+        
+        let editingAreas = self.editingAreas
+        if editingAreas.count >= 2 {
+            
+            var zeroRect = NSRect.null
+            var highestRect = NSZeroRect
+            var widthestRect = NSZeroRect
+            
+            let fristArea : CPDFEditArea = editingAreas.first as! CPDFEditArea
+            var leftestRect = fristArea.bounds
+            var rightestRect = fristArea.bounds
+            var topestRect = fristArea.bounds
+            var bottomestRect = fristArea.bounds
+            
+            var leftestArea : CPDFEditArea = fristArea
+            var rightestArea : CPDFEditArea = fristArea
+            var topestArea : CPDFEditArea = fristArea
+            var bottomestArea : CPDFEditArea = fristArea
+            
+            var totalWidth = 0.0
+            var totalHeight = 0.0
+            
+            for i in 0 ... editingAreas.count-1 {
+                let area : CPDFEditArea = editingAreas[i] as! CPDFEditArea
+                zeroRect = zeroRect.union(area.bounds)
+                totalWidth = totalWidth + area.bounds.width
+                totalHeight = totalHeight + area.bounds.height
+                
+                if area.bounds.height > highestRect.height {
+                    highestRect = area.bounds
+                }
+                
+                if area.bounds.width > widthestRect.width {
+                    widthestRect = area.bounds
+                }
+                
+                if leftestRect.minX > area.bounds.minX {
+                    leftestRect = area.bounds
+                    leftestArea = area
+                }
+                
+                if area.bounds.maxX > rightestRect.maxX {
+                    rightestRect = area.bounds
+                    rightestArea = area
+                }
+                
+                if area.bounds.maxY > topestRect.maxY {
+                    topestRect = area.bounds
+                    topestArea = area
+                }
+                
+                if bottomestRect.minY > area.bounds.minY {
+                    bottomestRect = area.bounds
+                    bottomestArea = area
+                }
+            }
+            
+            var resultAreasArray: [Any] = []
+            var newBoundsArray: [String] = []
+            if stype == .Left {
+                for i in 0 ... editingAreas.count-1 {
+                    let areas = editingAreas[i] as! CPDFEditArea
+                    var bounds = areas.bounds
+                    bounds.origin.x = zeroRect.origin.x
+                    newBoundsArray.append(NSStringFromRect(bounds))
+                }
+                resultAreasArray = editingAreas
+            } else if stype == .Right {
+                for i in 0 ... editingAreas.count-1 {
+                    let areas = editingAreas[i] as! CPDFEditArea
+                    var bounds = areas.bounds
+                    bounds.origin.x = zeroRect.maxX - bounds.size.width
+                    newBoundsArray.append(NSStringFromRect(bounds))
+                }
+                resultAreasArray = editingAreas
+            } else if stype == .Top {
+                for i in 0 ... editingAreas.count-1 {
+                    let areas = editingAreas[i] as! CPDFEditArea
+                    var bounds = areas.bounds
+                    bounds.origin.y = zeroRect.maxY - bounds.size.height
+                    newBoundsArray.append(NSStringFromRect(bounds))
+                }
+                resultAreasArray = editingAreas
+            } else if stype == .Bottom {
+                for i in 0 ... editingAreas.count-1 {
+                    let areas = editingAreas[i] as! CPDFEditArea
+                    var bounds = areas.bounds
+                    bounds.origin.y = zeroRect.minY
+                    newBoundsArray.append(NSStringFromRect(bounds))
+                }
+                resultAreasArray = editingAreas
+            } else if stype == .Horizontally {
+                for i in 0 ... editingAreas.count-1 {
+                    let areas = editingAreas[i] as! CPDFEditArea
+                    var bounds = areas.bounds
+                    bounds.origin.y = highestRect.midY - bounds.height/2
+                    newBoundsArray.append(NSStringFromRect(bounds))
+                }
+                resultAreasArray = editingAreas
+            } else if stype == .Vertical {
+                for i in 0 ... editingAreas.count-1 {
+                    let areas = editingAreas[i] as! CPDFEditArea
+                    var bounds = areas.bounds
+                    bounds.origin.x = widthestRect.midX - bounds.width/2
+                    newBoundsArray.append(NSStringFromRect(bounds))
+                }
+                resultAreasArray = editingAreas
+            } else if stype == .DisHorizontally {
+                let middleGap = zeroRect.width - leftestRect.width - rightestRect.width
+                let otherAreasTotalWidth = totalWidth - leftestRect.width - rightestRect.width
+                
+                let gap = (middleGap - otherAreasTotalWidth)/CGFloat(editingAreas.count - 1)
+                var areasCopyArray : [CPDFEditArea] = editingAreas as! [CPDFEditArea]
+                areasCopyArray.sorted(by: { obj1, obj2 in
+                    let area1 = obj1
+                    let area2 = obj2
+                    if area1.bounds.origin.x < area2.bounds.origin.x {
+                        return true
+                    } else {
+                        return false
+                    }
+                })
+                
+                if let index = areasCopyArray.firstIndex(of: leftestArea) {
+                    areasCopyArray.remove(at: index)
+                }
+                
+                if let index = areasCopyArray.firstIndex(of: rightestArea) {
+                    areasCopyArray.remove(at: index)
+                }
+                
+                var leftStartX = leftestRect.maxX + gap
+                for i in 0 ... areasCopyArray.count-1 {
+                    let areas = areasCopyArray[i]
+                    var bounds = areas.bounds
+                    bounds.origin.x = leftStartX
+                    newBoundsArray.append(NSStringFromRect(bounds))
+                    leftStartX = leftStartX + bounds.width + gap
+                }
+                resultAreasArray = areasCopyArray
+            } else if stype == .DisVertical {
+                let middleGap = zeroRect.height - topestRect.height - bottomestRect.height
+                let otherAreasTotalHeight = totalHeight - topestRect.height - bottomestRect.height
+                
+                let gap = (middleGap - otherAreasTotalHeight)/CGFloat(editingAreas.count - 1)
+                var areasCopyArray : [CPDFEditArea] = editingAreas as! [CPDFEditArea]
+                areasCopyArray.sorted(by: { obj1, obj2 in
+                    let area1 = obj1
+                    let area2 = obj2
+                    if area1.bounds.origin.x < area2.bounds.origin.x {
+                        return true
+                    } else {
+                        return false
+                    }
+                })
+                if let index = areasCopyArray.firstIndex(of: topestArea) {
+                    areasCopyArray.remove(at: index)
+                }
+                
+                if let index = areasCopyArray.firstIndex(of: bottomestArea) {
+                    areasCopyArray.remove(at: index)
+                }
+                
+                var bottomStartY = bottomestRect.maxY + gap
+                for i in 0 ... areasCopyArray.count-1 {
+                    let areas = areasCopyArray[i]
+                    var bounds = areas.bounds
+                    bounds.origin.y = bottomStartY
+                    newBoundsArray.append(NSStringFromRect(bounds))
+                    bottomStartY = bottomStartY + bounds.height + gap
+                }
+                resultAreasArray = areasCopyArray
+            }
+            
+            var oldBounds : [String] = []
+            for i in 0 ... resultAreasArray.count-1 {
+                let area : CPDFEditArea = resultAreasArray[i] as! CPDFEditArea
+                oldBounds.append(NSStringFromRect(area.bounds))
+                self.listView?.setBoundsEditArea(area, withBounds: NSRectFromString(newBoundsArray[i]))
+            }
+            self.listView?.setNeedsDisplayForVisiblePages()
+        }
     }
     
     func showPopWindow(positionRect: NSRect) {
@@ -380,6 +580,8 @@ class KMEditPDfHanddler: NSObject {
         win.itemClick = { [weak self] itemKey, obj in
             if itemKey == .color {
                 self?.fontColorAction(color: obj as? NSColor)
+            } else if itemKey == .fontStyle {
+                self?.fontStyleAction(fontName: obj as? String)
             } else if itemKey == .fontAdd {
                 self?.fontAddAction()
             } else if itemKey == .fontReduce {
@@ -389,7 +591,7 @@ class KMEditPDfHanddler: NSObject {
             } else if itemKey == .fontItalic {
                 self?.fontItalicAction()
             } else if itemKey == .textAlignment {
-                self?.textAlignmentAction()
+                self?.textAlignmentAction(align: obj as? NSTextAlignment ?? .left)
             }
             // 图片
             else if itemKey == .leftRotate {
@@ -409,21 +611,21 @@ class KMEditPDfHanddler: NSObject {
             }
             // 对齐
             else if itemKey == .alignmentLeft {
-                self?.alignmentAction()
+                self?.alignmentAction(align: .Left)
             } else if itemKey == .alignmentCenterX {
-                self?.alignmentAction()
+                self?.alignmentAction(align: .Horizontally)
             } else if itemKey == .alignmentRight {
-                self?.alignmentAction()
+                self?.alignmentAction(align: .Right)
             } else if itemKey == .alignmentjustifiedX {
-                self?.alignmentAction()
+                self?.alignmentAction(align: .DisHorizontally)
             } else if itemKey == .alignmentTop {
-                self?.alignmentAction()
+                self?.alignmentAction(align: .Top)
             } else if itemKey == .alignmentCenterY {
-                self?.alignmentAction()
+                self?.alignmentAction(align: .Vertical)
             } else if itemKey == .alignmentBottom {
-                self?.alignmentAction()
+                self?.alignmentAction(align: .Bottom)
             } else if itemKey == .alignmentjustifiedY {
-                self?.alignmentAction()
+                self?.alignmentAction(align: .DisVertical)
             }
         }
         

+ 33 - 0
PDF Office/PDF Master/Class/PDFTools/EditPDF/View/KMEditPDFColorView.swift

@@ -43,8 +43,17 @@ class KMEditPDFColorView: NSView {
         return view
     }()
     
+    private var area_: NSTrackingArea?
+    
     var itemClick: KMCommonClickBlock?
     
+    deinit {
+        KMPrint("KMEditPDFColorView deinit.")
+        if let trackingArea = self.area_ {
+            self.removeTrackingArea(trackingArea)
+        }
+    }
+    
     override init(frame frameRect: NSRect) {
         super.init(frame: frameRect)
         
@@ -82,7 +91,31 @@ class KMEditPDFColorView: NSView {
         self.plateBtn.frame = NSMakeRect(plateX, btnY, btnWH, btnWH)
     }
     
+    override func updateTrackingAreas() {
+        super.updateTrackingAreas()
+
+        if let existingArea = self.area_ {
+            self.removeTrackingArea(existingArea)
+            self.area_ = nil
+        }
+
+        let opts: NSTrackingArea.Options = [.mouseEnteredAndExited, .mouseMoved, .activeAlways]
+        self.area_ = NSTrackingArea(rect: bounds, options: opts, owner: self, userInfo: nil)
+
+        if let trackingArea = self.area_ {
+            self.addTrackingArea(trackingArea)
+        }
+    }
+    
     @objc func buttonClick(_ sender: NSButton) {
         self.itemClick?(0)
     }
+    
+    override func mouseEntered(with event: NSEvent) {
+        self.box.borderColor = KMAppearance.Interactive.a0Color()
+    }
+    
+    override func mouseExited(with event: NSEvent) {
+        self.box.borderColor = NSColor(hex: "#DFE1E5")
+    }
 }

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

@@ -3624,6 +3624,12 @@
 		BB5DF1F42959C9F00025CDA1 /* KMHeaderFooterPropertyMainController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB5DF1F02959C9F00025CDA1 /* KMHeaderFooterPropertyMainController.xib */; };
 		BB5DF1F52959C9F00025CDA1 /* KMHeaderFooterPropertyMainController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB5DF1F02959C9F00025CDA1 /* KMHeaderFooterPropertyMainController.xib */; };
 		BB5DF1F62959C9F00025CDA1 /* KMHeaderFooterPropertyMainController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB5DF1F02959C9F00025CDA1 /* KMHeaderFooterPropertyMainController.xib */; };
+		BB5EC3622C2BDC9D0090EF27 /* KMTextAlignmentController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB5EC3602C2BDC9D0090EF27 /* KMTextAlignmentController.swift */; };
+		BB5EC3632C2BDC9D0090EF27 /* KMTextAlignmentController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB5EC3602C2BDC9D0090EF27 /* KMTextAlignmentController.swift */; };
+		BB5EC3642C2BDC9D0090EF27 /* KMTextAlignmentController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB5EC3602C2BDC9D0090EF27 /* KMTextAlignmentController.swift */; };
+		BB5EC3652C2BDC9D0090EF27 /* KMTextAlignmentController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB5EC3612C2BDC9D0090EF27 /* KMTextAlignmentController.xib */; };
+		BB5EC3662C2BDC9D0090EF27 /* KMTextAlignmentController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB5EC3612C2BDC9D0090EF27 /* KMTextAlignmentController.xib */; };
+		BB5EC3672C2BDC9D0090EF27 /* KMTextAlignmentController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB5EC3612C2BDC9D0090EF27 /* KMTextAlignmentController.xib */; };
 		BB5F8A0E29BB04F000365ADB /* GBDeviceInfo_OSX.m in Sources */ = {isa = PBXBuildFile; fileRef = BB5F8A0529BB04EF00365ADB /* GBDeviceInfo_OSX.m */; };
 		BB5F8A0F29BB04F000365ADB /* GBDeviceInfo_OSX.m in Sources */ = {isa = PBXBuildFile; fileRef = BB5F8A0529BB04EF00365ADB /* GBDeviceInfo_OSX.m */; };
 		BB5F8A1029BB04F000365ADB /* GBDeviceInfo_OSX.m in Sources */ = {isa = PBXBuildFile; fileRef = BB5F8A0529BB04EF00365ADB /* GBDeviceInfo_OSX.m */; };
@@ -6756,6 +6762,8 @@
 		BB5DF1E82959C5CB0025CDA1 /* KMHeaderFooterPreviewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMHeaderFooterPreviewController.xib; sourceTree = "<group>"; };
 		BB5DF1EF2959C9F00025CDA1 /* KMHeaderFooterPropertyMainController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMHeaderFooterPropertyMainController.swift; sourceTree = "<group>"; };
 		BB5DF1F02959C9F00025CDA1 /* KMHeaderFooterPropertyMainController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMHeaderFooterPropertyMainController.xib; sourceTree = "<group>"; };
+		BB5EC3602C2BDC9D0090EF27 /* KMTextAlignmentController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMTextAlignmentController.swift; sourceTree = "<group>"; };
+		BB5EC3612C2BDC9D0090EF27 /* KMTextAlignmentController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMTextAlignmentController.xib; sourceTree = "<group>"; };
 		BB5F8A0529BB04EF00365ADB /* GBDeviceInfo_OSX.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GBDeviceInfo_OSX.m; sourceTree = "<group>"; };
 		BB5F8A0629BB04EF00365ADB /* GBDeviceInfo_Common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GBDeviceInfo_Common.h; sourceTree = "<group>"; };
 		BB5F8A0729BB04EF00365ADB /* GBDeviceInfoTypes_Common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GBDeviceInfoTypes_Common.h; sourceTree = "<group>"; };
@@ -12187,6 +12195,8 @@
 			isa = PBXGroup;
 			children = (
 				BB6AAF512C2175A3009C4CB1 /* KMEditPDFPopToolBarController.swift */,
+				BB5EC3602C2BDC9D0090EF27 /* KMTextAlignmentController.swift */,
+				BB5EC3612C2BDC9D0090EF27 /* KMTextAlignmentController.xib */,
 				BB6AAF522C2175A3009C4CB1 /* KMEditPDFPopToolBarController.xib */,
 			);
 			path = Controller;
@@ -14634,6 +14644,7 @@
 				BBA8B7A62935CD740097D183 /* KMRemovePasswordAlertWindowController.xib in Resources */,
 				BB51074229A61B4100978662 /* ProgressSheet.xib in Resources */,
 				BBA922382B4E97540061057A /* KMPurchaseFirstTrialWindowController.xib in Resources */,
+				BB5EC3652C2BDC9D0090EF27 /* KMTextAlignmentController.xib in Resources */,
 				BB42A5D82B8ED7960092C524 /* KMTabbingHintWindowController.xib in Resources */,
 				ADE86AA82B031FFA00414DFA /* KMCompareView.xib in Resources */,
 				9F512CCA2B4640AB00EC0BC3 /* KMPageDisplayCustomThemesCollectionViewItem.xib in Resources */,
@@ -14989,6 +15000,7 @@
 				BBEC00C3295C306400A26C98 /* KMBatesPropertyController.xib in Resources */,
 				BB897262294C5DDA0045787C /* KMWatermarkPropertyInfoController.xib in Resources */,
 				9FDD0F68294AB645000C4DAD /* KMMainViewController.xib in Resources */,
+				BB5EC3662C2BDC9D0090EF27 /* KMTextAlignmentController.xib in Resources */,
 				BBB3769F2B10A7FD009539CC /* a_4a.png in Resources */,
 				BBF811E52B0717970074874F /* KMExtractImageWindowController.xib in Resources */,
 				BBADCF652AF3CB92004ECE0C /* KMWatermarkCollectionViewItem.xib in Resources */,
@@ -15703,6 +15715,7 @@
 				BB897263294C5DDA0045787C /* KMWatermarkPropertyInfoController.xib in Resources */,
 				BBA9223A2B4E97540061057A /* KMPurchaseFirstTrialWindowController.xib in Resources */,
 				ADE86AC52B034C7100414DFA /* KMBackgroundWindowController.xib in Resources */,
+				BB5EC3672C2BDC9D0090EF27 /* KMTextAlignmentController.xib in Resources */,
 				BB42A5DC2B8F0F8C0092C524 /* KMTabbingHintWindowController.xib in Resources */,
 				BBB376A92B10A7FD009539CC /* a_3b.png in Resources */,
 				9F512CCC2B4640AB00EC0BC3 /* KMPageDisplayCustomThemesCollectionViewItem.xib in Resources */,
@@ -16833,6 +16846,7 @@
 				ADFCEB322B4F78150001EBAF /* KMFileManager.swift in Sources */,
 				AD1FE8322BD7C98300AA4A9B /* NSMutableArray+KMOddEvenPartFetch.m in Sources */,
 				ADE86AD62B05A52B00414DFA /* KMCompareFilesConfig.swift in Sources */,
+				BB5EC3622C2BDC9D0090EF27 /* KMTextAlignmentController.swift in Sources */,
 				BB147047299DC0D200784A6A /* OIDServiceConfiguration.m in Sources */,
 				BB89726D294DB67D0045787C /* KMWatermarkAdjectiveBaseView.swift in Sources */,
 				9F1FE4FF29406E4700E952CA /* CTTabStripModel.m in Sources */,
@@ -17788,6 +17802,7 @@
 				BB1B0ACF2B4FC6E900889528 /* KMFunctionGuideMultiController.swift in Sources */,
 				BB4DD04C299B296500E80DF6 /* KMCloudPathControl.swift in Sources */,
 				BBB789852BE8BF2300F7E09C /* AIChatInfoManager.swift in Sources */,
+				BB5EC3632C2BDC9D0090EF27 /* KMTextAlignmentController.swift in Sources */,
 				AD867F9129D9554F00F00440 /* KMBOTAOutlineItem.swift in Sources */,
 				BB2A984B2B26A99A00647AF3 /* KMBatchAddWatermarkOperation.swift in Sources */,
 				BB0FE0472B734DD1001E0F88 /* AIInfoConfig.swift in Sources */,
@@ -19261,6 +19276,7 @@
 				9F512CC92B4640AB00EC0BC3 /* KMPageDisplayCustomThemesCollectionViewItem.swift in Sources */,
 				AD1FE8342BD7C98300AA4A9B /* NSMutableArray+KMOddEvenPartFetch.m in Sources */,
 				BBFDFA962AF328BA00E08AA2 /* KMBatchOperateManager.swift in Sources */,
+				BB5EC3642C2BDC9D0090EF27 /* KMTextAlignmentController.swift in Sources */,
 				9FF94F1B29A770B500B1EF69 /* KMFillSignShapePanel.swift in Sources */,
 				BBA5429E29F13A140041BAD0 /* KMMemorandumPattern.swift in Sources */,
 				BB1BFF882AEA30B1003EB179 /* NSWindow+PopOver.swift in Sources */,