Procházet zdrojové kódy

【fix】【内容编辑】多选图片,导出,图片命名错误

tangchao před 7 měsíci
rodič
revize
5800ad632a

+ 2 - 1
PDF Office/PDF Master/Class/PDFTools/EditPDF/Tools/KMEditPDfHanddler.swift

@@ -1138,11 +1138,12 @@ extension KMEditPDfHanddler {
                     }
                     try? FileManager.default.createDirectory(atPath: filePath!, withIntermediateDirectories: false, attributes: nil)
                     var saveURLs : [URL] = []
+                    let pageIndex = self.listView?.currentPageIndex ?? 0
                     for j in 0 ..< areas.count {
                         let documentFileName = self.listView?.document?.documentURL.deletingPathExtension().lastPathComponent ?? ""
                         var outPath = filePath!
                         outPath = outPath.stringByAppendingPathComponent(documentFileName)
-                        outPath = outPath + "page \(j+1)"
+                        outPath = outPath + "_page\(pageIndex+1)_\(j+1)"
                         outPath = outPath.stringByAppendingPathExtension(format)
                         let result = self.listView?.extractImage(with: areas[j], toImagePath: outPath) ?? false
                         if result {