Browse Source

【2025】【综合】提取功能补充

niehaoyu 3 tuần trước cách đây
mục cha
commit
bfd69a254c

+ 367 - 0
PDF Office/PDF Master/Class/PDFTools/Extract/KMExtractWindowController.swift

@@ -0,0 +1,367 @@
+//
+//  KMExtractWindowController.swift
+//  PDF Reader Pro
+//
+//  Created by kdanmobile on 2025/2/28.
+//
+
+import Cocoa
+import KMComponentLibrary
+import ComPDFKit
+
+class KMExtractWindowController: KMNBaseWindowController {
+    
+    @IBOutlet var contendBox: NSBox!
+    @IBOutlet var titleLabel: NSTextField!
+    
+    @IBOutlet var previewBGView: NSView!
+    @IBOutlet var pdfBGView: NSView!
+    
+    @IBOutlet var paginationView: ComponentPagination!
+    
+    @IBOutlet var pageRangeView: NSView!
+    @IBOutlet var pageRangeLabel: NSTextField!
+    @IBOutlet var allPageRadio: ComponentRadio!
+    @IBOutlet var currentPageRadio: ComponentRadio!
+    @IBOutlet var oddPageRadio: ComponentRadio!
+    @IBOutlet var evenPageRadio: ComponentRadio!
+    @IBOutlet var customPageRadio: ComponentRadio!
+    @IBOutlet var customPageInput: ComponentInput!
+    
+    @IBOutlet var settingView: NSView!
+    @IBOutlet var settingLabel: NSTextField!
+    @IBOutlet var eachPageCheckbox: ComponentCheckBox!
+    
+    @IBOutlet var cancelButton: ComponentButton!
+    @IBOutlet var confirmButton: ComponentButton!
+    
+    var fileURL: URL?
+    var pdfDocument: CPDFDocument?
+    var pdfView: CPDFListView = CPDFListView.init()
+    
+    var typeIndex: Int = 1
+    
+    override func windowDidLoad() {
+        super.windowDidLoad()
+        
+        // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
+        
+        pdfView.frame = pdfBGView.bounds
+        pdfView.autoresizingMask = [.width, .height]
+        pdfView.setDisplay(.singlePage)
+        pdfView.toolMode = .CNoteToolMode
+        pdfView.autoScales = true
+        pdfView.delegate = self
+        pdfView.pdfListViewDelegate = self
+        pdfBGView.addSubview(pdfView)
+        
+        reloadData()
+    }
+    
+    override func initContentView() {
+        super.initContentView()
+        
+        guard let _ = self.contendBox else {
+            return
+        }
+        
+        paginationView.properties = ComponentPaginationProperty(doubleArrow_show: false)
+        
+        allPageRadio.properties = ComponentCheckBoxProperty(size: .s,
+                                                            state: .normal,
+                                                            isDisabled: false,
+                                                            showhelp: false,
+                                                            text: KMLocalizedString("All Pages"),
+                                                            checkboxType: .normal)
+        
+        currentPageRadio.properties = ComponentCheckBoxProperty(size: .s,
+                                                                state: .normal,
+                                                                isDisabled: false,
+                                                                showhelp: false,
+                                                                text: KMLocalizedString("Current Page"),
+                                                                checkboxType: .normal)
+        
+        oddPageRadio.properties = ComponentCheckBoxProperty(size: .s,
+                                                            state: .normal,
+                                                            isDisabled: false,
+                                                            showhelp: false,
+                                                            text: KMLocalizedString("Odd Pages Only"),
+                                                            checkboxType: .normal)
+        
+        evenPageRadio.properties = ComponentCheckBoxProperty(size: .s,
+                                                             state: .normal,
+                                                             isDisabled: false,
+                                                             showhelp: false,
+                                                             text: KMLocalizedString("Even Pages Only"),
+                                                             checkboxType: .normal)
+        
+        customPageRadio.properties = ComponentCheckBoxProperty(size: .s,
+                                                               state: .normal,
+                                                               isDisabled: false,
+                                                               showhelp: false,
+                                                               text: KMLocalizedString("Custom"),
+                                                               checkboxType: .normal)
+        
+        customPageInput.properties = ComponentInputProperty(size: .s,
+                                                            state:.normal,
+                                                            isDisabled: true,
+                                                            placeholder: KMLocalizedString("e.g. 1,3-5,10"),
+                                                            text: "",
+                                                            creatable: true,
+                                                            regexString: "0123456789,-")
+        
+        eachPageCheckbox.properties = ComponentCheckBoxProperty(size: .s,
+                                                                state: .normal,
+                                                                isDisabled: false,
+                                                                showhelp: false,
+                                                                text: KMLocalizedString("Each page as a separate page"),
+                                                                checkboxType: .normal)
+        
+        for box in [allPageRadio, currentPageRadio, oddPageRadio, evenPageRadio, customPageRadio] {
+            box?.setTarget(self, action: #selector(checkBoxClicked(_:)))
+        }
+        
+        cancelButton.properties = ComponentButtonProperty(type: .default_tertiary,
+                                                          size: .s,
+                                                          state: .normal,
+                                                          buttonText: KMLocalizedString("Cancel"),
+                                                          keepPressState: false)
+        cancelButton.setTarget(self, action: #selector(cancelButtonClicked(_ :)))
+        cancelButton.keyEquivalent = KMKeyEquivalent.esc.string()
+        
+        confirmButton.properties = ComponentButtonProperty(type: .primary,
+                                                           size: .s,
+                                                           state: .normal,
+                                                           buttonText: KMLocalizedString("Extract"),
+                                                           keepPressState: false)
+        confirmButton.setTarget(self, action: #selector(openButtonClicked(_ :)))
+        confirmButton.keyEquivalent = KMKeyEquivalent.enter // Enter key
+    }
+    
+    override func updateUIThemeColor() {
+        super.updateUIThemeColor()
+        
+        self.reloadUI()
+    }
+    
+    override func updateUILanguage() {
+        super.updateUILanguage()
+        
+        self.reloadUI()
+    }
+    
+    override func beginSheetFinish() {
+        super.beginSheetFinish()
+ 
+        typeIndex = 1
+        
+        self.initContentView()
+        
+        reloadData()
+        
+        loadPDFPreview()
+        
+        self.window?.makeFirstResponder(nil)
+    }
+    
+    //
+    func reloadUI() {
+        guard let _ = self.contendBox else {
+            return
+        }
+        
+        previewBGView.wantsLayer = true
+        previewBGView.layer?.cornerRadius = 8
+        previewBGView.layer?.borderWidth = 1
+        previewBGView.layer?.backgroundColor = ComponentLibrary.shared.getComponentColorFromKey("colorFill/4").cgColor
+        previewBGView.layer?.borderColor = ComponentLibrary.shared.getComponentColorFromKey("colorBorder/4").cgColor
+        
+        titleLabel.stringValue = KMLocalizedString("Extract")
+        titleLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/1")
+        titleLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-m-medium")
+        
+        pageRangeLabel.stringValue = KMLocalizedString("Page Range")
+        pageRangeLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/2")
+        pageRangeLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
+        
+        settingLabel.stringValue = KMLocalizedString("Settings")
+        settingLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/2")
+        settingLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
+         
+    }
+    
+    func loadPDFPreview() {
+        guard let filePath = fileURL else {
+            return
+        }
+        
+        NSWindowController.checkPassword(url: filePath, type: .owner, password: "") { [unowned self] success, resultPassword in
+            if success {
+                DispatchQueue.main.async {
+                    self.pdfDocument = CPDFDocument.init(url: filePath)
+                    if resultPassword.isEmpty == false {
+                        self.pdfDocument?.unlock(withPassword: resultPassword)
+                    }
+                    
+                    self.pdfView.document = self.pdfDocument
+                    
+                    self.paginationView.properties.currentIndex = 1
+                    self.paginationView.properties.totalCount = Int(self.pdfDocument?.pageCount ?? 1 )
+                    self.paginationView.reloadData()
+                }
+            }
+        }
+    }
+    
+    func reloadData() {
+        allPageRadio.properties.checkboxType = .normal
+        currentPageRadio.properties.checkboxType = .normal
+        oddPageRadio.properties.checkboxType = .normal
+        evenPageRadio.properties.checkboxType = .normal
+        customPageRadio.properties.checkboxType = .normal
+        customPageInput.properties.isDisabled = true
+        
+        if typeIndex == 0 {
+            allPageRadio.properties.checkboxType = .selected
+        } else if typeIndex == 1 {
+            currentPageRadio.properties.checkboxType = .selected
+        } else if typeIndex == 2 {
+            oddPageRadio.properties.checkboxType = .selected
+        } else if typeIndex == 3 {
+            evenPageRadio.properties.checkboxType = .selected
+        } else if typeIndex == 4 {
+            customPageRadio.properties.checkboxType = .selected
+            customPageInput.properties.isDisabled = false
+         }
+        allPageRadio.reloadData()
+        currentPageRadio.reloadData()
+        oddPageRadio.reloadData()
+        evenPageRadio.reloadData()
+        customPageRadio.reloadData()
+        
+        customPageInput.reloadData()
+        
+        
+    }
+    
+    //MARK: - Action
+    @objc func checkBoxClicked(_ sender: ComponentCheckBox) {
+        if sender == self.allPageRadio {
+            self.typeIndex = 0
+        } else if sender == self.currentPageRadio {
+            self.typeIndex = 1
+        } else if sender == self.oddPageRadio {
+            self.typeIndex = 2
+        } else if sender == self.evenPageRadio {
+            self.typeIndex = 3
+        } else if sender == self.customPageRadio {
+            self.typeIndex = 4
+        }
+        
+        reloadData()
+    }
+    
+    @objc func cancelButtonClicked(_ sender: NSView) {
+        self.own_closeEndSheet()
+        
+    }
+    
+    @objc func openButtonClicked(_ sender: NSView) {
+        guard let pdfDocument = self.pdfDocument else {
+            return
+        }
+        
+        var pageIndexs: [Int] = []
+        
+        if typeIndex == 0 {
+            pageIndexs = KMPageRangeSelectView.getSelectedPageIndex(pdfDocument, isAllPages: true)
+        } else if typeIndex == 1 {
+            pageIndexs = [self.pdfView.currentPageIndex + 1]
+        } else if typeIndex == 2 {
+            pageIndexs = KMPageRangeSelectView.getSelectedPageIndex(pdfDocument, isOddPage: true)
+        } else if typeIndex == 3 {
+            pageIndexs = KMPageRangeSelectView.getSelectedPageIndex(pdfDocument, isEvenPage: true)
+        } else if typeIndex == 4 {
+            if customPageInput.properties.text.isEmpty == true {
+                let alert = NSAlert()
+                alert.alertStyle = .warning
+                alert.messageText = KMLocalizedString("Invalid page range .", comment: "")
+                alert.runModal()
+                
+                return
+            }
+            pageIndexs = KMPageRangeSelectView.getSelectedPageIndex(pdfDocument, isCustom: customPageInput.properties.text)
+        }
+        
+        if pageIndexs.count < 1 {
+            let alert = NSAlert()
+            alert.alertStyle = .warning
+            alert.messageText = KMLocalizedString("Invalid page range .", comment: "")
+            alert.runModal()
+            
+            return
+        }
+        
+        var resultIndexs: [Int] = []
+        for i in pageIndexs {
+            resultIndexs.append(i - 1)
+        }
+        
+        var fileName = pdfDocument.documentURL.deletingPathExtension().lastPathComponent
+        if self.eachPageCheckbox.properties.checkboxType == .normal {
+            fileName.append(" pages ")
+            fileName.append(KMPageRangeTools.newParseSelectedIndexs(selectedIndex: resultIndexs.sorted()))
+            fileName.append(".pdf")
+            
+            let panel = NSSavePanel()
+            panel.nameFieldStringValue = fileName
+            panel.canCreateDirectories = true
+            panel.beginSheetModal(for: self.window!) {  response in
+                if response == .OK {
+                    if let pdf = CPDFDocument.init() {
+                        var extractPages: Array<CPDFPage> = []
+                        for i in resultIndexs {
+                            extractPages.append(pdfDocument.page(at: UInt(i)))
+                        }
+                        let _ = pdf.extractAsOneDocument(withPages: extractPages, savePath: panel.url!.path)
+                        self.own_closeEndSheet()
+                        NSWorkspace.shared.activateFileViewerSelecting([panel.url!])
+                    }
+                }
+            }
+        } else {
+            let panel = NSOpenPanel()
+            panel.canChooseFiles = false
+            panel.canChooseDirectories = true
+            panel.canCreateDirectories = true
+            panel.allowsMultipleSelection = false
+            panel.beginSheetModal(for: self.window!) {  response in
+                if response == .OK {
+                    let outputURL = panel.url
+                    DispatchQueue.global().async {
+                        let folderName = String((pdfDocument.documentURL!.lastPathComponent.split(separator: ".")[0])) + "_extract"
+                        
+                        var filePath = URL(fileURLWithPath: outputURL!.path).appendingPathComponent(folderName).path
+                        var i = 1
+                        let testFilePath = filePath
+                        while FileManager.default.fileExists(atPath: filePath) {
+                            filePath = testFilePath + "\(i)"
+                            i += 1
+                        }
+                        try? FileManager.default.createDirectory(atPath: filePath, withIntermediateDirectories: false, attributes: nil)
+                        pdfDocument.extractPages(resultIndexs, oneDocumentPerPage: true, to: filePath)
+                    }
+                }
+            }
+        }
+    }
+}
+
+extension KMExtractWindowController: CPDFListViewDelegate, CPDFViewDelegate {
+    func pdfViewCurrentPageDidChanged(_ pdfView: CPDFView!) {
+        let index = pdfView.currentPageIndex
+        
+        paginationView.properties.currentIndex = index + 1
+        paginationView.reloadData()
+    }
+}

+ 276 - 0
PDF Office/PDF Master/Class/PDFTools/Extract/KMExtractWindowController.xib

@@ -0,0 +1,276 @@
+<?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="KMExtractWindowController" customModule="PDF_Reader_Pro" customModuleProvider="target">
+            <connections>
+                <outlet property="allPageRadio" destination="3fH-AA-9Cp" id="fNT-V5-bAU"/>
+                <outlet property="cancelButton" destination="fOE-Iq-Bhy" id="iXK-iP-fHV"/>
+                <outlet property="confirmButton" destination="DHV-lP-SmO" id="7Yh-5F-R69"/>
+                <outlet property="contendBox" destination="VYF-CX-PBe" id="kxN-yQ-JMS"/>
+                <outlet property="currentPageRadio" destination="an8-PG-u5C" id="2wj-F5-6eb"/>
+                <outlet property="customPageInput" destination="EgP-dz-Rf5" id="6ka-rA-pKs"/>
+                <outlet property="customPageRadio" destination="oXM-oB-nBk" id="Yqx-Nd-hbX"/>
+                <outlet property="eachPageCheckbox" destination="JNO-pf-EsN" id="3Lw-Ng-eKI"/>
+                <outlet property="evenPageRadio" destination="LKc-d8-pd0" id="vq4-Fr-EQe"/>
+                <outlet property="oddPageRadio" destination="irM-BQ-2IN" id="6J6-oD-B8D"/>
+                <outlet property="pageRangeLabel" destination="jnL-dG-2k9" id="rXH-vY-UEj"/>
+                <outlet property="pageRangeView" destination="Lxl-GD-S39" id="2WR-EO-rOa"/>
+                <outlet property="paginationView" destination="BMJ-10-aQi" id="25r-Eh-33h"/>
+                <outlet property="pdfBGView" destination="M0v-GW-T5v" id="0rC-WS-PuZ"/>
+                <outlet property="previewBGView" destination="22m-Gb-xTn" id="t9Y-Os-gxT"/>
+                <outlet property="settingLabel" destination="Xx1-mU-snu" id="CEj-sc-UNW"/>
+                <outlet property="settingView" destination="dUI-Fk-sve" id="rx0-q1-K1E"/>
+                <outlet property="titleLabel" destination="Vnc-6n-IE9" id="4jg-DL-h8c"/>
+                <outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/>
+            </connections>
+        </customObject>
+        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
+        <window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="F0z-JX-Cv5">
+            <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES" fullSizeContentView="YES"/>
+            <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
+            <rect key="contentRect" x="196" y="240" width="584" height="476"/>
+            <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
+            <value key="minSize" type="size" width="584" height="476"/>
+            <value key="maxSize" type="size" width="584" height="476"/>
+            <view key="contentView" id="se5-gp-TjO">
+                <rect key="frame" x="0.0" y="0.0" width="584" height="476"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="VYF-CX-PBe">
+                        <rect key="frame" x="0.0" y="0.0" width="584" height="476"/>
+                        <view key="contentView" id="RF3-UM-bfv">
+                            <rect key="frame" x="0.0" y="0.0" width="584" height="476"/>
+                            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                            <subviews>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="c5v-V1-jaq">
+                                    <rect key="frame" x="0.0" y="432" width="584" height="44"/>
+                                    <subviews>
+                                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Vnc-6n-IE9">
+                                            <rect key="frame" x="22" y="14" width="47" height="16"/>
+                                            <textFieldCell key="cell" lineBreakMode="clipping" title="Extract" id="d9D-bX-Dhq">
+                                                <font key="font" usesAppearanceFont="YES"/>
+                                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                            </textFieldCell>
+                                        </textField>
+                                    </subviews>
+                                    <constraints>
+                                        <constraint firstItem="Vnc-6n-IE9" firstAttribute="centerY" secondItem="c5v-V1-jaq" secondAttribute="centerY" id="Ix0-X6-8QY"/>
+                                        <constraint firstItem="Vnc-6n-IE9" firstAttribute="leading" secondItem="c5v-V1-jaq" secondAttribute="leading" constant="24" id="JP8-9P-ndq"/>
+                                        <constraint firstAttribute="height" constant="44" id="dSK-oW-j6d"/>
+                                    </constraints>
+                                </customView>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="hNW-fJ-11J">
+                                    <rect key="frame" x="280" y="72" width="280" height="352"/>
+                                    <subviews>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="Lxl-GD-S39">
+                                            <rect key="frame" x="0.0" y="120" width="280" height="232"/>
+                                            <subviews>
+                                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="sfe-jx-VBs">
+                                                    <rect key="frame" x="0.0" y="192" width="280" height="40"/>
+                                                    <subviews>
+                                                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="jnL-dG-2k9">
+                                                            <rect key="frame" x="-2" y="12" width="77" height="16"/>
+                                                            <textFieldCell key="cell" lineBreakMode="clipping" title="Page Range" id="JsU-Dv-2sg">
+                                                                <font key="font" usesAppearanceFont="YES"/>
+                                                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                                                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                                            </textFieldCell>
+                                                        </textField>
+                                                    </subviews>
+                                                    <constraints>
+                                                        <constraint firstItem="jnL-dG-2k9" firstAttribute="centerY" secondItem="sfe-jx-VBs" secondAttribute="centerY" id="VIg-p9-lDw"/>
+                                                        <constraint firstAttribute="height" constant="40" id="Ys6-MC-k5O"/>
+                                                        <constraint firstItem="jnL-dG-2k9" firstAttribute="leading" secondItem="sfe-jx-VBs" secondAttribute="leading" id="ew5-cj-h8X"/>
+                                                    </constraints>
+                                                </customView>
+                                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="3fH-AA-9Cp" customClass="ComponentRadio" customModule="KMComponentLibrary">
+                                                    <rect key="frame" x="0.0" y="160" width="232" height="32"/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="width" constant="232" id="04z-fM-Ddd"/>
+                                                        <constraint firstAttribute="height" constant="32" id="R3M-Qg-GEN"/>
+                                                    </constraints>
+                                                </customView>
+                                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="an8-PG-u5C" customClass="ComponentRadio" customModule="KMComponentLibrary">
+                                                    <rect key="frame" x="0.0" y="128" width="232" height="32"/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="height" constant="32" id="kmU-CB-Z6x"/>
+                                                        <constraint firstAttribute="width" constant="232" id="zcJ-ub-ae5"/>
+                                                    </constraints>
+                                                </customView>
+                                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="irM-BQ-2IN" customClass="ComponentRadio" customModule="KMComponentLibrary">
+                                                    <rect key="frame" x="0.0" y="96" width="232" height="32"/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="width" constant="232" id="4az-yN-oC3"/>
+                                                        <constraint firstAttribute="height" constant="32" id="Q6T-Lq-uJ5"/>
+                                                    </constraints>
+                                                </customView>
+                                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="LKc-d8-pd0" customClass="ComponentRadio" customModule="KMComponentLibrary">
+                                                    <rect key="frame" x="0.0" y="64" width="232" height="32"/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="width" constant="232" id="URq-Nc-ilf"/>
+                                                        <constraint firstAttribute="height" constant="32" id="YN4-hL-KGA"/>
+                                                    </constraints>
+                                                </customView>
+                                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="oXM-oB-nBk" customClass="ComponentRadio" customModule="KMComponentLibrary">
+                                                    <rect key="frame" x="0.0" y="32" width="232" height="32"/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="width" constant="232" id="23b-tY-iGy"/>
+                                                        <constraint firstAttribute="height" constant="32" id="5pt-Hc-fef"/>
+                                                    </constraints>
+                                                </customView>
+                                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="EgP-dz-Rf5" customClass="ComponentInput" customModule="KMComponentLibrary">
+                                                    <rect key="frame" x="0.0" y="0.0" width="232" height="32"/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="height" constant="32" id="Ugw-Gr-TFj"/>
+                                                        <constraint firstAttribute="width" constant="232" id="iUZ-lK-f51"/>
+                                                    </constraints>
+                                                </customView>
+                                            </subviews>
+                                            <constraints>
+                                                <constraint firstItem="irM-BQ-2IN" firstAttribute="leading" secondItem="Lxl-GD-S39" secondAttribute="leading" id="10G-Yo-Cau"/>
+                                                <constraint firstAttribute="width" constant="280" id="1KZ-nZ-w0U"/>
+                                                <constraint firstItem="an8-PG-u5C" firstAttribute="top" secondItem="3fH-AA-9Cp" secondAttribute="bottom" id="1i5-48-MyG"/>
+                                                <constraint firstItem="oXM-oB-nBk" firstAttribute="top" secondItem="LKc-d8-pd0" secondAttribute="bottom" id="931-mt-as1"/>
+                                                <constraint firstItem="an8-PG-u5C" firstAttribute="leading" secondItem="Lxl-GD-S39" secondAttribute="leading" id="Bvf-Pc-2hL"/>
+                                                <constraint firstItem="EgP-dz-Rf5" firstAttribute="leading" secondItem="Lxl-GD-S39" secondAttribute="leading" id="G42-Tl-fgB"/>
+                                                <constraint firstItem="sfe-jx-VBs" firstAttribute="leading" secondItem="Lxl-GD-S39" secondAttribute="leading" id="K8b-0J-2f0"/>
+                                                <constraint firstItem="3fH-AA-9Cp" firstAttribute="leading" secondItem="Lxl-GD-S39" secondAttribute="leading" id="KZC-ep-vEP"/>
+                                                <constraint firstAttribute="height" constant="232" id="OJi-vE-Nye"/>
+                                                <constraint firstItem="sfe-jx-VBs" firstAttribute="top" secondItem="Lxl-GD-S39" secondAttribute="top" id="Usd-Sy-Yas"/>
+                                                <constraint firstItem="LKc-d8-pd0" firstAttribute="top" secondItem="irM-BQ-2IN" secondAttribute="bottom" id="eJH-re-5sM"/>
+                                                <constraint firstItem="oXM-oB-nBk" firstAttribute="leading" secondItem="Lxl-GD-S39" secondAttribute="leading" id="mKc-y3-Gw7"/>
+                                                <constraint firstAttribute="trailing" secondItem="sfe-jx-VBs" secondAttribute="trailing" id="oyE-ut-nd6"/>
+                                                <constraint firstItem="EgP-dz-Rf5" firstAttribute="top" secondItem="oXM-oB-nBk" secondAttribute="bottom" id="r3y-G6-XZ5"/>
+                                                <constraint firstItem="irM-BQ-2IN" firstAttribute="top" secondItem="an8-PG-u5C" secondAttribute="bottom" id="udy-9y-qhw"/>
+                                                <constraint firstItem="LKc-d8-pd0" firstAttribute="leading" secondItem="Lxl-GD-S39" secondAttribute="leading" id="vcS-bJ-sOk"/>
+                                                <constraint firstItem="3fH-AA-9Cp" firstAttribute="top" secondItem="sfe-jx-VBs" secondAttribute="bottom" id="zJS-ZN-PFU"/>
+                                            </constraints>
+                                        </customView>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="dUI-Fk-sve">
+                                            <rect key="frame" x="0.0" y="0.0" width="280" height="104"/>
+                                            <subviews>
+                                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="iJY-Gp-pgd">
+                                                    <rect key="frame" x="0.0" y="64" width="280" height="40"/>
+                                                    <subviews>
+                                                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Xx1-mU-snu">
+                                                            <rect key="frame" x="-2" y="12" width="55" height="16"/>
+                                                            <textFieldCell key="cell" lineBreakMode="clipping" title="Settings" id="Wzb-HD-qdh">
+                                                                <font key="font" usesAppearanceFont="YES"/>
+                                                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                                                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                                            </textFieldCell>
+                                                        </textField>
+                                                    </subviews>
+                                                    <constraints>
+                                                        <constraint firstAttribute="height" constant="40" id="6Bb-ga-lxL"/>
+                                                        <constraint firstItem="Xx1-mU-snu" firstAttribute="leading" secondItem="iJY-Gp-pgd" secondAttribute="leading" id="XXB-6I-vl8"/>
+                                                        <constraint firstItem="Xx1-mU-snu" firstAttribute="centerY" secondItem="iJY-Gp-pgd" secondAttribute="centerY" id="w8a-0E-le7"/>
+                                                    </constraints>
+                                                </customView>
+                                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="JNO-pf-EsN" customClass="ComponentCheckBox" customModule="KMComponentLibrary">
+                                                    <rect key="frame" x="0.0" y="32" width="232" height="32"/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="width" constant="232" id="rqw-Lu-p0G"/>
+                                                        <constraint firstAttribute="height" constant="32" id="wgE-ou-bHF"/>
+                                                    </constraints>
+                                                </customView>
+                                            </subviews>
+                                            <constraints>
+                                                <constraint firstAttribute="height" constant="104" id="AqG-PZ-BZG"/>
+                                                <constraint firstAttribute="trailing" secondItem="iJY-Gp-pgd" secondAttribute="trailing" id="Hkf-Co-i1f"/>
+                                                <constraint firstAttribute="width" constant="280" id="IVT-be-aYo"/>
+                                                <constraint firstItem="JNO-pf-EsN" firstAttribute="leading" secondItem="dUI-Fk-sve" secondAttribute="leading" id="b0i-zP-KdE"/>
+                                                <constraint firstItem="iJY-Gp-pgd" firstAttribute="leading" secondItem="dUI-Fk-sve" secondAttribute="leading" id="cOL-dE-vm1"/>
+                                                <constraint firstItem="JNO-pf-EsN" firstAttribute="top" secondItem="iJY-Gp-pgd" secondAttribute="bottom" id="hmS-hr-7tB"/>
+                                                <constraint firstItem="iJY-Gp-pgd" firstAttribute="top" secondItem="dUI-Fk-sve" secondAttribute="top" id="uFk-Fu-fA6"/>
+                                            </constraints>
+                                        </customView>
+                                    </subviews>
+                                    <constraints>
+                                        <constraint firstAttribute="width" constant="280" id="H2r-Da-PtI"/>
+                                        <constraint firstAttribute="height" constant="352" id="diY-sd-o8g"/>
+                                        <constraint firstItem="dUI-Fk-sve" firstAttribute="centerX" secondItem="hNW-fJ-11J" secondAttribute="centerX" id="eB2-NE-rOd"/>
+                                        <constraint firstItem="dUI-Fk-sve" firstAttribute="top" secondItem="Lxl-GD-S39" secondAttribute="bottom" constant="16" id="jgY-p2-iKd"/>
+                                        <constraint firstItem="Lxl-GD-S39" firstAttribute="top" secondItem="hNW-fJ-11J" secondAttribute="top" id="oPm-Yg-A6R"/>
+                                        <constraint firstItem="Lxl-GD-S39" firstAttribute="centerX" secondItem="hNW-fJ-11J" secondAttribute="centerX" id="zuN-8q-8mM"/>
+                                    </constraints>
+                                </customView>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="22m-Gb-xTn">
+                                    <rect key="frame" x="24" y="86" width="232" height="338"/>
+                                    <subviews>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="BMJ-10-aQi" customClass="ComponentPagination" customModule="KMComponentLibrary">
+                                            <rect key="frame" x="30" y="16" width="173" height="24"/>
+                                            <constraints>
+                                                <constraint firstAttribute="height" constant="24" id="unI-La-Qe5"/>
+                                                <constraint firstAttribute="width" constant="173" id="vys-VF-Vc6"/>
+                                            </constraints>
+                                        </customView>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="M0v-GW-T5v">
+                                            <rect key="frame" x="16" y="56" width="200" height="266"/>
+                                            <constraints>
+                                                <constraint firstAttribute="height" constant="266" id="lFY-z1-CMO"/>
+                                                <constraint firstAttribute="width" constant="200" id="mzc-US-Ztt"/>
+                                            </constraints>
+                                        </customView>
+                                    </subviews>
+                                    <constraints>
+                                        <constraint firstItem="M0v-GW-T5v" firstAttribute="top" secondItem="22m-Gb-xTn" secondAttribute="top" constant="16" id="BVG-vx-fpg"/>
+                                        <constraint firstAttribute="bottom" secondItem="BMJ-10-aQi" secondAttribute="bottom" constant="16" id="ROb-Ef-Kr1"/>
+                                        <constraint firstAttribute="width" constant="232" id="b2T-iN-Z8d"/>
+                                        <constraint firstAttribute="height" constant="338" id="jBc-Pg-YE3"/>
+                                        <constraint firstItem="M0v-GW-T5v" firstAttribute="centerX" secondItem="22m-Gb-xTn" secondAttribute="centerX" id="u69-9l-EEy"/>
+                                        <constraint firstItem="BMJ-10-aQi" firstAttribute="centerX" secondItem="22m-Gb-xTn" secondAttribute="centerX" id="xBh-gM-ZCJ"/>
+                                    </constraints>
+                                </customView>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="fOE-Iq-Bhy" customClass="ComponentButton" customModule="KMComponentLibrary">
+                                    <rect key="frame" x="313" y="16" width="95" height="38"/>
+                                    <constraints>
+                                        <constraint firstAttribute="width" constant="95" id="8DA-KW-mYg"/>
+                                        <constraint firstAttribute="height" constant="38" id="UPR-d1-852"/>
+                                    </constraints>
+                                </customView>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="DHV-lP-SmO" customClass="ComponentButton" customModule="KMComponentLibrary">
+                                    <rect key="frame" x="416" y="16" width="144" height="38"/>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="38" id="OGg-Pj-fTf"/>
+                                        <constraint firstAttribute="width" constant="144" id="ua5-YE-D7H"/>
+                                    </constraints>
+                                </customView>
+                            </subviews>
+                            <constraints>
+                                <constraint firstItem="22m-Gb-xTn" firstAttribute="top" secondItem="c5v-V1-jaq" secondAttribute="bottom" constant="8" id="AbB-1f-AHo"/>
+                                <constraint firstAttribute="trailing" secondItem="DHV-lP-SmO" secondAttribute="trailing" constant="24" id="Am1-fE-u9V"/>
+                                <constraint firstItem="c5v-V1-jaq" firstAttribute="leading" secondItem="RF3-UM-bfv" secondAttribute="leading" id="I1i-rV-1x8"/>
+                                <constraint firstItem="DHV-lP-SmO" firstAttribute="leading" secondItem="fOE-Iq-Bhy" secondAttribute="trailing" constant="8" id="PdD-jn-1i4"/>
+                                <constraint firstAttribute="bottom" secondItem="fOE-Iq-Bhy" secondAttribute="bottom" constant="16" id="QYT-Le-2nf"/>
+                                <constraint firstItem="hNW-fJ-11J" firstAttribute="leading" secondItem="22m-Gb-xTn" secondAttribute="trailing" constant="24" id="SbT-NA-4yU"/>
+                                <constraint firstAttribute="trailing" secondItem="c5v-V1-jaq" secondAttribute="trailing" id="b6y-xX-INq"/>
+                                <constraint firstItem="hNW-fJ-11J" firstAttribute="centerX" secondItem="RF3-UM-bfv" secondAttribute="centerX" constant="128" id="dnP-Ye-8ka"/>
+                                <constraint firstItem="c5v-V1-jaq" firstAttribute="top" secondItem="RF3-UM-bfv" secondAttribute="top" id="f7c-G5-XEu"/>
+                                <constraint firstItem="hNW-fJ-11J" firstAttribute="top" secondItem="c5v-V1-jaq" secondAttribute="bottom" constant="8" id="u7F-yZ-Wnc"/>
+                                <constraint firstAttribute="bottom" secondItem="DHV-lP-SmO" secondAttribute="bottom" constant="16" id="v3T-wY-5TH"/>
+                            </constraints>
+                        </view>
+                    </box>
+                </subviews>
+                <constraints>
+                    <constraint firstAttribute="bottom" secondItem="VYF-CX-PBe" secondAttribute="bottom" id="9qh-jf-2ht"/>
+                    <constraint firstItem="VYF-CX-PBe" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" id="H72-2K-cpn"/>
+                    <constraint firstAttribute="trailing" secondItem="VYF-CX-PBe" secondAttribute="trailing" id="MZX-X0-miA"/>
+                    <constraint firstItem="VYF-CX-PBe" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" id="lOS-jt-4G7"/>
+                </constraints>
+            </view>
+            <connections>
+                <outlet property="delegate" destination="-2" id="0bl-1N-AYu"/>
+            </connections>
+            <point key="canvasLocation" x="-32" y="157"/>
+        </window>
+    </objects>
+</document>

+ 5 - 5
PDF Office/PDF Master/Class/PDFTools/Extract/KMHomeExtractActionViewController.xib

@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMHomeExtractActionViewController" customModule="PDF_Office" customModuleProvider="target">
+        <customObject id="-2" userLabel="File's Owner" customClass="KMHomeExtractActionViewController" customModule="PDF_Reader_Pro" customModuleProvider="target">
             <connections>
                 <outlet property="extractionWayLabel" destination="3Wh-rG-eEj" id="sHD-U0-XDV"/>
                 <outlet property="isDeletePageBox" destination="UAz-E7-hTJ" id="6A2-Oc-BzO"/>
@@ -86,7 +86,7 @@
                         <constraint firstItem="3Wh-rG-eEj" firstAttribute="centerY" secondItem="SMb-Bk-mDb" secondAttribute="centerY" id="C4e-PY-wWR"/>
                     </constraints>
                 </box>
-                <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="XSP-rz-q1F" customClass="KMBox" customModule="PDF_Office" customModuleProvider="target">
+                <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="XSP-rz-q1F" customClass="KMBox" customModule="PDF_Reader_Pro" customModuleProvider="target">
                     <rect key="frame" x="0.0" y="102" width="465" height="24"/>
                     <view key="contentView" id="tGs-U7-Fc6">
                         <rect key="frame" x="0.0" y="0.0" width="465" height="24"/>
@@ -120,7 +120,7 @@
                         <constraint firstAttribute="height" constant="24" id="yet-3x-GQg"/>
                     </constraints>
                 </box>
-                <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="UAz-E7-hTJ" customClass="KMBox" customModule="PDF_Office" customModuleProvider="target">
+                <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="UAz-E7-hTJ" customClass="KMBox" customModule="PDF_Reader_Pro" customModuleProvider="target">
                     <rect key="frame" x="0.0" y="62" width="465" height="24"/>
                     <view key="contentView" id="KZx-aq-LwC">
                         <rect key="frame" x="0.0" y="0.0" width="465" height="24"/>

+ 18 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFDocumentExtensions/CPDFDocument+KMExtension.swift

@@ -94,6 +94,24 @@ extension CPDFDocument {
         }
         return self.km_insert(image: image, pageSize: pageSize, at: index)
     }
+    
+    //extract
+    func extractPages(_ pages: [Int], oneDocumentPerPage: Bool, to path: String) -> Bool {
+        let oneDocument = !oneDocumentPerPage
+        
+        var extractPages: Array<CPDFPage> = []
+        for i in pages {
+            extractPages.append(self.page(at: UInt(i)))
+        }
+        
+        var result = false
+        if (oneDocument) { /// 提取为一个文档
+            result = self.extractAsOneDocument(withPages: extractPages, savePath: path)
+        } else {
+            let _ = self.extractPerPageDocument(withPages: extractPages, folerPath: path)
+        }
+        return result
+    }
 }
 
 extension CPDFDocument {

+ 8 - 3
PDF Office/PDF Master/KMClass/KMHomeViewController/KMNHomeViewController.swift

@@ -31,6 +31,8 @@ class KMNHomeViewController: KMNBaseViewController {
     //合并
     var mergeWindowController: KMMergeWindowController?
     
+    var extrackWindowController: KMExtractWindowController?
+    
     override func viewDidLoad() {
         super.viewDidLoad()
         // Do view setup here.
@@ -820,10 +822,13 @@ extension KMNHomeViewController {
         openPanel.beginSheetModal(for: NSApp.mainWindow!) { result in
             if result == .OK {
                 DispatchQueue.main.asyncAfter(deadline: .now() + 0.25) {
-                    let insertWindowController: KMPDFInsertPageWindow = KMPDFInsertPageWindow.init(documentPath: openPanel.url!, toolType: .Extract)
-                    insertWindowController.beginSheetExtractModal(for: self.view.window!) { pdfDocument, pages, oneDocumentPerPage, isDeletePage in
-                        self.extractPageAction(pdfDocument, pages, oneDocumentPerPage, isDeletePage)
+                    if self.extrackWindowController == nil {
+                        self.extrackWindowController = KMExtractWindowController(windowNibName: "KMExtractWindowController")  
                     }
+                    self.extrackWindowController?.fileURL = openPanel.url
+                    self.extrackWindowController?.own_beginSheetModal(for: self.view.window, completionHandler: { result in
+                        
+                    })
                 }
             }
         }

+ 2 - 2
PDF Office/PDF Master/KMClass/KMPDFViewController/KMMainViewController.xib

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

+ 29 - 0
PDF Office/PDF Master/KMClass/Tools/CustomViews/KMPageRangeSelectView/KMPageRangeSelectView.swift

@@ -162,6 +162,35 @@ class KMPageRangeSelectView: NSView {
         return (pageIndex, pageRangeSelectIndex == 0)
     }
     
+    //获取页码信息,
+    static func getSelectedPageIndex(_ document: CPDFDocument, isAllPages allPage: Bool? = false, isOddPage oddPage: Bool? = false, isEvenPage evenPage: Bool? = false, isCustom customString: String? = nil) -> [Int] {
+        
+        let fileAttribute = KMNFileAttribute()
+        fileAttribute.pdfDocument = document
+        fileAttribute.password = document.password ?? ""
+        
+        if allPage == true {
+            fileAttribute.bAllPage = true
+            fileAttribute.pagesType = .AllPages
+            
+        } else if oddPage == true {
+            fileAttribute.bAllPage = false
+            fileAttribute.pagesType = .OnlyOdd
+            
+        } else if evenPage == true {
+            fileAttribute.bAllPage = false
+            fileAttribute.pagesType = .OnlyEven
+            
+        } else if let pageString = customString, pageString.isEmpty == false {
+            fileAttribute.bAllPage = false
+            fileAttribute.pagesType = .PagesString
+            fileAttribute.pagesString = pageString
+            
+        }
+        let pageIndex = fileAttribute.fetchSelectPages()
+        return (pageIndex)
+    }
+    
 }
 
 extension KMPageRangeSelectView: ComponentSelectDelegate {

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

@@ -3109,6 +3109,14 @@
 		BB9599CF2B3184440062D346 /* KMRedactSelectPagesWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB9599CE2B3184430062D346 /* KMRedactSelectPagesWindowController.xib */; };
 		BB9599D02B3184440062D346 /* KMRedactSelectPagesWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB9599CE2B3184430062D346 /* KMRedactSelectPagesWindowController.xib */; };
 		BB9599D12B3184440062D346 /* KMRedactSelectPagesWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB9599CE2B3184430062D346 /* KMRedactSelectPagesWindowController.xib */; };
+		BB95B3532D718D2600CA8228 /* KMExtractWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB95B3512D718D2600CA8228 /* KMExtractWindowController.swift */; };
+		BB95B3542D718D2600CA8228 /* KMExtractWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB95B3512D718D2600CA8228 /* KMExtractWindowController.swift */; };
+		BB95B3552D718D2600CA8228 /* KMExtractWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB95B3512D718D2600CA8228 /* KMExtractWindowController.swift */; };
+		BB95B3562D718D2600CA8228 /* KMExtractWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB95B3512D718D2600CA8228 /* KMExtractWindowController.swift */; };
+		BB95B3572D718D2600CA8228 /* KMExtractWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB95B3522D718D2600CA8228 /* KMExtractWindowController.xib */; };
+		BB95B3582D718D2600CA8228 /* KMExtractWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB95B3522D718D2600CA8228 /* KMExtractWindowController.xib */; };
+		BB95B3592D718D2600CA8228 /* KMExtractWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB95B3522D718D2600CA8228 /* KMExtractWindowController.xib */; };
+		BB95B35A2D718D2600CA8228 /* KMExtractWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB95B3522D718D2600CA8228 /* KMExtractWindowController.xib */; };
 		BB9695B629BDB03E00FD68D3 /* InfoWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB9695B529BDB03E00FD68D3 /* InfoWindow.xib */; };
 		BB9695B729BDB03E00FD68D3 /* InfoWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB9695B529BDB03E00FD68D3 /* InfoWindow.xib */; };
 		BB9695B829BDB03E00FD68D3 /* InfoWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB9695B529BDB03E00FD68D3 /* InfoWindow.xib */; };
