Browse Source

【打印】自定义打印,文档和标记,预览中没有显示添加的注释 -- 修复

lizhe 6 months ago
parent
commit
43bfcce1ac

+ 1 - 0
PDF Office/PDF Master/Class/Document/KMMainDocument.swift

@@ -817,6 +817,7 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
         self.mainViewController?.removeOwnerPassword()
     }
     @IBAction func printPDFDocument(_ sender: Any?) {
+        self.mainViewController?.saveDocument()
         KMPrintWindowController.showNewPrintWindowControll(inputDocument: self.mainViewController?.document, inputPageRange: KMPrintPageRange())
     }
     @IBAction func performFindPanelAction(_ sender: Any?) {

+ 1 - 0
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift

@@ -2996,6 +2996,7 @@ extension KMMainViewController {
     }
     
     internal func showPrintWindow(pageRange: KMPrintPageRange = KMPrintPageRange(type: .allPage, selectPages: [])) {
+        self.saveDocument()
         if (self.listView.document != nil && !self.listView.document.allowsPrinting) { // 有打印限制
             KMPasswordInputWindow.openWindow(window: self.view.window!, type: .owner,  url: self.listView.document.documentURL) { [weak self] result ,password in
                 if (result == .cancel) {

+ 3 - 0
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+MenuAction.swift

@@ -1130,14 +1130,17 @@ extension KMMainViewController: KMSystemToolMenuProtocol {
     }
     
     func togglePoster(_ sender: Any?) {
+        self.saveDocument()
         KMPrintWindowController.showNewPrintWindowControll(inputDocument: self.listView.document, inputPageRange: KMPrintPageRange(), printType: .poster)
     }
     
     func toggleMultiple(_ sender: Any?) {
+        self.saveDocument()
         KMPrintWindowController.showNewPrintWindowControll(inputDocument: self.listView.document, inputPageRange: KMPrintPageRange(), printType: .multipage)
     }
     
     func toggleBooklet(_ sender: Any?) {
+        self.saveDocument()
         KMPrintWindowController.showNewPrintWindowControll(inputDocument: self.listView.document, inputPageRange: KMPrintPageRange(), printType: .pamphlet)
     }