Bläddra i källkod

【2025】【Edit】裁剪模块完善

niehaoyu 1 dag sedan
förälder
incheckning
0ca9d75976

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

@@ -1799,10 +1799,10 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
                 [self.pdfListViewDelegate PDFListViewDidSelectionEnd:self];
             }
             
-            if (!NSIsEmptyRect(self.selectionRect)) {
-                [NSMenu popUpContextMenu:[self menuForEvent:theEvent] withEvent:theEvent forView:self];
-            }
-            
+//            if (!NSIsEmptyRect(self.selectionRect)) {
+//                [NSMenu popUpContextMenu:[self menuForEvent:theEvent] withEvent:theEvent forView:self];
+//            }
+//            
             if(CGPointEqualToPoint(curPoint, initialPoint) &&
                !CGRectContainsPoint(self.selectionRect,curPoint) &&
                !CGRectEqualToRect(self.selectionRect, CGRectZero)) {

+ 9 - 9
PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Bates/Views/KMBatesPropertyController.xib

@@ -55,7 +55,7 @@
                         <customView translatesAutoresizingMaskIntoConstraints="NO" id="rT8-vR-Jg5">
                             <rect key="frame" x="0.0" y="737" width="300" height="40"/>
                             <subviews>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="P8U-H2-bhU">
+                                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="P8U-H2-bhU">
                                     <rect key="frame" x="84" y="12" width="132" height="16"/>
                                     <textFieldCell key="cell" lineBreakMode="clipping" title="Add Header &amp; Footer" id="bby-fh-BkC">
                                         <font key="font" usesAppearanceFont="YES"/>
@@ -106,7 +106,7 @@
                                         <customView translatesAutoresizingMaskIntoConstraints="NO" id="5at-Bi-ZIu">
                                             <rect key="frame" x="0.0" y="72" width="232" height="40"/>
                                             <subviews>
-                                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="oXn-XY-wkk">
+                                                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="oXn-XY-wkk">
                                                     <rect key="frame" x="-2" y="12" width="32" height="16"/>
                                                     <textFieldCell key="cell" lineBreakMode="clipping" title="Font" id="zUB-65-GE2">
                                                         <font key="font" usesAppearanceFont="YES"/>
@@ -163,7 +163,7 @@
                                         <customView translatesAutoresizingMaskIntoConstraints="NO" id="UU4-Pb-4Nv">
                                             <rect key="frame" x="0.0" y="72" width="232" height="40"/>
                                             <subviews>
-                                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="fp5-OG-xQL">
+                                                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="fp5-OG-xQL">
                                                     <rect key="frame" x="-2" y="12" width="82" height="16"/>
                                                     <textFieldCell key="cell" lineBreakMode="clipping" title="Margin (mm)" id="xqa-hL-MYs">
                                                         <font key="font" usesAppearanceFont="YES"/>
@@ -280,7 +280,7 @@
                                         <customView translatesAutoresizingMaskIntoConstraints="NO" id="UJJ-R3-5lg">
                                             <rect key="frame" x="0.0" y="152" width="232" height="40"/>
                                             <subviews>
-                                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="oi2-aL-CZI">
+                                                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="oi2-aL-CZI">
                                                     <rect key="frame" x="-2" y="12" width="49" height="16"/>
                                                     <textFieldCell key="cell" lineBreakMode="clipping" title="Display" id="Jko-GY-8Js">
                                                         <font key="font" usesAppearanceFont="YES"/>
@@ -295,7 +295,7 @@
                                                 <constraint firstItem="oi2-aL-CZI" firstAttribute="leading" secondItem="UJJ-R3-5lg" secondAttribute="leading" id="cgm-dh-dl4"/>
                                             </constraints>
                                         </customView>
-                                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="XBB-h0-ukM">
+                                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="XBB-h0-ukM">
                                             <rect key="frame" x="-2" y="128" width="47" height="16"/>
                                             <textFieldCell key="cell" lineBreakMode="clipping" title="Prefix: " id="aMU-bS-b5l">
                                                 <font key="font" usesAppearanceFont="YES"/>
@@ -309,7 +309,7 @@
                                                 <constraint firstAttribute="height" constant="32" id="KY5-4h-2Du"/>
                                             </constraints>
                                         </customView>
-                                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="sQk-r3-m2Y">
+                                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="sQk-r3-m2Y">
                                             <rect key="frame" x="-2" y="88" width="47" height="16"/>
                                             <textFieldCell key="cell" lineBreakMode="clipping" title="Suffix: " id="aRj-qE-zXq">
                                                 <font key="font" usesAppearanceFont="YES"/>
@@ -323,7 +323,7 @@
                                                 <constraint firstAttribute="height" constant="32" id="dMK-PL-xax"/>
                                             </constraints>
                                         </customView>
-                                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="8sX-hO-zGM">
+                                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="8sX-hO-zGM">
                                             <rect key="frame" x="-2" y="48" width="121" height="16"/>
                                             <textFieldCell key="cell" lineBreakMode="clipping" title="Numbers of Digits: " id="7Qg-ow-zmA">
                                                 <font key="font" usesAppearanceFont="YES"/>
@@ -337,7 +337,7 @@
                                                 <constraint firstAttribute="height" constant="32" id="R2p-zM-67I"/>
                                             </constraints>
                                         </customView>
-                                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Yf2-7T-WIb">
+                                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Yf2-7T-WIb">
                                             <rect key="frame" x="-2" y="8" width="75" height="16"/>
                                             <textFieldCell key="cell" lineBreakMode="clipping" title="Start Page: " id="OaO-0M-DgG">
                                                 <font key="font" usesAppearanceFont="YES"/>
@@ -386,7 +386,7 @@
                                         <customView translatesAutoresizingMaskIntoConstraints="NO" id="vJX-wh-hma">
                                             <rect key="frame" x="0.0" y="120" width="232" height="40"/>
                                             <subviews>
-                                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="GFB-ba-xZF">
+                                                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="GFB-ba-xZF">
                                                     <rect key="frame" x="-2" y="12" width="110" height="16"/>
                                                     <textFieldCell key="cell" lineBreakMode="clipping" title="Layout &amp; Content" id="LSi-cM-ab6">
                                                         <font key="font" usesAppearanceFont="YES"/>

+ 42 - 9
PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Crop/KMCropController.swift

@@ -19,6 +19,9 @@ class KMCropController: NSViewController {
     var pdfDocument: CPDFDocument?
 
     var documentPreview: KMEditDocumentController = KMEditDocumentController.init()
+    var propertyController: KMCropPropertyController = KMCropPropertyController.init()
+
+    
     var coverController: KMCropCoverController?
     
     
@@ -36,26 +39,56 @@ class KMCropController: NSViewController {
         
         documentPreview.view.frame = preInfoView.bounds
         documentPreview.view.autoresizingMask = [.width, .height]
+        documentPreview.pdfView.pdfListViewDelegate = self
         preInfoView.addSubview(documentPreview.view)
         
-        if coverController == nil {
-            coverController = KMCropCoverController.init()
-        }
-        coverController?.view.frame = CGRectInset(documentPreview.pdfView.bounds, 0, 0)
-        coverController?.view.autoresizingMask = [.width, .height]
+        propertyController.view.frame = propertyInfoView.bounds
+        propertyController.view.autoresizingMask = [.width, .height]
+        propertyInfoView.addSubview(propertyController.view)
+        
+//        if coverController == nil {
+//            coverController = KMCropCoverController.init()
+//        }
+//        coverController?.view.frame = CGRectInset(documentPreview.pdfView.bounds, 0, 0)
+//        coverController?.view.autoresizingMask = [.width, .height]
 //        preInfoView.addSubview(coverController!.view)
         
+        
     }
  
     func reloadData() {
-
-//        propertyController.totalPDFCount = totalPDFCount
-//        propertyController.reloadData()
+        guard let pdfDocument = pdfDocument else {
+            return
+        }
         
         documentPreview.pdfDocument = pdfDocument
         documentPreview.reloadData()
-         
+        
+        let page = pdfDocument.page(at: 0)
+        let bounds = page?.bounds ?? CGRectZero
+        
+        documentPreview.pdfView.toolMode = .selectToolMode
+        documentPreview.pdfView.selectionRect = bounds
+     
+        propertyController.pdfView = documentPreview.pdfView
+        propertyController.reloadData()
     }
     
     
 }
+
+
+extension KMCropController: CPDFListViewDelegate {
+    
+    func pdfListViewChangedSelectionOrMagnification(_ pdfListView: CPDFListView!) {
+        print("pdfListViewChangedSelectionOrMagnification")
+        
+        propertyController.reloadData()
+    }
+    
+    func pdfListViewDidSelectionEnd(_ pdfListView: CPDFListView!) {
+        print("pdfListViewDidSelectionEnd")
+        
+        propertyController.reloadData()
+    }
+}

+ 234 - 1
PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Crop/Views/KMCropPropertyController.swift

@@ -6,12 +6,245 @@
 //
 
 import Cocoa
+import KMComponentLibrary
 
 class KMCropPropertyController: NSViewController {
-
+    
+    @IBOutlet var contendView: NSView!
+    
+    //White Margin
+    @IBOutlet var whiteMarginBGView: NSView!
+    @IBOutlet var whiteMarginLabel: NSTextField!
+    @IBOutlet var separateLabel: NSTextField!
+    @IBOutlet var separateTip: ComponentToolTipsHelp!
+    @IBOutlet var autoLabel: NSTextField!
+    @IBOutlet var autoTipsView: ComponentToolTipsHelp!
+    
+    //PageSize
+    @IBOutlet var pageSizeBGView: NSView!
+    @IBOutlet var pageSizeLabel: NSTextField!
+    @IBOutlet var sizeSyncButton: ComponentButton!
+    @IBOutlet var sizeWidthInput: ComponentInputNumber!
+    @IBOutlet var sizeHeightInput: ComponentInputNumber!
+    
+    //PageMargin
+    @IBOutlet var pageMarginBGView: NSView!
+    @IBOutlet var pageMarginLabel: NSTextField!
+    @IBOutlet var pageLeftInput: ComponentInputNumber!
+    @IBOutlet var pageTopInput: ComponentInputNumber!
+    @IBOutlet var pageRightInput: ComponentInputNumber!
+    @IBOutlet var pageBottomInput: ComponentInputNumber!
+    
+    //PageRange
+    @IBOutlet var pageRangeBGView: NSView!
+    @IBOutlet var pageRangeLabel: NSTextField!
+    @IBOutlet var pangeRangeSelect: ComponentSelect!
+    
+    @IBOutlet var cropButton: ComponentButton!
+    
+    private var syncChangeBounds: Bool = true //同步修改宽高
+    
+    var pdfView: CPDFListView?
+    
     override func viewDidLoad() {
         super.viewDidLoad()
         // Do view setup here.
+        
+        setupProperty()
+        
+        reloadData()
     }
     
+    func setupProperty() {
+        //White Margin
+        whiteMarginLabel.stringValue = KMLocalizedString("Crop White Margins")
+        whiteMarginLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/2")
+        whiteMarginLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
+        
+        separateLabel.stringValue = KMLocalizedString("Separate")
+        separateLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("comp-form/colorText-label")
+        separateLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-m-regular")
+        
+        autoLabel.stringValue = KMLocalizedString("Auto")
+        autoLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("comp-form/colorText-label")
+        autoLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-m-regular")
+        
+        separateTip.toolTip = KMLocalizedString("separateTip tooltips")
+        
+        autoTipsView.toolTip = KMLocalizedString("autoTipsView tooltips")
+        
+        //PageSize
+        whiteMarginLabel.stringValue = KMLocalizedString("Crop Page Size")
+        whiteMarginLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/2")
+        whiteMarginLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
+        
+        sizeSyncButton.properties = ComponentButtonProperty(type: .text_gray, size: .xxs, onlyIcon: true, icon: NSImage(named: "sync_Change_unlock"), keepPressState: true)
+        sizeSyncButton.properties.propertyInfo.leftIcon_press = NSImage(named: "sync_Change_lock")
+        sizeSyncButton.setTarget(self, action: #selector(sizeSyncButtonClicked(_:)))
+        sizeSyncButton.reloadData()
+        
+        sizeWidthInput.properties = ComponentInputNumberProperty(alignment: .center,
+                                                                 size: .s,
+                                                                 state: .normal,
+                                                                 showPrefix: true,
+                                                                 leftIcon: NSImage(named: "w_icon"),
+                                                                 minSize: 0,
+                                                                 maxSize: 1000,
+                                                                 text:"100")
+        sizeWidthInput.delegate = self
+        
+        sizeHeightInput.properties = ComponentInputNumberProperty(alignment: .center,
+                                                                  size: .s,
+                                                                  state: .normal,
+                                                                  showPrefix: true,
+                                                                  leftIcon: NSImage(named: "h_icon"),
+                                                                  minSize: 0,
+                                                                  maxSize: 1000,
+                                                                  text:"100")
+        sizeHeightInput.delegate = self
+        
+        //PageMargin
+        whiteMarginLabel.stringValue = KMLocalizedString("Crop Page Margins")
+        whiteMarginLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/2")
+        whiteMarginLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
+        
+        pageLeftInput.properties = ComponentInputNumberProperty(size: .s,
+                                                                state: .normal,
+                                                                minSize: 0,
+                                                                maxSize: 1000,
+                                                                text:"0")
+        
+        pageTopInput.properties = ComponentInputNumberProperty(size: .s,
+                                                               state: .normal,
+                                                               minSize: 0,
+                                                               maxSize: 1000,
+                                                               text:"0")
+        
+        pageRightInput.properties = ComponentInputNumberProperty(size: .s,
+                                                                 state: .normal,
+                                                                 minSize: 0,
+                                                                 maxSize: 1000,
+                                                                 text:"0")
+        
+        pageBottomInput.properties = ComponentInputNumberProperty(size: .s,
+                                                                  state: .normal,
+                                                                  minSize: 0,
+                                                                  maxSize: 1000,
+                                                                  text:"0")
+        
+        pageLeftInput.delegate = self
+        pageTopInput.delegate = self
+        pageRightInput.delegate = self
+        pageBottomInput.delegate = self
+        
+        //PageRange
+        pageRangeLabel.stringValue = KMLocalizedString("Page Range")
+        pageRangeLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/2")
+        pageRangeLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
+        
+        pangeRangeSelect.properties = ComponentSelectProperties(size: .s,
+                                                                state: .normal,
+                                                                placeholder: KMLocalizedString("e.g. 1,3-5,10"),
+                                                                errorText: nil,
+                                                                creatable: false,
+                                                                text: KMLocalizedString("All Pages"))
+        pangeRangeSelect.delegate = self
+        setUpPageSelctProperty()
+        
+        cropButton.properties = ComponentButtonProperty(type: .primary, size: .m, buttonText: KMLocalizedString("Apply"), keepPressState: false)
+        
+    }
+    
+    func reloadData() {
+        guard let pdfView = self.pdfView else {
+            return
+        }
+        
+        guard let page = pdfView.currentSelectionPage() else {
+            return
+        }
+        let pageBounds = page.bounds
+        
+        var selectionRect = pdfView.selectionRect
+        
+        //White Margin
+        
+        //PageSize
+        sizeWidthInput.properties.maxSize = Int(pageBounds.size.width)
+        sizeWidthInput.properties.text = String(format: "%.0f", selectionRect.size.width)
+        sizeWidthInput.reloadData()
+        
+        sizeHeightInput.properties.maxSize = Int(pageBounds.size.height)
+        sizeHeightInput.properties.text = String(format: "%.0f", selectionRect.size.height)
+        sizeHeightInput.reloadData()
+        
+        //PageMargin
+        
+        pageLeftInput.properties.maxSize = Int(pageBounds.size.width)
+        pageLeftInput.properties.text = String(format: "%.0f", selectionRect.origin.x)
+        pageLeftInput.reloadData()
+        
+        pageRightInput.properties.maxSize = Int(pageBounds.size.width)
+        pageRightInput.properties.text = String(format: "%.0f", pageBounds.size.width - CGRectGetMaxX(selectionRect))
+        pageRightInput.reloadData()
+        
+        pageTopInput.properties.maxSize = Int(pageBounds.size.height)
+        pageTopInput.properties.text = String(format: "%.0f", pageBounds.size.height - CGRectGetMaxY(selectionRect))
+        pageTopInput.reloadData()
+         
+        pageBottomInput.properties.maxSize = Int(pageBounds.size.height)
+        pageBottomInput.properties.text = String(format: "%.0f", selectionRect.origin.y)
+        pageBottomInput.reloadData()
+        
+        //PageRange
+        
+        print(selectionRect)
+        
+    }
+    
+    func setUpPageSelctProperty() {
+        let menuItemString:[String] = [KMLocalizedString("All Pages"),
+                                       KMLocalizedString("Odd Pages Only"),
+                                       KMLocalizedString("Even Pages Only"),
+                                       KMLocalizedString("e.g. 1,3-5,10")]
+        
+        var menuItemArr: [ComponentMenuitemProperty] = []
+        for language in menuItemString {
+            let itemProperty: ComponentMenuitemProperty = ComponentMenuitemProperty(multipleSelect: false,
+                                                                                    itemSelected: false,
+                                                                                    isDisabled: false,
+                                                                                    keyEquivalent: nil,
+                                                                                    text: language,
+                                                                                    identifier: language)
+            
+            menuItemArr.append(itemProperty)
+        }
+        pangeRangeSelect.updateMenuItemsArr(menuItemArr)
+        pangeRangeSelect.selectItemAtIndex(0)
+        
+    }
+    
+    //MARK: - Action
+    @objc func sizeSyncButtonClicked(_ sender: ComponentButton) {
+        syncChangeBounds = !syncChangeBounds
+        
+        if syncChangeBounds {
+            sizeSyncButton.properties.state = .pressed
+        } else {
+            sizeSyncButton.properties.state = .normal
+        }
+        sizeSyncButton.reloadData()
+    }
+    
+}
+
+//MARK: - ComponentInputNumberDelegate
+extension KMCropPropertyController: ComponentInputNumberDelegate {
+    
+}
+
+//MARK: - ComponentSelectDelegate
+extension KMCropPropertyController: ComponentSelectDelegate {
+    
 }
+

+ 421 - 6
PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Crop/Views/KMCropPropertyController.xib

@@ -1,19 +1,434 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11134" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<?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>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11134"/>
+        <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="KMCropPropertyController" customModuleProvider="target">
+        <customObject id="-2" userLabel="File's Owner" customClass="KMCropPropertyController" customModule="PDF_Reader_Pro" customModuleProvider="target">
             <connections>
+                <outlet property="autoLabel" destination="Pox-Aj-ggV" id="Evv-OH-wFo"/>
+                <outlet property="autoTipsView" destination="zBZ-lT-HHX" id="Ose-Nv-jq0"/>
+                <outlet property="contendView" destination="mW3-ql-4lm" id="UJi-rb-ZKz"/>
+                <outlet property="cropButton" destination="d54-4L-Wyh" id="Szz-Fu-V5p"/>
+                <outlet property="pageBottomInput" destination="hHe-nu-xMg" id="rO9-IR-9PN"/>
+                <outlet property="pageLeftInput" destination="9gq-xr-7tv" id="a8W-21-iqT"/>
+                <outlet property="pageMarginBGView" destination="VEl-3k-kWs" id="ezf-y4-P2y"/>
+                <outlet property="pageMarginLabel" destination="MBS-qn-iVN" id="335-Sp-G6s"/>
+                <outlet property="pageRangeBGView" destination="Ifn-si-LN6" id="rUG-ai-ZqW"/>
+                <outlet property="pageRangeLabel" destination="lJK-YA-dau" id="adV-jM-sIU"/>
+                <outlet property="pageRightInput" destination="26G-3U-rLx" id="G7u-ud-pwL"/>
+                <outlet property="pageSizeBGView" destination="5he-dE-TS2" id="kzU-su-FNM"/>
+                <outlet property="pageSizeLabel" destination="WNi-kk-0Rd" id="7CY-QA-1FU"/>
+                <outlet property="pageTopInput" destination="Q5l-Fj-BXV" id="w6L-DZ-FOZ"/>
+                <outlet property="pangeRangeSelect" destination="Yzw-1e-BI2" id="vIJ-DP-xbi"/>
+                <outlet property="separateLabel" destination="YMx-pu-p3t" id="SNn-DC-Td7"/>
+                <outlet property="separateTip" destination="f9e-Is-qUS" id="Tx1-UW-hcM"/>
+                <outlet property="sizeHeightInput" destination="PrT-SI-riy" id="Zzg-ei-qqQ"/>
+                <outlet property="sizeSyncButton" destination="Uz6-6u-Mps" id="dj2-qH-Z6o"/>
+                <outlet property="sizeWidthInput" destination="B0X-Ya-nJt" id="ref-7C-IvZ"/>
                 <outlet property="view" destination="Hz6-mo-xeY" id="0bl-1N-x8E"/>
+                <outlet property="whiteMarginBGView" destination="xQk-T6-fJq" id="FfA-ka-TEq"/>
+                <outlet property="whiteMarginLabel" destination="w9c-wo-kQn" id="ajN-M0-9r3"/>
             </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="480" height="272"/>
-            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+            <rect key="frame" x="0.0" y="0.0" width="264" height="500"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <subviews>
+                <customView translatesAutoresizingMaskIntoConstraints="NO" id="mW3-ql-4lm">
+                    <rect key="frame" x="0.0" y="0.0" width="264" height="500"/>
+                    <subviews>
+                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="nMm-3N-EJY">
+                            <rect key="frame" x="0.0" y="100" width="264" height="400"/>
+                            <subviews>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="xQk-T6-fJq">
+                                    <rect key="frame" x="16" y="312" width="232" height="88"/>
+                                    <subviews>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="8wm-fq-M9T">
+                                            <rect key="frame" x="0.0" y="48" width="232" height="40"/>
+                                            <subviews>
+                                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="w9c-wo-kQn">
+                                                    <rect key="frame" x="-2" y="12" width="124" height="16"/>
+                                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Crop White Margins" id="aFs-bN-Rpw">
+                                                        <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="w9c-wo-kQn" firstAttribute="centerY" secondItem="8wm-fq-M9T" secondAttribute="centerY" id="LZ8-Xe-fK8"/>
+                                                <constraint firstAttribute="height" constant="40" id="Y2Q-qA-dAl"/>
+                                                <constraint firstItem="w9c-wo-kQn" firstAttribute="leading" secondItem="8wm-fq-M9T" secondAttribute="leading" id="zzF-N0-eSx"/>
+                                            </constraints>
+                                        </customView>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="L0s-QO-tZB">
+                                            <rect key="frame" x="0.0" y="28" width="232" height="20"/>
+                                            <subviews>
+                                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="YMx-pu-p3t">
+                                                    <rect key="frame" x="-2" y="2" width="59" height="16"/>
+                                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Separate" id="OtS-3Q-Imy">
+                                                        <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>
+                                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="f9e-Is-qUS" customClass="ComponentToolTipsHelp" customModule="KMComponentLibrary">
+                                                    <rect key="frame" x="59" y="2" width="16" height="16"/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="height" constant="16" id="xyo-Kn-tae"/>
+                                                        <constraint firstAttribute="width" constant="16" id="ywL-hF-dLq"/>
+                                                    </constraints>
+                                                </customView>
+                                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="kuE-KQ-x2a">
+                                                    <rect key="frame" x="196" y="0.0" width="36" height="20"/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="height" constant="20" id="y8B-LC-kr0"/>
+                                                        <constraint firstAttribute="width" constant="36" id="yPG-0x-YAf"/>
+                                                    </constraints>
+                                                </customView>
+                                            </subviews>
+                                            <constraints>
+                                                <constraint firstItem="YMx-pu-p3t" firstAttribute="centerY" secondItem="L0s-QO-tZB" secondAttribute="centerY" id="CR5-JN-IhJ"/>
+                                                <constraint firstItem="kuE-KQ-x2a" firstAttribute="centerY" secondItem="L0s-QO-tZB" secondAttribute="centerY" id="Dib-d9-836"/>
+                                                <constraint firstItem="f9e-Is-qUS" firstAttribute="centerY" secondItem="L0s-QO-tZB" secondAttribute="centerY" id="GFm-qd-ebq"/>
+                                                <constraint firstAttribute="height" constant="20" id="U2P-Qg-vGZ"/>
+                                                <constraint firstItem="YMx-pu-p3t" firstAttribute="leading" secondItem="L0s-QO-tZB" secondAttribute="leading" id="VxF-f1-gd6"/>
+                                                <constraint firstItem="f9e-Is-qUS" firstAttribute="leading" secondItem="YMx-pu-p3t" secondAttribute="trailing" constant="4" id="gqK-aF-YEL"/>
+                                                <constraint firstAttribute="trailing" secondItem="kuE-KQ-x2a" secondAttribute="trailing" id="hci-Ix-p59"/>
+                                            </constraints>
+                                        </customView>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="Fx4-MQ-0eD">
+                                            <rect key="frame" x="0.0" y="0.0" width="232" height="20"/>
+                                            <subviews>
+                                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Pox-Aj-ggV">
+                                                    <rect key="frame" x="-2" y="2" width="33" height="16"/>
+                                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Auto" id="gOu-Ic-Tsl">
+                                                        <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>
+                                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="zBZ-lT-HHX" customClass="ComponentToolTipsHelp" customModule="KMComponentLibrary">
+                                                    <rect key="frame" x="33" y="2" width="16" height="16"/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="width" constant="16" id="TH1-Ro-dQc"/>
+                                                        <constraint firstAttribute="height" constant="16" id="mfe-su-iAo"/>
+                                                    </constraints>
+                                                </customView>
+                                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="Nqx-6k-Ums">
+                                                    <rect key="frame" x="196" y="0.0" width="36" height="20"/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="width" constant="36" id="Iaz-oP-ENG"/>
+                                                        <constraint firstAttribute="height" constant="20" id="b3Y-zv-TBr"/>
+                                                    </constraints>
+                                                </customView>
+                                            </subviews>
+                                            <constraints>
+                                                <constraint firstItem="Pox-Aj-ggV" firstAttribute="centerY" secondItem="Fx4-MQ-0eD" secondAttribute="centerY" id="Aic-QC-lxX"/>
+                                                <constraint firstItem="zBZ-lT-HHX" firstAttribute="leading" secondItem="Pox-Aj-ggV" secondAttribute="trailing" constant="4" id="UBm-Xq-wLH"/>
+                                                <constraint firstItem="zBZ-lT-HHX" firstAttribute="centerY" secondItem="Fx4-MQ-0eD" secondAttribute="centerY" id="b6n-8o-xd7"/>
+                                                <constraint firstItem="Nqx-6k-Ums" firstAttribute="centerY" secondItem="Fx4-MQ-0eD" secondAttribute="centerY" id="gz9-QP-KNP"/>
+                                                <constraint firstAttribute="height" constant="20" id="mxL-UG-gjP"/>
+                                                <constraint firstAttribute="trailing" secondItem="Nqx-6k-Ums" secondAttribute="trailing" id="tvx-uy-cqD"/>
+                                                <constraint firstItem="Pox-Aj-ggV" firstAttribute="leading" secondItem="Fx4-MQ-0eD" secondAttribute="leading" id="xaw-J3-69d"/>
+                                            </constraints>
+                                        </customView>
+                                    </subviews>
+                                    <constraints>
+                                        <constraint firstItem="L0s-QO-tZB" firstAttribute="leading" secondItem="xQk-T6-fJq" secondAttribute="leading" id="7dD-vx-bL7"/>
+                                        <constraint firstAttribute="height" constant="88" id="BuY-6L-0iU"/>
+                                        <constraint firstAttribute="width" constant="232" id="Cf2-6Y-yrZ"/>
+                                        <constraint firstAttribute="trailing" secondItem="8wm-fq-M9T" secondAttribute="trailing" id="DKE-Ds-a1j"/>
+                                        <constraint firstItem="L0s-QO-tZB" firstAttribute="top" secondItem="8wm-fq-M9T" secondAttribute="bottom" id="Ieb-5T-dwe"/>
+                                        <constraint firstAttribute="trailing" secondItem="Fx4-MQ-0eD" secondAttribute="trailing" id="PmT-1t-YtN"/>
+                                        <constraint firstItem="Fx4-MQ-0eD" firstAttribute="top" secondItem="L0s-QO-tZB" secondAttribute="bottom" constant="8" id="RmI-B1-9bS"/>
+                                        <constraint firstAttribute="trailing" secondItem="L0s-QO-tZB" secondAttribute="trailing" id="Xdh-0O-VYV"/>
+                                        <constraint firstItem="8wm-fq-M9T" firstAttribute="leading" secondItem="xQk-T6-fJq" secondAttribute="leading" id="YJA-n9-CAZ"/>
+                                        <constraint firstItem="Fx4-MQ-0eD" firstAttribute="leading" secondItem="xQk-T6-fJq" secondAttribute="leading" id="Z1g-GS-ErZ"/>
+                                        <constraint firstItem="8wm-fq-M9T" firstAttribute="top" secondItem="xQk-T6-fJq" secondAttribute="top" id="z7B-s9-kwl"/>
+                                    </constraints>
+                                </customView>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="5he-dE-TS2">
+                                    <rect key="frame" x="16" y="224" width="232" height="72"/>
+                                    <subviews>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="JU0-dW-RoJ">
+                                            <rect key="frame" x="0.0" y="32" width="232" height="40"/>
+                                            <subviews>
+                                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="WNi-kk-0Rd">
+                                                    <rect key="frame" x="-2" y="12" width="97" height="16"/>
+                                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Crop Page Size" id="l1T-u2-1U7">
+                                                        <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="WNi-kk-0Rd" firstAttribute="centerY" secondItem="JU0-dW-RoJ" secondAttribute="centerY" id="9qs-y2-0cG"/>
+                                                <constraint firstItem="WNi-kk-0Rd" firstAttribute="leading" secondItem="JU0-dW-RoJ" secondAttribute="leading" id="UTJ-gn-Poe"/>
+                                                <constraint firstAttribute="height" constant="40" id="nuy-hb-MEh"/>
+                                            </constraints>
+                                        </customView>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="WBa-xM-YG3">
+                                            <rect key="frame" x="0.0" y="0.0" width="232" height="32"/>
+                                            <subviews>
+                                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="B0X-Ya-nJt" customClass="ComponentInputNumber" customModule="KMComponentLibrary">
+                                                    <rect key="frame" x="0.0" y="0.0" width="96" height="32"/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="width" constant="96" id="OlD-sv-uO1"/>
+                                                        <constraint firstAttribute="height" constant="32" id="Uc4-Xw-M9b"/>
+                                                    </constraints>
+                                                </customView>
+                                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="Uz6-6u-Mps" customClass="ComponentButton" customModule="KMComponentLibrary">
+                                                    <rect key="frame" x="104" y="4" width="24" height="24"/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="width" constant="24" id="KKF-r5-2sa"/>
+                                                        <constraint firstAttribute="height" constant="24" id="OMT-9L-ITf"/>
+                                                    </constraints>
+                                                </customView>
+                                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="PrT-SI-riy" customClass="ComponentInputNumber" customModule="KMComponentLibrary">
+                                                    <rect key="frame" x="136" y="0.0" width="96" height="32"/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="width" constant="96" id="QQo-RV-ylM"/>
+                                                        <constraint firstAttribute="height" constant="32" id="RaF-ex-Rqg"/>
+                                                    </constraints>
+                                                </customView>
+                                            </subviews>
+                                            <constraints>
+                                                <constraint firstItem="Uz6-6u-Mps" firstAttribute="leading" secondItem="B0X-Ya-nJt" secondAttribute="trailing" constant="8" id="5PF-E4-suM"/>
+                                                <constraint firstItem="PrT-SI-riy" firstAttribute="leading" secondItem="Uz6-6u-Mps" secondAttribute="trailing" constant="8" id="Paa-6S-Xux"/>
+                                                <constraint firstAttribute="height" constant="32" id="Uvq-m4-ZrJ"/>
+                                                <constraint firstItem="PrT-SI-riy" firstAttribute="top" secondItem="WBa-xM-YG3" secondAttribute="top" id="lSn-qi-nk8"/>
+                                                <constraint firstItem="B0X-Ya-nJt" firstAttribute="leading" secondItem="WBa-xM-YG3" secondAttribute="leading" id="oY9-NR-y5G"/>
+                                                <constraint firstItem="B0X-Ya-nJt" firstAttribute="top" secondItem="WBa-xM-YG3" secondAttribute="top" id="vGz-UL-O34"/>
+                                                <constraint firstItem="Uz6-6u-Mps" firstAttribute="centerY" secondItem="WBa-xM-YG3" secondAttribute="centerY" id="vez-dU-hMn"/>
+                                            </constraints>
+                                        </customView>
+                                    </subviews>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="72" id="06y-3X-2n4"/>
+                                        <constraint firstAttribute="trailing" secondItem="JU0-dW-RoJ" secondAttribute="trailing" id="Dvd-Bh-1Lf"/>
+                                        <constraint firstItem="JU0-dW-RoJ" firstAttribute="top" secondItem="5he-dE-TS2" secondAttribute="top" id="GUM-Je-bJa"/>
+                                        <constraint firstItem="WBa-xM-YG3" firstAttribute="top" secondItem="JU0-dW-RoJ" secondAttribute="bottom" id="HMX-AH-zlv"/>
+                                        <constraint firstAttribute="width" constant="232" id="OHS-Dz-cYZ"/>
+                                        <constraint firstAttribute="trailing" secondItem="WBa-xM-YG3" secondAttribute="trailing" id="Q2D-YE-lCA"/>
+                                        <constraint firstItem="JU0-dW-RoJ" firstAttribute="leading" secondItem="5he-dE-TS2" secondAttribute="leading" id="WM6-bd-W6b"/>
+                                        <constraint firstItem="WBa-xM-YG3" firstAttribute="leading" secondItem="5he-dE-TS2" secondAttribute="leading" id="r9U-oG-Vbw"/>
+                                    </constraints>
+                                </customView>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="VEl-3k-kWs">
+                                    <rect key="frame" x="16" y="96" width="232" height="112"/>
+                                    <subviews>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="HOx-39-uUq">
+                                            <rect key="frame" x="0.0" y="72" width="232" height="40"/>
+                                            <subviews>
+                                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="MBS-qn-iVN">
+                                                    <rect key="frame" x="-2" y="12" width="120" height="16"/>
+                                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Crop Page Margins" id="dyk-qY-8d5">
+                                                        <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="MBS-qn-iVN" firstAttribute="centerY" secondItem="HOx-39-uUq" secondAttribute="centerY" id="0yS-VA-h7h"/>
+                                                <constraint firstItem="MBS-qn-iVN" firstAttribute="leading" secondItem="HOx-39-uUq" secondAttribute="leading" id="HJW-eX-BUc"/>
+                                                <constraint firstAttribute="height" constant="40" id="POZ-9t-kMY"/>
+                                            </constraints>
+                                        </customView>
+                                        <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="MS3-xs-Kes">
+                                            <rect key="frame" x="0.0" y="48" width="16" height="16"/>
+                                            <constraints>
+                                                <constraint firstAttribute="width" constant="16" id="V3R-ti-de7"/>
+                                                <constraint firstAttribute="height" constant="16" id="cYY-Dk-cHH"/>
+                                            </constraints>
+                                            <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="batesMarginLeft" id="oTC-ru-v2z"/>
+                                        </imageView>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="9gq-xr-7tv" customClass="ComponentInputNumber" customModule="KMComponentLibrary">
+                                            <rect key="frame" x="20" y="40" width="92" height="32"/>
+                                            <constraints>
+                                                <constraint firstAttribute="width" constant="92" id="imu-iA-nok"/>
+                                                <constraint firstAttribute="height" constant="32" id="zbH-Xd-hwq"/>
+                                            </constraints>
+                                        </customView>
+                                        <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="6Pz-NL-5lM">
+                                            <rect key="frame" x="120" y="48" width="16" height="16"/>
+                                            <constraints>
+                                                <constraint firstAttribute="height" constant="16" id="864-w2-joa"/>
+                                                <constraint firstAttribute="width" constant="16" id="Mr9-oc-T64"/>
+                                            </constraints>
+                                            <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="batesMarginTop" id="5vt-wH-71g"/>
+                                        </imageView>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="Q5l-Fj-BXV" customClass="ComponentInputNumber" customModule="KMComponentLibrary">
+                                            <rect key="frame" x="140" y="40" width="92" height="32"/>
+                                            <constraints>
+                                                <constraint firstAttribute="width" constant="92" id="FoD-GS-jSk"/>
+                                                <constraint firstAttribute="height" constant="32" id="upf-Kd-md6"/>
+                                            </constraints>
+                                        </customView>
+                                        <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Hzs-T3-pI3">
+                                            <rect key="frame" x="0.0" y="8" width="16" height="16"/>
+                                            <constraints>
+                                                <constraint firstAttribute="height" constant="16" id="D63-3o-Ct6"/>
+                                                <constraint firstAttribute="width" constant="16" id="E9v-8X-fvf"/>
+                                            </constraints>
+                                            <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="batesMarginRight" id="6TO-gD-1Rr"/>
+                                        </imageView>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="26G-3U-rLx" customClass="ComponentInputNumber" customModule="KMComponentLibrary">
+                                            <rect key="frame" x="20" y="0.0" width="92" height="32"/>
+                                            <constraints>
+                                                <constraint firstAttribute="height" constant="32" id="WoX-Y1-hqc"/>
+                                                <constraint firstAttribute="width" constant="92" id="nAT-uA-6MN"/>
+                                            </constraints>
+                                        </customView>
+                                        <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="TBq-53-9A2">
+                                            <rect key="frame" x="120" y="8" width="16" height="16"/>
+                                            <constraints>
+                                                <constraint firstAttribute="width" constant="16" id="Hia-JO-LG9"/>
+                                                <constraint firstAttribute="height" constant="16" id="j9j-Me-C1C"/>
+                                            </constraints>
+                                            <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="batesMarginBottom" id="i2L-7j-91q"/>
+                                        </imageView>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="hHe-nu-xMg" customClass="ComponentInputNumber" customModule="KMComponentLibrary">
+                                            <rect key="frame" x="140" y="0.0" width="92" height="32"/>
+                                            <constraints>
+                                                <constraint firstAttribute="height" constant="32" id="PpW-mn-GQc"/>
+                                                <constraint firstAttribute="width" constant="92" id="pYE-jb-NjH"/>
+                                            </constraints>
+                                        </customView>
+                                    </subviews>
+                                    <constraints>
+                                        <constraint firstItem="6Pz-NL-5lM" firstAttribute="leading" secondItem="9gq-xr-7tv" secondAttribute="trailing" constant="8" id="0Vf-lC-wyk"/>
+                                        <constraint firstItem="Q5l-Fj-BXV" firstAttribute="top" secondItem="HOx-39-uUq" secondAttribute="bottom" id="1QH-KD-g7s"/>
+                                        <constraint firstItem="HOx-39-uUq" firstAttribute="top" secondItem="VEl-3k-kWs" secondAttribute="top" id="3m8-R4-6db"/>
+                                        <constraint firstItem="hHe-nu-xMg" firstAttribute="centerY" secondItem="TBq-53-9A2" secondAttribute="centerY" id="4Bf-lo-2yT"/>
+                                        <constraint firstItem="9gq-xr-7tv" firstAttribute="leading" secondItem="MS3-xs-Kes" secondAttribute="trailing" constant="4" id="4yD-sm-sqx"/>
+                                        <constraint firstItem="9gq-xr-7tv" firstAttribute="top" secondItem="HOx-39-uUq" secondAttribute="bottom" id="6kI-nb-pMX"/>
+                                        <constraint firstItem="MS3-xs-Kes" firstAttribute="leading" secondItem="VEl-3k-kWs" secondAttribute="leading" id="Bdx-O5-okW"/>
+                                        <constraint firstAttribute="trailing" secondItem="HOx-39-uUq" secondAttribute="trailing" id="Eml-Oa-dB2"/>
+                                        <constraint firstItem="6Pz-NL-5lM" firstAttribute="top" secondItem="HOx-39-uUq" secondAttribute="bottom" constant="8" id="GR5-fS-MHh"/>
+                                        <constraint firstItem="MS3-xs-Kes" firstAttribute="top" secondItem="HOx-39-uUq" secondAttribute="bottom" constant="8" id="J75-YW-jua"/>
+                                        <constraint firstAttribute="trailing" secondItem="hHe-nu-xMg" secondAttribute="trailing" id="Jh7-1t-fed"/>
+                                        <constraint firstItem="Hzs-T3-pI3" firstAttribute="leading" secondItem="VEl-3k-kWs" secondAttribute="leading" id="Jtf-rT-q3e"/>
+                                        <constraint firstItem="hHe-nu-xMg" firstAttribute="top" secondItem="Q5l-Fj-BXV" secondAttribute="bottom" constant="8" id="Nry-gc-2Dz"/>
+                                        <constraint firstAttribute="height" constant="112" id="RjY-C1-VpC"/>
+                                        <constraint firstItem="26G-3U-rLx" firstAttribute="leading" secondItem="Hzs-T3-pI3" secondAttribute="trailing" constant="4" id="U5K-ce-H0u"/>
+                                        <constraint firstItem="hHe-nu-xMg" firstAttribute="leading" secondItem="TBq-53-9A2" secondAttribute="trailing" constant="4" id="WfR-HL-haC"/>
+                                        <constraint firstItem="26G-3U-rLx" firstAttribute="top" secondItem="9gq-xr-7tv" secondAttribute="bottom" constant="8" id="XB2-9d-s62"/>
+                                        <constraint firstItem="Q5l-Fj-BXV" firstAttribute="leading" secondItem="6Pz-NL-5lM" secondAttribute="trailing" constant="4" id="YVo-PX-Ujt"/>
+                                        <constraint firstAttribute="width" constant="232" id="dIk-yz-VhL"/>
+                                        <constraint firstItem="HOx-39-uUq" firstAttribute="leading" secondItem="VEl-3k-kWs" secondAttribute="leading" id="eym-bb-fb8"/>
+                                        <constraint firstItem="Hzs-T3-pI3" firstAttribute="centerY" secondItem="26G-3U-rLx" secondAttribute="centerY" id="gvn-f5-MH3"/>
+                                    </constraints>
+                                </customView>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="Ifn-si-LN6">
+                                    <rect key="frame" x="16" y="8" width="232" height="72"/>
+                                    <subviews>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="sQd-F9-fFZ">
+                                            <rect key="frame" x="0.0" y="32" width="232" height="40"/>
+                                            <subviews>
+                                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="lJK-YA-dau">
+                                                    <rect key="frame" x="-2" y="12" width="77" height="16"/>
+                                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Page Range" id="rwH-lG-dea">
+                                                        <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="lJK-YA-dau" firstAttribute="leading" secondItem="sQd-F9-fFZ" secondAttribute="leading" id="IAI-Tn-LQS"/>
+                                                <constraint firstAttribute="height" constant="40" id="aaH-cG-ep1"/>
+                                                <constraint firstItem="lJK-YA-dau" firstAttribute="centerY" secondItem="sQd-F9-fFZ" secondAttribute="centerY" id="h1z-5o-fQq"/>
+                                            </constraints>
+                                        </customView>
+                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="Yzw-1e-BI2" customClass="ComponentSelect" customModule="KMComponentLibrary">
+                                            <rect key="frame" x="0.0" y="0.0" width="232" height="32"/>
+                                            <constraints>
+                                                <constraint firstAttribute="width" constant="232" id="Ifu-Sb-5xg"/>
+                                                <constraint firstAttribute="height" constant="32" id="n7i-X3-ozo"/>
+                                            </constraints>
+                                        </customView>
+                                    </subviews>
+                                    <constraints>
+                                        <constraint firstItem="Yzw-1e-BI2" firstAttribute="top" secondItem="sQd-F9-fFZ" secondAttribute="bottom" id="4eK-Dg-ups"/>
+                                        <constraint firstItem="sQd-F9-fFZ" firstAttribute="top" secondItem="Ifn-si-LN6" secondAttribute="top" id="9db-wM-woe"/>
+                                        <constraint firstAttribute="trailing" secondItem="sQd-F9-fFZ" secondAttribute="trailing" id="Otl-RY-VGe"/>
+                                        <constraint firstItem="sQd-F9-fFZ" firstAttribute="leading" secondItem="Ifn-si-LN6" secondAttribute="leading" id="Ugc-hq-2nd"/>
+                                        <constraint firstAttribute="height" constant="72" id="XoO-nf-cWE"/>
+                                        <constraint firstItem="Yzw-1e-BI2" firstAttribute="centerX" secondItem="Ifn-si-LN6" secondAttribute="centerX" id="cFh-N4-2Vf"/>
+                                        <constraint firstAttribute="width" constant="232" id="gEV-UZ-sf5"/>
+                                    </constraints>
+                                </customView>
+                            </subviews>
+                            <constraints>
+                                <constraint firstItem="5he-dE-TS2" firstAttribute="top" secondItem="xQk-T6-fJq" secondAttribute="bottom" constant="16" id="3Ss-8r-TFM"/>
+                                <constraint firstItem="VEl-3k-kWs" firstAttribute="centerX" secondItem="nMm-3N-EJY" secondAttribute="centerX" id="79K-0d-DAk"/>
+                                <constraint firstItem="5he-dE-TS2" firstAttribute="centerX" secondItem="nMm-3N-EJY" secondAttribute="centerX" id="B3T-qi-Gfg"/>
+                                <constraint firstItem="VEl-3k-kWs" firstAttribute="top" secondItem="5he-dE-TS2" secondAttribute="bottom" constant="16" id="LJS-6z-L1d"/>
+                                <constraint firstItem="Ifn-si-LN6" firstAttribute="centerX" secondItem="nMm-3N-EJY" secondAttribute="centerX" id="OJA-qE-5PC"/>
+                                <constraint firstAttribute="height" constant="400" id="Ome-2B-MfZ"/>
+                                <constraint firstItem="xQk-T6-fJq" firstAttribute="top" secondItem="nMm-3N-EJY" secondAttribute="top" id="QI2-Fu-Wqr"/>
+                                <constraint firstItem="Ifn-si-LN6" firstAttribute="top" secondItem="VEl-3k-kWs" secondAttribute="bottom" constant="16" id="Wdx-z8-4GR"/>
+                                <constraint firstItem="xQk-T6-fJq" firstAttribute="centerX" secondItem="nMm-3N-EJY" secondAttribute="centerX" id="fke-ta-ozi"/>
+                            </constraints>
+                        </customView>
+                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="A5L-AM-GKu">
+                            <rect key="frame" x="0.0" y="0.0" width="264" height="72"/>
+                            <subviews>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="C79-sD-EcA" customClass="ComponentDivider" customModule="KMComponentLibrary">
+                                    <rect key="frame" x="0.0" y="71" width="264" height="1"/>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="1" id="RQ3-tT-nSy"/>
+                                    </constraints>
+                                </customView>
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="d54-4L-Wyh" customClass="ComponentButton" customModule="KMComponentLibrary">
+                                    <rect key="frame" x="16" y="16" width="232" height="40"/>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="40" id="91o-Ov-1dJ"/>
+                                        <constraint firstAttribute="width" constant="232" id="BFR-GO-gnM"/>
+                                    </constraints>
+                                </customView>
+                            </subviews>
+                            <constraints>
+                                <constraint firstItem="d54-4L-Wyh" firstAttribute="centerY" secondItem="A5L-AM-GKu" secondAttribute="centerY" id="0nj-pI-B0X"/>
+                                <constraint firstAttribute="trailing" secondItem="C79-sD-EcA" secondAttribute="trailing" id="P11-v9-L8J"/>
+                                <constraint firstItem="d54-4L-Wyh" firstAttribute="centerX" secondItem="A5L-AM-GKu" secondAttribute="centerX" id="TxT-vt-4uF"/>
+                                <constraint firstItem="C79-sD-EcA" firstAttribute="leading" secondItem="A5L-AM-GKu" secondAttribute="leading" id="evS-2S-Zhs"/>
+                                <constraint firstItem="C79-sD-EcA" firstAttribute="top" secondItem="A5L-AM-GKu" secondAttribute="top" id="kkJ-VD-L0U"/>
+                                <constraint firstAttribute="height" constant="72" id="p5L-oX-rpD"/>
+                            </constraints>
+                        </customView>
+                    </subviews>
+                    <constraints>
+                        <constraint firstItem="nMm-3N-EJY" firstAttribute="leading" secondItem="mW3-ql-4lm" secondAttribute="leading" id="5bC-wv-Dsw"/>
+                        <constraint firstItem="nMm-3N-EJY" firstAttribute="top" secondItem="mW3-ql-4lm" secondAttribute="top" id="5y9-9c-aNe"/>
+                        <constraint firstAttribute="bottom" secondItem="A5L-AM-GKu" secondAttribute="bottom" id="XnH-B4-9Oy"/>
+                        <constraint firstAttribute="trailing" secondItem="nMm-3N-EJY" secondAttribute="trailing" id="fI5-ii-trA"/>
+                        <constraint firstItem="A5L-AM-GKu" firstAttribute="leading" secondItem="mW3-ql-4lm" secondAttribute="leading" id="wkX-ZC-KcM"/>
+                        <constraint firstAttribute="trailing" secondItem="A5L-AM-GKu" secondAttribute="trailing" id="yfw-zW-AHh"/>
+                    </constraints>
+                </customView>
+            </subviews>
+            <constraints>
+                <constraint firstAttribute="bottom" secondItem="mW3-ql-4lm" secondAttribute="bottom" id="Cqp-SG-HWl"/>
+                <constraint firstAttribute="trailing" secondItem="mW3-ql-4lm" secondAttribute="trailing" id="DPG-4G-qvS"/>
+                <constraint firstItem="mW3-ql-4lm" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" id="N61-fM-To4"/>
+                <constraint firstItem="mW3-ql-4lm" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" id="brO-fX-JxZ"/>
+            </constraints>
+            <point key="canvasLocation" x="30" y="393"/>
         </customView>
     </objects>
+    <resources>
+        <image name="batesMarginBottom" width="16" height="16"/>
+        <image name="batesMarginLeft" width="16" height="16"/>
+        <image name="batesMarginRight" width="16" height="16"/>
+        <image name="batesMarginTop" width="16" height="16"/>
+    </resources>
 </document>

+ 2 - 16
PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/SinglePagePDFController/KMEditDocumentController.swift

@@ -32,26 +32,12 @@ class KMEditDocumentController: NSViewController {
         guard let pdfDocument = self.pdfDocument else { return }
         
         pdfView.document = pdfDocument
-        
-        
-        coverView.wantsLayer = true
-        coverView.layer?.backgroundColor = NSColor.red.cgColor
-       pdfView.addSubview(coverView)
-        
-        refreshUI()
+          
     }
     
     func refreshUI() {
         pdfView.updateRender(true)
-        let page = pdfView.document.page(at: 0)
-        let bounds = page?.bounds
-        
-       let test = pdfView.convertRect(toScreen: bounds!)
-      let rect = pdfView.convert(bounds!, from: page)
-        coverView.frame = test
-        
-        print("111")
-        
+       
     }
     
     func layoutDocumentView() {

+ 1 - 1
PDF Office/PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift

@@ -394,7 +394,7 @@ import KMComponentLibrary
                 listView.annotationType = .link
                 
             } else if subToolMode == .Edit_Crop {
-                listView.toolMode = .selectToolMode
+//                listView.toolMode = .selectToolMode
                 
                 showCropController()
             }

+ 3 - 3
PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/EditPDF/KMEditImageController.xib

@@ -72,7 +72,7 @@
                                 <customView translatesAutoresizingMaskIntoConstraints="NO" id="3Xa-fV-tFr">
                                     <rect key="frame" x="0.0" y="32" width="232" height="40"/>
                                     <subviews>
-                                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="4DO-V6-JUJ">
+                                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="4DO-V6-JUJ">
                                             <rect key="frame" x="-2" y="12" width="30" height="16"/>
                                             <textFieldCell key="cell" lineBreakMode="clipping" title="Size" id="BYF-9G-Zr2">
                                                 <font key="font" usesAppearanceFont="YES"/>
@@ -140,7 +140,7 @@
                                 <customView translatesAutoresizingMaskIntoConstraints="NO" id="Sm5-0s-19e">
                                     <rect key="frame" x="0.0" y="32" width="232" height="40"/>
                                     <subviews>
-                                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="yEz-sB-7uR">
+                                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="yEz-sB-7uR">
                                             <rect key="frame" x="-2" y="12" width="82" height="16"/>
                                             <textFieldCell key="cell" lineBreakMode="clipping" title="Rotate &amp; Flip" id="N6G-fq-qFA">
                                                 <font key="font" usesAppearanceFont="YES"/>
@@ -226,7 +226,7 @@
                                 <customView translatesAutoresizingMaskIntoConstraints="NO" id="XM6-r1-dTE">
                                     <rect key="frame" x="0.0" y="32" width="232" height="40"/>
                                     <subviews>
-                                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="nL4-oY-ZBk">
+                                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="nL4-oY-ZBk">
                                             <rect key="frame" x="-2" y="12" width="51" height="16"/>
                                             <textFieldCell key="cell" lineBreakMode="clipping" title="Opacity" id="ru5-az-dPn">
                                                 <font key="font" usesAppearanceFont="YES"/>

+ 85 - 5
PDF Office/PDF Reader Pro.xcodeproj/xcuserdata/kdanmobile.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -3461,16 +3461,96 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "AB919092-694D-4E74-B326-E750BD15DB7F"
+            uuid = "ACEAF536-9B48-464B-A2DC-0FD0E7786D37"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "PDF Master/KMClass/KMPDFViewController/EditTool/SinglePagePDFController/KMEditDocumentController.swift"
+            filePath = "PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+Extension.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "47"
-            endingLineNumber = "47"
-            landmarkName = "refreshUI()"
+            startingLineNumber = "844"
+            endingLineNumber = "844"
+            landmarkName = "-autoSelectContent:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "E7AD4267-48AC-4DD5-867F-6A958C288C52"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "621"
+            endingLineNumber = "621"
+            landmarkName = "openPDFReadMode()"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "C0BF1CBB-778E-4269-B4CB-BE62D03EDE4A"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "353"
+            endingLineNumber = "353"
+            landmarkName = "addReadModelStype()"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "CA957B0F-74F0-4ECF-9BE5-F996315D44F7"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "2526"
+            endingLineNumber = "2526"
+            landmarkName = "pdfListViewMenu(forEvent:for:click:isMoveSelectAnno:)"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "E36E1A66-A8B1-4248-9550-68D820499376"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "2344"
+            endingLineNumber = "2344"
+            landmarkName = "pdfListViewMenuValidate(_:menuItem:isTakesEffect:)"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "829A2007-5055-4924-B2CB-8003D30BE87C"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "2485"
+            endingLineNumber = "2485"
+            landmarkName = "pdfListViewMenuItemsEditing(at:for:menuItems:)"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>