浏览代码

compdfkit(win) - 切换文档释放原文档

liuaoran 1 年之前
父节点
当前提交
1d55dedf26

+ 4 - 0
Demo/Examples/Annotations/MainWindow.xaml.cs

@@ -261,6 +261,10 @@ namespace AnnotationViewControl
                     {
                         return;
                     }
+                    else
+                    {
+                        pdfViewer.PDFView.Document.Release();
+                    }
                 }
 
                 passwordViewer = new PDFViewControl();

+ 4 - 0
Demo/Examples/ContentEditor/MainWindow.xaml.cs

@@ -259,6 +259,10 @@ namespace ContentEditorViewControl
                     {
                         return;
                     }
+                    else
+                    {
+                        pdfViewer.PDFView.Document.Release();
+                    }
                 }
 
                 passwordViewer = new PDFViewControl();

+ 4 - 0
Demo/Examples/DigitalSignature/MainWindow.xaml.cs

@@ -147,6 +147,10 @@ namespace DigitalSignature
                     {
                         return;
                     }
+                    else
+                    {
+                        pdfViewer.PDFView.Document.Release();
+                    }
                 }
 
                 passwordViewer = new PDFViewControl();

+ 4 - 0
Demo/Examples/Forms/MainWindow.xaml.cs

@@ -248,6 +248,10 @@ namespace FormViewControl
                     {
                         return;
                     }
+                    else
+                    {
+                        pdfViewer.PDFView.Document.Release();
+                    }
                 }
 
                 passwordViewer = new PDFViewControl();

+ 4 - 0
Demo/Examples/PDFViewer/MainPage.xaml.cs

@@ -258,6 +258,10 @@ namespace PDFViewer
                     {
                         return;
                     }
+                    else
+                    {
+                        pdfViewer.PDFView.Document.Release();
+                    }
                 }
 
                 if ((bool)CheckExistBeforeOpenFileEvent?.Invoke(new string[] { filePath, oldFilePath }))

+ 4 - 0
Demo/Examples/Viewer/MainWindow.xaml.cs

@@ -343,6 +343,10 @@ namespace Viewer
                     {
                         return;
                     }
+                    else
+                    {
+                        pdfViewControl.PDFView.Document.Release();
+                    }
                 }
 
                 passwordViewer = new PDFViewControl();