@@ -7527,6 +7535,8 @@
 		BB9599C62B3164B40062D346 /* KMRedactPropertiesWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KMRedactPropertiesWindowController.xib; sourceTree = "<group>"; };
 		BB9599CA2B3184230062D346 /* KMRedactSelectPagesWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMRedactSelectPagesWindowController.swift; sourceTree = "<group>"; };
 		BB9599CE2B3184430062D346 /* KMRedactSelectPagesWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KMRedactSelectPagesWindowController.xib; sourceTree = "<group>"; };
+		BB95B3512D718D2600CA8228 /* KMExtractWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMExtractWindowController.swift; sourceTree = "<group>"; };
+		BB95B3522D718D2600CA8228 /* KMExtractWindowController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMExtractWindowController.xib; sourceTree = "<group>"; };
 		BB9695B529BDB03E00FD68D3 /* InfoWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = InfoWindow.xib; sourceTree = "<group>"; };
 		BB96A0AF2AFCD56100559E24 /* KMToolCompareWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMToolCompareWindowController.swift; sourceTree = "<group>"; };
 		BB96A0B32AFCD56B00559E24 /* KMToolCompareWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KMToolCompareWindowController.xib; sourceTree = "<group>"; };
@@ -8911,6 +8921,8 @@
 			children = (
 				9F1F82E12934D5240092C4B4 /* KMHomeExtractActionViewController.swift */,
 				9F1F82E22934D5240092C4B4 /* KMHomeExtractActionViewController.xib */,
