|
@@ -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 {
|