|
@@ -31,6 +31,8 @@ class KMPDFThumbnailView: KMThumbnailView {
|
|
|
fileprivate var dragFlag = false
|
|
|
fileprivate var dragIn = false
|
|
|
|
|
|
+ var limit = false
|
|
|
+
|
|
|
override func initDefaultValue() {
|
|
|
super.initDefaultValue()
|
|
|
|
|
@@ -148,7 +150,11 @@ extension KMPDFThumbnailView {
|
|
|
}
|
|
|
|
|
|
if let data = self.dragTempFilePath {
|
|
|
- document?.write(to: URL(fileURLWithPath: data))
|
|
|
+ if (self.limit) {
|
|
|
+ let _ = KMTools.saveWatermarkDocument(document: document!, to: URL(fileURLWithPath: data))
|
|
|
+ } else {
|
|
|
+ document?.write(to: URL(fileURLWithPath: data))
|
|
|
+ }
|
|
|
}
|
|
|
self.dragFilePath = self.dragTempFilePath
|
|
|
}
|