+				BB95B3512D718D2600CA8228 /* KMExtractWindowController.swift */,
+				BB95B3522D718D2600CA8228 /* KMExtractWindowController.xib */,
 			);
 			path = Extract;
 			sourceTree = "<group>";
@@ -14828,6 +14840,7 @@
 				BB9BD0E62D65AF7000FADB43 /* KMRecommondPopWindow.xib in Resources */,
 				BBF71F452D5A06E60043FFA2 /* KMPDFPrintManageWindowController.xib in Resources */,
 				BB9BD07A2D65AC4800FADB43 /* newUserGuideAnnotation.gif in Resources */,
+				BB95B35A2D718D2600CA8228 /* KMExtractWindowController.xib in Resources */,
 				BBF71F462D5A06E60043FFA2 /* KMHomeQuickToolsView.xib in Resources */,
 				BBF71F472D5A06E60043FFA2 /* KMWatermarkSaveWindow.xib in Resources */,
 				BBF71F482D5A06E60043FFA2 /* FormsTextFieldController.xib in Resources */,
@@ -15350,6 +15363,7 @@
 				BB9BD0E32D65AF7000FADB43 /* KMRecommondPopWindow.xib in Resources */,
 				BB2F9AA62AFC8D5A00F9DD93 /* KMProfileInfoWindowController.xib in Resources */,
 				BB9BD0772D65AC4800FADB43 /* newUserGuideAnnotation.gif in Resources */,
