|
@@ -121,6 +121,7 @@ class KMPDFCropWindowController: NSWindowController, CPDFViewDelegate, NSWindowD
|
|
|
super.windowDidLoad()
|
|
|
self.cropRect = self.defaultCropRect
|
|
|
fileAttribute = KMFileAttribute()
|
|
|
+ fileAttribute.filePath = self.originalDocument?.documentURL.path ?? ""
|
|
|
self.pdfView.wantsLayer = true
|
|
|
self.pdfView.layer?.borderColor = NSColor.black.cgColor
|
|
|
self.pdfView.layer?.borderWidth = 2
|
|
@@ -267,15 +268,10 @@ class KMPDFCropWindowController: NSWindowController, CPDFViewDelegate, NSWindowD
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
-// let fileAttribute = KMFileAttribute()
|
|
|
- fileAttribute.filePath = self.originalDocument?.documentURL.path ?? ""
|
|
|
fileAttribute.bAllPage = false
|
|
|
+ fileAttribute.pagesType = .custom
|
|
|
fileAttribute.pagesString = self.pageRangeComboBox.stringValue
|
|
|
|
|
|
-// if !fileAttribute.selectPages {
|
|
|
-//
|
|
|
-// }
|
|
|
-
|
|
|
for num in fileAttribute.fetchSelectPages() {
|
|
|
pages.add(num - 1)
|
|
|
}
|
|
@@ -987,6 +983,7 @@ class KMPDFCropWindowController: NSWindowController, CPDFViewDelegate, NSWindowD
|
|
|
self.previewDocument?.insertPageObject(page, at: self.previewDocument?.pageCount ?? 0)
|
|
|
}
|
|
|
self.pdfView.document = self.previewDocument
|
|
|
+ self.pdfView.layoutDocumentView()
|
|
|
self.pdfView.needsDisplay = true
|
|
|
let tPage = self.previewDocument?.page(at: 0)!
|
|
|
self.pdfView.go(to: tPage)
|