|
@@ -1165,22 +1165,6 @@ namespace PDF_Office.ViewModels
|
|
|
//保存前进行标记密文处理应用或擦除
|
|
|
RedactionAction.Invoke();
|
|
|
}
|
|
|
- ////标记密文后的保存
|
|
|
- //if (isApplyRedaction)
|
|
|
- //{
|
|
|
- // //应用标记密文并另存为保存
|
|
|
- // try
|
|
|
- // {
|
|
|
- // PDFViewer.Document.ApplyRedaction();
|
|
|
- // PDFViewer.Document.ReleasePages();
|
|
|
- // PDFViewer.ReloadDocument();
|
|
|
- // }
|
|
|
- // catch { }
|
|
|
- //}
|
|
|
- //else if (isEraseRedaction)
|
|
|
- //{
|
|
|
- // EraseReadction();
|
|
|
- //}
|
|
|
|
|
|
if (App.OpenedFileList.Contains(dlg.FileName))
|
|
|
{
|
|
@@ -1229,27 +1213,6 @@ namespace PDF_Office.ViewModels
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void EraseReadction()
|
|
|
- {
|
|
|
- for (int i = 0; i < PDFViewer.Document.PageCount; i++)
|
|
|
- {
|
|
|
- //获取页面Page对象
|
|
|
- var page = PDFViewer.Document.PageAtIndex(i);
|
|
|
- var annots = PDFViewer.GetAnnotCommentList(i, PDFViewer.Document);
|
|
|
- //循环擦除当前页的标记密文
|
|
|
- for (int j = 0; j < annots.Count; j++)
|
|
|
- {
|
|
|
- if (annots[j].EventType == AnnotArgsType.AnnotRedaction)
|
|
|
- {
|
|
|
- foreach (var rect in (annots[j] as RedactionAnnotArgs).QuardRects)
|
|
|
- {
|
|
|
- page.ErasureRedaction(rect);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
/// <summary>
|
|
|
/// 另存为后进行的操作
|
|
|
/// 重新打开新文档
|