+				BB95B3572D718D2600CA8228 /* KMExtractWindowController.xib in Resources */,
 				ADE86AFB2B0AF5A400414DFA /* KMCompareContentSettingView.xib in Resources */,
 				BBD14F622CDA16080077D52E /* KMWatermarkSaveWindow.xib in Resources */,
 				BB19A7632CB7CFBC008204DC /* KMHomeQuickToolsView.xib in Resources */,
@@ -16311,6 +16325,7 @@
 				BB9BD0E42D65AF7000FADB43 /* KMRecommondPopWindow.xib in Resources */,
 				F337CC402CC78B9400D46AF4 /* KMNThumbnailImage.xcassets in Resources */,
 				AD8B597D2D2B777700150EA6 /* KMBatchConverPDFWordView.xib in Resources */,
+				BB95B3582D718D2600CA8228 /* KMExtractWindowController.xib in Resources */,
 				BB79E71D2CE617CB0052CAD5 /* KMEditImageController.xib in Resources */,
 				9FF371DC2C69B937005F9CC5 /* CDistanceSettingWindowController.xib in Resources */,
 				BBB789972BE8BF2400F7E09C /* AIInfoInputView.xib in Resources */,
@@ -16423,6 +16438,7 @@
 				BB9BD0E52D65AF7000FADB43 /* KMRecommondPopWindow.xib in Resources */,
 				AD1FE83A2BD7C98300AA4A9B /* KMPDFPrintManageWindowController.xib in Resources */,
 				BB9BD0792D65AC4800FADB43 /* newUserGuideAnnotation.gif in Resources */,
