|
@@ -3003,29 +3003,11 @@ extension KMMainViewController {
|
|
|
// 隐藏提示
|
|
|
self?.hiddenSecureLimitTip()
|
|
|
// 去打印
|
|
|
- if let data = self?.saveWatermarkFlag, !data {
|
|
|
- KMPrintWindowController.openDocument(inputDocument: self!.listView?.document, inputPageRange: pageRange)
|
|
|
- return
|
|
|
- }
|
|
|
- if let _url = KMTools.saveWatermarkDocumentToTemp(document: self!.listView.document, secureOptions: self!.secureOptions, removePWD: self!.removeSecureFlag) {
|
|
|
- _ = CPDFDocument(url: _url)
|
|
|
- KMPrintWindowController.showPrintWindowControll(inputData: _url, inputDocument: self?.listView.document, inputPageRange: pageRange)
|
|
|
- } else {
|
|
|
- KMPrintWindowController.openDocument(inputDocument: self?.listView?.document, inputPageRange: pageRange)
|
|
|
- }
|
|
|
+ KMPrintWindowController.openDocument(inputDocument: self?.listView?.document, inputPageRange: pageRange)
|
|
|
}
|
|
|
return
|
|
|
}
|
|
|
- if (!self.saveWatermarkFlag) {
|
|
|
- KMPrintWindowController.openDocument(inputDocument: self.listView?.document, inputPageRange: pageRange)
|
|
|
- return
|
|
|
- }
|
|
|
- if let _url = KMTools.saveWatermarkDocumentToTemp(document: self.listView.document, secureOptions: self.secureOptions, removePWD: self.removeSecureFlag) {
|
|
|
- let _document = CPDFDocument(url: _url)
|
|
|
- KMPrintWindowController.showPrintWindowControll(inputData: _url, inputDocument: self.listView.document, inputPageRange: pageRange)
|
|
|
- } else {
|
|
|
- KMPrintWindowController.openDocument(inputDocument: self.listView?.document, inputPageRange: pageRange)
|
|
|
- }
|
|
|
+ KMPrintWindowController.openDocument(inputDocument: self.listView?.document, inputPageRange: pageRange)
|
|
|
}
|
|
|
|
|
|
// MARK: - 图片注释
|
|
@@ -3531,22 +3513,6 @@ extension KMMainViewController : KMMainToolbarControllerDelegate {
|
|
|
#endif
|
|
|
self.trackEvent_aiTranslate()
|
|
|
self._aiTranslationPDFFileAction()
|
|
|
-// Task { @MainActor in
|
|
|
-// if await (KMLightMemberManager.manager.canPayFunction() == false) {
|
|
|
-// let _ = KMSubscribeWaterMarkWindowController.show(window: self.view.window!, type: .aiTranslate) { isSub, _, isClose in
|
|
|
-// if (isClose) {
|
|
|
-// return
|
|
|
-// }
|
|
|
-// if (isSub) {
|
|
|
-// self._aiTranslationPDFFileAction()
|
|
|
-// return
|
|
|
-// }
|
|
|
-// }
|
|
|
-// return
|
|
|
-// }
|
|
|
-//
|
|
|
-// self._aiTranslationPDFFileAction()
|
|
|
-// }
|
|
|
}
|
|
|
|
|
|
private func _aiTranslationPDFFileAction() {
|
|
@@ -3731,27 +3697,6 @@ extension KMMainViewController : KMMainToolbarControllerDelegate {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- if await (KMLightMemberManager.manager.canPayFunction() == false) {
|
|
|
-// self.view.window?.contentView?.superview?.beginLoading()
|
|
|
- let document = self.listView.document
|
|
|
- let secureOptions = self.secureOptions
|
|
|
- let removeSecureFlag = self.removeSecureFlag
|
|
|
-
|
|
|
-// DispatchQueue.global().async { [unowned self] in
|
|
|
- guard let _url = KMTools.saveWatermarkDocumentToTemp(document: document!, secureOptions: secureOptions, removePWD: removeSecureFlag) else {
|
|
|
-// DispatchQueue.main.async {
|
|
|
-// self.view.window?.contentView?.superview?.endLoading()
|
|
|
-// }
|
|
|
- return
|
|
|
- }
|
|
|
-// DispatchQueue.main.async {
|
|
|
-// self.view.window?.contentView?.superview?.endLoading()
|
|
|
- self.showCompressWindow(url: _url)
|
|
|
-// }
|
|
|
-// }
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
if (self.needSaveDocument()) {
|
|
|
self.saveDocumentWithProgressAlert { [unowned self] params in
|
|
|
self.showCompressWindow()
|
|
@@ -3799,14 +3744,6 @@ extension KMMainViewController : KMMainToolbarControllerDelegate {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- if await (KMLightMemberManager.manager.canPayFunction() == false) {
|
|
|
- guard let _url = KMTools.saveWatermarkDocumentToTemp(document: self.listView.document, secureOptions: self.secureOptions, removePWD: self.removeSecureFlag) else {
|
|
|
- return
|
|
|
- }
|
|
|
- self.showMergeWindow(url: _url, self.model.password)
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
if (self.needSaveDocument()) {
|
|
|
self.saveDocumentWithProgressAlert { [unowned self] params in
|
|
|
self.showMergeWindow(self.listView.document.password)
|