Browse Source

【综合】提取图片自定义页面范围总是提示无效问题修复

tangchao 1 year ago
parent
commit
9a71c84638

+ 2 - 1
PDF Office/PDF Master/Class/PDFTools/Convert/ExtractImage/Controller/KMExtractImageWindowController.swift

@@ -202,8 +202,9 @@ class KMExtractImageWindowController: NSWindowController,PDFConvertObjectDelegat
             let fileAttribute = KMFileAttribute()
             fileAttribute.filePath = self.preViewPDFView.document?.documentURL?.path ?? ""
             fileAttribute.bAllPage = false
+            fileAttribute.pagesType = .custom
             fileAttribute.pagesString = self.rangeTextField.stringValue
-            if !fileAttribute.fetchSelectPages().isEmpty {
+            if fileAttribute.fetchSelectPages().isEmpty {
                 let alert = NSAlert()
                 alert.alertStyle = .critical
                 alert.messageText = "\(fileAttribute.filePath.lastPathComponent) \(NSLocalizedString("Invalid page range or the page number is out of range. Please try again.", comment: ""))"