+				BB95B3592D718D2600CA8228 /* KMExtractWindowController.xib in Resources */,
 				BB19A7652CB7CFBC008204DC /* KMHomeQuickToolsView.xib in Resources */,
 				BBD14F642CDA16080077D52E /* KMWatermarkSaveWindow.xib in Resources */,
 				BB9AEB2A2D0FC988004BF8D2 /* FormsTextFieldController.xib in Resources */,
@@ -17695,6 +17711,7 @@
 				BBF71E112D5A06E60043FFA2 /* KMOutlineEditViewController.swift in Sources */,
 				BBF71E122D5A06E60043FFA2 /* NSBitmapImageRep_KMExtension.swift in Sources */,
 				BBF71E132D5A06E60043FFA2 /* CPDFAnnotation+PDFListView.m in Sources */,
+				BB95B3562D718D2600CA8228 /* KMExtractWindowController.swift in Sources */,
 				BBF71E142D5A06E60043FFA2 /* KMBatchProcessingTableCell.swift in Sources */,
 				BB9BD0242D65A43A00FADB43 /* KMVerificationExpiredViewController.m in Sources */,
 				BBF71E152D5A06E60043FFA2 /* KMBGTemplateItem.swift in Sources */,
@@ -18689,6 +18706,7 @@
 				BBC5ABDF2D01C950008BA0CB /* KMSignatureController.swift in Sources */,
 				BB6013902AD3AFF000A76FB2 /* NSPopover+KMExtension.swift in Sources */,
 				BB2EDF79296ECE17003BCF58 /* KMPageEditThumbnailItem.swift in Sources */,
+				BB95B3532D718D2600CA8228 /* KMExtractWindowController.swift in Sources */,
 				BB9BD0212D65A43A00FADB43 /* KMVerificationExpiredViewController.m in Sources */,
 				65B1439E2CF06B97001B5A69 /* NSImage+Extension.swift in Sources */,
 				BB0FE04C2B734DD1001E0F88 /* AIPurchaseWindowController.swift in Sources */,
@@ -19226,6 +19244,7 @@
 				BB7FF5082A60E84400901C2D /* KMEnumExtensions.swift in Sources */,
 				65157B912D028EFA0005F3A8 /* KMNBotaAnnotationHeaderView.swift in Sources */,
 				BBBB6CCB2AD109F30035AA66 /* CPDFAnnotation+PDFListView.swift in Sources */,
+				BB95B3542D718D2600CA8228 /* KMExtractWindowController.swift in Sources */,
 				BB9BCDF62D65A3D800FADB43 /* KMEnterVerificationCodeView.swift in Sources */,
 				9FCFECA92AD243C900EAD2CB /* KMBlankView.swift in Sources */,
 				65B1439F2CF06B97001B5A69 /* NSImage+Extension.swift in Sources */,
@@ -20710,6 +20729,7 @@
 				651675E52CE3313500019A20 /* KMOutlineEditViewController.swift in Sources */,
 				9FB221102B1AE35E00A5B208 /* NSBitmapImageRep_KMExtension.swift in Sources */,
 				ADDF83342B391A5C00A81A4E /* CPDFAnnotation+PDFListView.m in Sources */,
+				BB95B3552D718D2600CA8228 /* KMExtractWindowController.swift in Sources */,
 				AD8B59FB2D2B778D00150EA6 /* KMBatchProcessingTableCell.swift in Sources */,
 				BB9BD0232D65A43A00FADB43 /* KMVerificationExpiredViewController.m in Sources */,
 				BB10E1692CDC94E300471D47 /* KMBGTemplateItem.swift in Sources */,