Bladeren bron

转档-添加OCR,图片DPI,DocmentAILib移动

liyijie 2 jaren geleden
bovenliggende
commit
53d5ea717e
35 gewijzigde bestanden met toevoegingen van 502 en 103 verwijderingen
  1. 4 1
      PDF Office/App.xaml.cs
  2. 1 2
      PDF Office/Model/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterDialogModel.cs
  3. 14 11
      PDF Office/PDF Office.csproj
  4. 1 0
      PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterCSVDialogViewModel.cs
  5. 52 12
      PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterExcelDialogViewModel.cs
  6. 51 1
      PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterHTMLDialogViewModel.cs
  7. 1 0
      PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterImgDialogViewModel.cs
  8. 52 1
      PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterPPTDialogViewModel.cs
  9. 7 7
      PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterProgressBarDialogViewModel.cs
  10. 52 2
      PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterRTFDialogViewModel.cs
  11. 51 1
      PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterTextDialogViewModel.cs
  12. 52 1
      PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterWordDialogViewModel.cs
  13. 95 13
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterDialogViewModel.cs
  14. 0 6
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterExcelViewModel.cs
  15. 4 0
      PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterImgViewModel.cs
  16. 7 2
      PDF Office/Views/Dialog/ConverterDialogs/ConverterExcelDialog.xaml
  17. 7 2
      PDF Office/Views/Dialog/ConverterDialogs/ConverterHTMLDialog.xaml
  18. 2 2
      PDF Office/Views/Dialog/ConverterDialogs/ConverterImgDialog.xaml
  19. 7 2
      PDF Office/Views/Dialog/ConverterDialogs/ConverterPPTDialog.xaml
  20. 7 2
      PDF Office/Views/Dialog/ConverterDialogs/ConverterRTFDialog.xaml
  21. 7 2
      PDF Office/Views/Dialog/ConverterDialogs/ConverterTextDialog.xaml
  22. 7 2
      PDF Office/Views/Dialog/ConverterDialogs/ConverterWordDialog.xaml
  23. 8 3
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterDialog.xaml
  24. 1 1
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterImg.xaml
  25. 12 27
      PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterImg.xaml.cs
  26. 0 0
      PDF Office/x64/ComDocumentAINative.dll
  27. 0 0
      PDF Office/x64/DocumentAI.dll
  28. 0 0
      PDF Office/x64/libiomp5md.dll
  29. 0 0
      PDF Office/x64/mkldnn.dll
  30. 0 0
      PDF Office/x64/mklml.dll
  31. BIN
      PDF Office/x64/onnxruntime.dll
  32. BIN
      PDF Office/x64/opencv_world420.dll
  33. 0 0
      PDF Office/x64/opencv_world420d.dll
  34. 0 0
      PDF Office/x64/paddle2onnx.dll
  35. 0 0
      PDF Office/x64/paddle_inference.dll

+ 4 - 1
PDF Office/App.xaml.cs

@@ -401,6 +401,8 @@ namespace PDF_Office
 
         /// <summary>
         /// 加载,验证DocumentAIKitLicense
+        /// 目前DocmentAILib暂时移动到X64(原来路径为 string libFolderPath = Path.Combine(exePath, "DocumentAILib");)
+        /// 含有的库有(ComDocumentAINative.dll,DocumentAI.dll,libiomp5md.dll,mkldnn.dll,mklml.dll,onnxruntime.dll,opencv_world420.dll,opencv_word420d.dll,paddle_inference.dll,paddle2onnx.dll)
         /// </summary>
         /// <returns></returns>
         private static bool DocumentAIKitLicenseVerify()
@@ -409,7 +411,8 @@ namespace PDF_Office
             {
                 string exePath = Path.GetDirectoryName(typeof(MainWindow).Assembly.Location);
                 exePath = Path.Combine(exePath, "x64");
-                string libFolderPath = Path.Combine(exePath, "DocumentAILib");
+                //string libFolderPath = Path.Combine(exePath, "DocumentAILib");
+                string libFolderPath = exePath;
                 modelFolderPath = Path.Combine(exePath, "models");
 
                 if (CDocumentAIKit.LoadNativeLibrary(libFolderPath) == false)

+ 1 - 2
PDF Office/Model/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterDialogModel.cs

@@ -26,8 +26,7 @@ namespace PDF_Office.Model.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.H
 
     public class HomePageConverterDialogModel
     {
-        public static List<string> GetConverter = new List<string> { "HomePageConverterWord","HomePageConverterExcel","HomePageConverterPPT","HomePageConverterRTF","HomePageConverterHTML"
-            ,"HomePageConverterText","HomePageConverterCSV","HomePageConverterImg" };
+        public static List<string> GetConverter = new List<string> { "HomePageConverterWord","HomePageConverterExcel","HomePageConverterPPT","HomePageConverterRTF","HomePageConverterCSV","HomePageConverterHTML","HomePageConverterText","HomePageConverterImg" };
 
         /// <summary>
         /// 文档地址;

+ 14 - 11
PDF Office/PDF Office.csproj

@@ -1959,7 +1959,9 @@
       <Generator>SettingsSingleFileGenerator</Generator>
       <LastGenOutput>Settings.Designer.cs</LastGenOutput>
     </None>
-    <Content Include="ComDocumentAIKit.dll" />
+    <Content Include="ComDocumentAIKit.dll">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Content>
     <Resource Include="Resources\ToolBarIcon\Scan\enhance.png">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Resource>
@@ -2093,6 +2095,7 @@
   </ItemGroup>
   <ItemGroup>
     <Folder Include="Views\Edit\" />
+    <Folder Include="x64\DocumentAILib\" />
   </ItemGroup>
   <ItemGroup>
     <Content Include="ComOCRKit.Desk.dll">
@@ -2241,34 +2244,34 @@
     <Content Include="x64\CPDFConverterNative.dll">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
-    <Content Include="x64\DocumentAILib\ComDocumentAINative.dll">
+    <Content Include="x64\ComDocumentAINative.dll">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
-    <Content Include="x64\DocumentAILib\DocumentAI.dll">
+    <Content Include="x64\DocumentAI.dll">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
-    <Content Include="x64\DocumentAILib\libiomp5md.dll">
+    <Content Include="x64\libiomp5md.dll">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
-    <Content Include="x64\DocumentAILib\mkldnn.dll">
+    <Content Include="x64\mkldnn.dll">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
-    <Content Include="x64\DocumentAILib\mklml.dll">
+    <Content Include="x64\mklml.dll">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
-    <Content Include="x64\DocumentAILib\onnxruntime.dll">
+    <Content Include="x64\onnxruntime.dll">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
-    <Content Include="x64\DocumentAILib\opencv_world420.dll">
+    <Content Include="x64\opencv_world420.dll">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
-    <Content Include="x64\DocumentAILib\opencv_world420d.dll">
+    <Content Include="x64\opencv_world420d.dll">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
-    <Content Include="x64\DocumentAILib\paddle2onnx.dll">
+    <Content Include="x64\paddle2onnx.dll">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
-    <Content Include="x64\DocumentAILib\paddle_inference.dll">
+    <Content Include="x64\paddle_inference.dll">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
     <Content Include="x64\libhpdf.dll">

+ 1 - 0
PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterCSVDialogViewModel.cs

@@ -198,6 +198,7 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
                 MessageBoxEx.Show("输入不对");
                 return;
             }
+            ConverterCSVModel.csvOptions = ConverterCSVModel.CSVOptions();
             DialogParameters value = new DialogParameters();
             value.Add(ParameterNames.ConverterType,"CSV");
             value.Add(ParameterNames.ConverterTypeModel, ConverterCSVModel);

+ 52 - 12
PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterExcelDialogViewModel.cs

@@ -1,4 +1,5 @@
-using ComPDFKit_Conversion.Options;
+using ComDocumentAIKit;
+using ComPDFKit_Conversion.Options;
 using ComPDFKitViewer.PdfViewer;
 using PDF_Office.CustomControl;
 using PDF_Office.Helper;
@@ -72,6 +73,29 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
                 SetProperty(ref maxPageRange, value);
             }
         }
+
+        private bool oCRCheckBoxIsCheckBox = false;
+        public bool OCRCheckBoxIsCheckBox
+        {
+            get { return oCRCheckBoxIsCheckBox; }
+            set
+            {
+                SetProperty(ref oCRCheckBoxIsCheckBox, value);
+                ConverterExcelModel.Options.IsAllowOCR = oCRCheckBoxIsCheckBox;
+            }
+        }
+
+        private int languageSelectedIndex = 0;
+        public int LanguageSelectedIndex
+        {
+            get { return languageSelectedIndex; }
+            set
+            {
+                SetProperty(ref languageSelectedIndex, value);
+                SelectLanguage(languageSelectedIndex);
+
+            }
+        }
         #endregion
 
         #region 委托声明
@@ -96,7 +120,6 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
             RadioButtonCommand = new DelegateCommand<string>(radiobutton);
             CmbPageSelectionChanged = new DelegateCommand<object>(CmbPageSelectionChangedEvent);
             CmbPageTextChanged = new DelegateCommand<object>(CmbPageTextChangedEvent);
-            ConverterExcelModel.excelOptions = ConverterExcelModel.ExcelOptions();
             dialogs = dialogService;
         }
         #region 逻辑函数
@@ -132,10 +155,7 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
                 MessageBoxEx.Show("输入不对");
                 return;
             }
-            if (ConverterExcelModel.excelOptions == null) {
-                ConverterExcelModel.excelOptions = ConverterExcelModel.ExcelOptions();
-            }
-
+            ConverterExcelModel.excelOptions = ConverterExcelModel.ExcelOptions();
             DialogParameters value = new DialogParameters();
             value.Add(ParameterNames.ConverterType, "Excel");
             value.Add(ParameterNames.ConverterTypeModel, ConverterExcelModel);
@@ -248,7 +268,6 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
                     case "OnlyTextRadioBtn":
                         ConverterExcelModel.Options.WorksheetOpts = WorksheetOptions.ForTheDocument;
                         ConverterExcelModel.Options.ContentOpts = ContentOptions.OnlyText;
-                        ConverterExcelModel.excelOptions = ConverterExcelModel.ExcelOptions();
                         break;
                     default:
                         break;
@@ -264,12 +283,10 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
                 case 0:
                     ConverterExcelModel.Options.WorksheetOpts = WorksheetOptions.ForEachPage;
                     ConverterExcelModel.Options.ContentOpts = ContentOptions.AllContent;
-                    ConverterExcelModel.excelOptions = ConverterExcelModel.ExcelOptions();
                     break;
                 case 1:
                     ConverterExcelModel.Options.WorksheetOpts = WorksheetOptions.ForTheDocument;
                     ConverterExcelModel.Options.ContentOpts = ContentOptions.AllContent;
-                    ConverterExcelModel.excelOptions = ConverterExcelModel.ExcelOptions();
                     break;
                 default:
                     break;
@@ -284,15 +301,37 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
             {
                 case 0:
                     ConverterExcelModel.Options.WorksheetOpts = WorksheetOptions.ForEachTable;
-                    ConverterExcelModel.excelOptions = ConverterExcelModel.ExcelOptions();
                     break;
                 case 1:
                     ConverterExcelModel.Options.WorksheetOpts = WorksheetOptions.ForEachPage;
-                    ConverterExcelModel.excelOptions = ConverterExcelModel.ExcelOptions();
                     break;
                 case 2:
                     ConverterExcelModel.Options.WorksheetOpts = WorksheetOptions.ForTheDocument;
-                    ConverterExcelModel.excelOptions = ConverterExcelModel.ExcelOptions();
+                    break;
+                default:
+                    break;
+            }
+        }
+
+        private void SelectLanguage(int SelectedIndex)
+        {
+            
+            switch (SelectedIndex)
+            {
+                case 0:
+                    ConverterExcelModel.Options.OCRLanguage= COCRLanguage.Chinese;
+                    break;
+                case 1:
+                    ConverterExcelModel.Options.OCRLanguage = COCRLanguage.ChineseTraditional;
+                    break;
+                case 2:
+                    ConverterExcelModel.Options.OCRLanguage = COCRLanguage.English;
+                    break;
+                case 3:
+                    ConverterExcelModel.Options.OCRLanguage = COCRLanguage.Japanese;
+                    break;
+                case 4:
+                    ConverterExcelModel.Options.OCRLanguage = COCRLanguage.Korean;
                     break;
                 default:
                     break;
@@ -322,6 +361,7 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
                 if (currentViewer.Tag != null) { ConverterExcelModel.Pawssword = currentViewer.Tag.ToString(); }
                 ConverterExcelModel.InputPath = pdfViewer.Document.FilePath;
                 FileInfo fileinfo = new FileInfo(ConverterExcelModel.InputPath);
+                LanguageSelectedIndex = 0;
                 ConverterExcelModel.OutputPath = fileinfo.DirectoryName;
             }
         }

+ 51 - 1
PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterHTMLDialogViewModel.cs

@@ -1,4 +1,5 @@
-using ComPDFKitViewer.PdfViewer;
+using ComDocumentAIKit;
+using ComPDFKitViewer.PdfViewer;
 using PDF_Office.CustomControl;
 using PDF_Office.Helper;
 using PDF_Office.Model;
@@ -46,6 +47,29 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
                 SetProperty(ref maxPageRange, value);
             }
         }
+
+        private bool oCRCheckBoxIsCheckBox = false;
+        public bool OCRCheckBoxIsCheckBox
+        {
+            get { return oCRCheckBoxIsCheckBox; }
+            set
+            {
+                SetProperty(ref oCRCheckBoxIsCheckBox, value);
+                ConverterHTMLModel.Options.IsAllowOCR = oCRCheckBoxIsCheckBox;
+            }
+        }
+
+        private int languageSelectedIndex = 0;
+        public int LanguageSelectedIndex
+        {
+            get { return languageSelectedIndex; }
+            set
+            {
+                SetProperty(ref languageSelectedIndex, value);
+                SelectLanguage(languageSelectedIndex);
+
+            }
+        }
         #endregion
 
         #region 委托声明
@@ -201,6 +225,31 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
             convertpdftoword.Add(ParameterNames.FilePath, new string[] { currentViewer.Document.FilePath.ToString() });
             dialogs.ShowDialog(DialogNames.HomePageBatchProcessingDialog, convertpdftoword, e => { });
         }
+
+        private void SelectLanguage(int SelectedIndex)
+        {
+
+            switch (SelectedIndex)
+            {
+                case 0:
+                    ConverterHTMLModel.Options.OCRLanguage = COCRLanguage.Chinese;
+                    break;
+                case 1:
+                    ConverterHTMLModel.Options.OCRLanguage = COCRLanguage.ChineseTraditional;
+                    break;
+                case 2:
+                    ConverterHTMLModel.Options.OCRLanguage = COCRLanguage.English;
+                    break;
+                case 3:
+                    ConverterHTMLModel.Options.OCRLanguage = COCRLanguage.Japanese;
+                    break;
+                case 4:
+                    ConverterHTMLModel.Options.OCRLanguage = COCRLanguage.Korean;
+                    break;
+                default:
+                    break;
+            }
+        }
         #endregion
 
         #region 构架行为
@@ -225,6 +274,7 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
                 if (currentViewer.Tag != null) { ConverterHTMLModel.Pawssword = currentViewer.Tag.ToString(); }
                 ConverterHTMLModel.InputPath = pdfViewer.Document.FilePath;
                 FileInfo fileinfo = new FileInfo(ConverterHTMLModel.InputPath);
+                LanguageSelectedIndex = 0;
                 ConverterHTMLModel.OutputPath = fileinfo.DirectoryName;
             }
         }

+ 1 - 0
PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterImgDialogViewModel.cs

@@ -359,6 +359,7 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
                 if (currentViewer.Tag != null) { ConverterImgModel.Pawssword = currentViewer.Tag.ToString(); }
                 ConverterImgModel.InputPath = pdfViewer.Document.FilePath;
                 ImageTypeSelectedIndex = 0;
+                ImageDPISelectedIndex = 0;
                 FileInfo fileinfo = new FileInfo(ConverterImgModel.InputPath);
                 ConverterImgModel.OutputPath = fileinfo.DirectoryName;
                 

+ 52 - 1
PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterPPTDialogViewModel.cs

@@ -1,4 +1,5 @@
-using ComPDFKitViewer.PdfViewer;
+using ComDocumentAIKit;
+using ComPDFKitViewer.PdfViewer;
 using PDF_Office.CustomControl;
 using PDF_Office.Helper;
 using PDF_Office.Model;
@@ -46,6 +47,29 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
                 SetProperty(ref maxPageRange, value);
             }
         }
+
+        private bool oCRCheckBoxIsCheckBox = false;
+        public bool OCRCheckBoxIsCheckBox
+        {
+            get { return oCRCheckBoxIsCheckBox; }
+            set
+            {
+                SetProperty(ref oCRCheckBoxIsCheckBox, value);
+                ConverterPPTModel.Options.IsAllowOCR = oCRCheckBoxIsCheckBox;
+            }
+        }
+
+        private int languageSelectedIndex = 0;
+        public int LanguageSelectedIndex
+        {
+            get { return languageSelectedIndex; }
+            set
+            {
+                SetProperty(ref languageSelectedIndex, value);
+                SelectLanguage(languageSelectedIndex);
+
+            }
+        }
         #endregion
 
         #region 委托声明
@@ -103,6 +127,7 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
                 MessageBoxEx.Show("输入不对");
                 return;
             }
+            ConverterPPTModel.pPTOptions = ConverterPPTModel.PPTOptions();
             DialogParameters value = new DialogParameters();
             value.Add(ParameterNames.ConverterType, "PPT");
             value.Add(ParameterNames.ConverterTypeModel, ConverterPPTModel);
@@ -199,6 +224,31 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
             convertpdftoword.Add(ParameterNames.FilePath, new string[] { currentViewer.Document.FilePath.ToString() });
             dialogs.ShowDialog(DialogNames.HomePageBatchProcessingDialog, convertpdftoword, e => { });
         }
+
+        private void SelectLanguage(int SelectedIndex)
+        {
+
+            switch (SelectedIndex)
+            {
+                case 0:
+                    ConverterPPTModel.Options.OCRLanguage = COCRLanguage.Chinese;
+                    break;
+                case 1:
+                    ConverterPPTModel.Options.OCRLanguage = COCRLanguage.ChineseTraditional;
+                    break;
+                case 2:
+                    ConverterPPTModel.Options.OCRLanguage = COCRLanguage.English;
+                    break;
+                case 3:
+                    ConverterPPTModel.Options.OCRLanguage = COCRLanguage.Japanese;
+                    break;
+                case 4:
+                    ConverterPPTModel.Options.OCRLanguage = COCRLanguage.Korean;
+                    break;
+                default:
+                    break;
+            }
+        }
         #endregion
 
         #region 构架行为
@@ -223,6 +273,7 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
                 if (currentViewer.Tag != null) { ConverterPPTModel.Pawssword = currentViewer.Tag.ToString(); }
                 ConverterPPTModel.InputPath = pdfViewer.Document.FilePath;
                 FileInfo fileinfo = new FileInfo(ConverterPPTModel.InputPath);
+                LanguageSelectedIndex = 0;
                 ConverterPPTModel.OutputPath = fileinfo.DirectoryName;
             }
         }

+ 7 - 7
PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterProgressBarDialogViewModel.cs

@@ -38,7 +38,7 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
             }
         }
 
-        private string _pageNumber = "";
+        private string _pageNumber = "0";
         /// <value>
         /// 总页数
         /// </value>
@@ -95,7 +95,7 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
                         {
                             ConverterCSVModel.PageIndexLists[i] = ConverterCSVModel.PageIndexLists[i] + 1;
                         }
-                        result = await ConverterHelper.CSVConvert(ConverterCSVModel.InputPath, ConverterCSVModel.OutputPath, GetProgress, ConverterCSVModel.PageIndexLists, ConverterCSVModel.Pawssword);
+                        result = await ConverterHelper.CSVConvert(ConverterCSVModel.InputPath, ConverterCSVModel.OutputPath, GetProgress, ConverterCSVModel.PageIndexLists, ConverterCSVModel.Pawssword, ConverterCSVModel.csvOptions);
                        
                     }
                     break;
@@ -134,7 +134,7 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
                         for (int i=0; ConverterImgModel.PageIndexLists.Count>i;i++) {
                             ConverterImgModel.PageIndexLists[i] = ConverterImgModel.PageIndexLists[i] + 1;
                         }
-                        result = await ConverterHelper.ImgConvert(ConverterImgModel.InputPath, ConverterImgModel.OutputPath, GetProgress, ConverterImgModel.PageIndexLists, ConverterImgModel.Pawssword, ConverterImgModel.imageType);
+                        result = await ConverterHelper.ImgConvert(ConverterImgModel.InputPath, ConverterImgModel.OutputPath, GetProgress, ConverterImgModel.PageIndexLists, ConverterImgModel.Pawssword, ConverterImgModel.imageType, ConverterImgModel.imgOptions);
                     }
                     break;
                 case "PPT":
@@ -147,7 +147,7 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
                         {
                             ConverterPPTModel.PageIndexLists[i] = ConverterPPTModel.PageIndexLists[i] + 1;
                         }
-                        result = await ConverterHelper.PPTConvert(ConverterPPTModel.InputPath, ConverterPPTModel.OutputPath, GetProgress, ConverterPPTModel.PageIndexLists, ConverterPPTModel.Pawssword);
+                        result = await ConverterHelper.PPTConvert(ConverterPPTModel.InputPath, ConverterPPTModel.OutputPath, GetProgress, ConverterPPTModel.PageIndexLists, ConverterPPTModel.Pawssword, ConverterPPTModel.pPTOptions);
                     }
                     break;
                 case "RTF":
@@ -160,7 +160,7 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
                         {
                             ConverterRTFModel.PageIndexLists[i] = ConverterRTFModel.PageIndexLists[i] + 1;
                         }
-                        result = await ConverterHelper.RTFConvert(ConverterRTFModel.InputPath, ConverterRTFModel.OutputPath, GetProgress, ConverterRTFModel.PageIndexLists, ConverterRTFModel.Pawssword);
+                        result = await ConverterHelper.RTFConvert(ConverterRTFModel.InputPath, ConverterRTFModel.OutputPath, GetProgress, ConverterRTFModel.PageIndexLists, ConverterRTFModel.Pawssword, ConverterRTFModel.rTFOptions);
                     }
                         break;
                 case "Text":
@@ -173,7 +173,7 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
                         {
                             ConverterTextModel.PageIndexLists[i] = ConverterTextModel.PageIndexLists[i] + 1;
                         }
-                        result = await ConverterHelper.TxtConvert(ConverterTextModel.InputPath, ConverterTextModel.OutputPath, GetProgress, ConverterTextModel.PageIndexLists, ConverterTextModel.Pawssword);
+                        result = await ConverterHelper.TxtConvert(ConverterTextModel.InputPath, ConverterTextModel.OutputPath, GetProgress, ConverterTextModel.PageIndexLists, ConverterTextModel.Pawssword, ConverterTextModel.txtOptions);
                     }
                     break;
                 case "Word":
@@ -185,7 +185,7 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
                         {
                             ConverterWordModel.PageIndexLists[i] = ConverterWordModel.PageIndexLists[i] + 1;
                         }
-                        result = await ConverterHelper.WordConvert(ConverterWordModel.InputPath, ConverterWordModel.OutputPath, GetProgress, ConverterWordModel.PageIndexLists, ConverterWordModel.Pawssword);
+                        result = await ConverterHelper.WordConvert(ConverterWordModel.InputPath, ConverterWordModel.OutputPath, GetProgress, ConverterWordModel.PageIndexLists, ConverterWordModel.Pawssword, ConverterWordModel.wordOptions);
                     }
                     break;
                 default:

+ 52 - 2
PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterRTFDialogViewModel.cs

@@ -1,4 +1,5 @@
-using ComPDFKitViewer.PdfViewer;
+using ComDocumentAIKit;
+using ComPDFKitViewer.PdfViewer;
 using PDF_Office.CustomControl;
 using PDF_Office.Helper;
 using PDF_Office.Model;
@@ -46,6 +47,29 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
                 SetProperty(ref maxPageRange, value);
             }
         }
+
+        private bool oCRCheckBoxIsCheckBox = false;
+        public bool OCRCheckBoxIsCheckBox
+        {
+            get { return oCRCheckBoxIsCheckBox; }
+            set
+            {
+                SetProperty(ref oCRCheckBoxIsCheckBox, value);
+                ConverterRTFModel.Options.IsAllowOCR = oCRCheckBoxIsCheckBox;
+            }
+        }
+
+        private int languageSelectedIndex = 0;
+        public int LanguageSelectedIndex
+        {
+            get { return languageSelectedIndex; }
+            set
+            {
+                SetProperty(ref languageSelectedIndex, value);
+                SelectLanguage(languageSelectedIndex);
+
+            }
+        }
         #endregion
         #region 委托声明
         public DelegateCommand CancelCommand { get; set; }
@@ -103,7 +127,7 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
                 MessageBoxEx.Show("输入不对");
                 return;
             }
-            //result = await ConverterHelper.TxtConvert(ConverterTextModel.InputPath, ConverterTextModel.OutputPath, ConverterTextModel.GetProgress, ConverterTextModel.PageIndexLists, ConverterTextModel.Pawssword);
+            ConverterRTFModel.rTFOptions = ConverterRTFModel.RTFOptions();
             DialogParameters value = new DialogParameters();
             value.Add(ParameterNames.ConverterType, "RTF");
             value.Add(ParameterNames.ConverterTypeModel, ConverterRTFModel);
@@ -199,6 +223,31 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
             convertpdftoword.Add(ParameterNames.FilePath, new string[] { currentViewer.Document.FilePath.ToString() });
             dialogs.ShowDialog(DialogNames.HomePageBatchProcessingDialog, convertpdftoword, e => { });
         }
+
+        private void SelectLanguage(int SelectedIndex)
+        {
+
+            switch (SelectedIndex)
+            {
+                case 0:
+                    ConverterRTFModel.Options.OCRLanguage = COCRLanguage.Chinese;
+                    break;
+                case 1:
+                    ConverterRTFModel.Options.OCRLanguage = COCRLanguage.ChineseTraditional;
+                    break;
+                case 2:
+                    ConverterRTFModel.Options.OCRLanguage = COCRLanguage.English;
+                    break;
+                case 3:
+                    ConverterRTFModel.Options.OCRLanguage = COCRLanguage.Japanese;
+                    break;
+                case 4:
+                    ConverterRTFModel.Options.OCRLanguage = COCRLanguage.Korean;
+                    break;
+                default:
+                    break;
+            }
+        }
         #endregion
 
         #region 构架行为
@@ -223,6 +272,7 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
                 if (currentViewer.Tag != null) { ConverterRTFModel.Pawssword = currentViewer.Tag.ToString(); }
                 ConverterRTFModel.InputPath = pdfViewer.Document.FilePath;
                 FileInfo fileinfo = new FileInfo(ConverterRTFModel.InputPath);
+                LanguageSelectedIndex = 0;
                 ConverterRTFModel.OutputPath = fileinfo.DirectoryName;
             }
         }

+ 51 - 1
PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterTextDialogViewModel.cs

@@ -1,4 +1,5 @@
-using ComPDFKitViewer.PdfViewer;
+using ComDocumentAIKit;
+using ComPDFKitViewer.PdfViewer;
 using PDF_Office.CustomControl;
 using PDF_Office.Helper;
 using PDF_Office.Model;
@@ -48,6 +49,28 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
             }
         }
 
+        private bool oCRCheckBoxIsCheckBox = false;
+        public bool OCRCheckBoxIsCheckBox
+        {
+            get { return oCRCheckBoxIsCheckBox; }
+            set
+            {
+                SetProperty(ref oCRCheckBoxIsCheckBox, value);
+                ConverterTextModel.Options.IsAllowOCR = oCRCheckBoxIsCheckBox;
+            }
+        }
+
+        private int languageSelectedIndex = 0;
+        public int LanguageSelectedIndex
+        {
+            get { return languageSelectedIndex; }
+            set
+            {
+                SetProperty(ref languageSelectedIndex, value);
+                SelectLanguage(languageSelectedIndex);
+
+            }
+        }
         #endregion
 
         #region 委托声明
@@ -104,6 +127,7 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
                 MessageBoxEx.Show("输入不对");
                 return;
             }
+            ConverterTextModel.txtOptions = ConverterTextModel.TxtOptions();
             DialogParameters value = new DialogParameters();
             value.Add(ParameterNames.ConverterType, "Text");
             value.Add(ParameterNames.ConverterTypeModel, ConverterTextModel);
@@ -199,6 +223,31 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
             convertpdftoword.Add(ParameterNames.FilePath, new string[] { currentViewer.Document.FilePath.ToString() });
             dialogs.ShowDialog(DialogNames.HomePageBatchProcessingDialog, convertpdftoword, e => { });
         }
+
+        private void SelectLanguage(int SelectedIndex)
+        {
+
+            switch (SelectedIndex)
+            {
+                case 0:
+                    ConverterTextModel.Options.OCRLanguage = COCRLanguage.Chinese;
+                    break;
+                case 1:
+                    ConverterTextModel.Options.OCRLanguage = COCRLanguage.ChineseTraditional;
+                    break;
+                case 2:
+                    ConverterTextModel.Options.OCRLanguage = COCRLanguage.English;
+                    break;
+                case 3:
+                    ConverterTextModel.Options.OCRLanguage = COCRLanguage.Japanese;
+                    break;
+                case 4:
+                    ConverterTextModel.Options.OCRLanguage = COCRLanguage.Korean;
+                    break;
+                default:
+                    break;
+            }
+        }
         #endregion
 
         #region 构架行为
@@ -222,6 +271,7 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
                 MaxPageRange = currentViewer.Document.PageCount;
                 if (currentViewer.Tag != null) { ConverterTextModel.Pawssword = currentViewer.Tag.ToString(); }
                 ConverterTextModel.InputPath = pdfViewer.Document.FilePath;
+                LanguageSelectedIndex = 0;
                 FileInfo fileinfo = new FileInfo(ConverterTextModel.InputPath);
                 ConverterTextModel.OutputPath=fileinfo.DirectoryName;
             }

+ 52 - 1
PDF Office/ViewModels/Dialog/ConverterDialogs/ConverterWordDialogViewModel.cs

@@ -1,4 +1,5 @@
-using ComPDFKitViewer.PdfViewer;
+using ComDocumentAIKit;
+using ComPDFKitViewer.PdfViewer;
 using PDF_Office.CustomControl;
 using PDF_Office.Helper;
 using PDF_Office.Model;
@@ -46,6 +47,29 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
                 SetProperty(ref maxPageRange, value);
             }
         }
+
+        private bool oCRCheckBoxIsCheckBox = false;
+        public bool OCRCheckBoxIsCheckBox
+        {
+            get { return oCRCheckBoxIsCheckBox; }
+            set
+            {
+                SetProperty(ref oCRCheckBoxIsCheckBox, value);
+                ConverterWordModel.Options.IsAllowOCR = oCRCheckBoxIsCheckBox;
+            }
+        }
+
+        private int languageSelectedIndex = 0;
+        public int LanguageSelectedIndex
+        {
+            get { return languageSelectedIndex; }
+            set
+            {
+                SetProperty(ref languageSelectedIndex, value);
+                SelectLanguage(languageSelectedIndex);
+
+            }
+        }
         #endregion
 
         #region 委托声明
@@ -105,6 +129,7 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
                 MessageBoxEx.Show("输入不对");
                 return;
             }
+            ConverterWordModel.wordOptions = ConverterWordModel.WordOptions();
             DialogParameters value = new DialogParameters();
             value.Add(ParameterNames.ConverterType, "Word");
             value.Add(ParameterNames.ConverterTypeModel, ConverterWordModel);
@@ -218,6 +243,31 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
             }
 
         }
+
+        private void SelectLanguage(int SelectedIndex)
+        {
+
+            switch (SelectedIndex)
+            {
+                case 0:
+                    ConverterWordModel.Options.OCRLanguage = COCRLanguage.Chinese;
+                    break;
+                case 1:
+                    ConverterWordModel.Options.OCRLanguage = COCRLanguage.ChineseTraditional;
+                    break;
+                case 2:
+                    ConverterWordModel.Options.OCRLanguage = COCRLanguage.English;
+                    break;
+                case 3:
+                    ConverterWordModel.Options.OCRLanguage = COCRLanguage.Japanese;
+                    break;
+                case 4:
+                    ConverterWordModel.Options.OCRLanguage = COCRLanguage.Korean;
+                    break;
+                default:
+                    break;
+            }
+        }
         #endregion
 
         #region 构架行为
@@ -241,6 +291,7 @@ namespace PDF_Office.ViewModels.Dialog.ConverterDialogs
                 MaxPageRange = currentViewer.Document.PageCount;
                 if (currentViewer.Tag != null) { ConverterWordModel.Pawssword = currentViewer.Tag.ToString(); }
                 ConverterWordModel.InputPath = pdfViewer.Document.FilePath;
+                LanguageSelectedIndex = 0;
                 FileInfo fileinfo = new FileInfo(ConverterWordModel.InputPath);
                 ConverterWordModel.OutputPath = fileinfo.DirectoryName;
             }

+ 95 - 13
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterDialogViewModel.cs

@@ -1,4 +1,5 @@
-using ComPDFKit.PDFDocument;
+using ComDocumentAIKit;
+using ComPDFKit.PDFDocument;
 using ComPDFKit_Conversion.Converter;
 using Microsoft.Office.Interop.Excel;
 using Microsoft.Office.Interop.Word;
@@ -29,7 +30,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
     {
         #region 参数和属性
         private List<string> fileNames;
-
+        public HomePageConverterDialogModel ConverterDialogModel = new HomePageConverterDialogModel();
         public HomePageConverterCSVModel ConverterCSVModel = new HomePageConverterCSVModel();
         public HomePageConverterExcelModel ConverterExcelModel = new HomePageConverterExcelModel();
         public HomePageConverterHTMLModel ConverterHTMLModel = new HomePageConverterHTMLModel();
@@ -60,9 +61,9 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             this.ConverterTypeFamily.Add("Excel");
             this.ConverterTypeFamily.Add("PPT");
             this.ConverterTypeFamily.Add("RTF");
+            this.ConverterTypeFamily.Add("CSV");
             this.ConverterTypeFamily.Add("HTML");
             this.ConverterTypeFamily.Add("Text");
-            this.ConverterTypeFamily.Add("CSV");
             this.ConverterTypeFamily.Add("Img");
         }
 
@@ -173,6 +174,40 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             }
         }
 
+        private Visibility oCRVisibility = Visibility.Visible;
+        public Visibility OCRVisibility
+        {
+            get { return oCRVisibility; }
+            set
+            {
+                SetProperty(ref oCRVisibility, value);
+                RaisePropertyChanged();
+
+            }
+        }
+       
+        private bool oCRCheckBoxIsCheckBox = false;
+        public bool OCRCheckBoxIsCheckBox
+        {
+            get { return oCRCheckBoxIsCheckBox; }
+            set
+            {
+                SetProperty(ref oCRCheckBoxIsCheckBox, value);
+                ConverterDialogModel.Options.IsAllowOCR = oCRCheckBoxIsCheckBox;
+            }
+        }
+
+        private int languageSelectedIndex = 0;
+        public int LanguageSelectedIndex
+        {
+            get { return languageSelectedIndex; }
+            set
+            {
+                SetProperty(ref languageSelectedIndex, value);
+                SelectLanguage(languageSelectedIndex);
+
+            }
+        }
         #endregion
 
         #region 委托声明
@@ -219,6 +254,33 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             pageIndex.ToString();
         }
 
+        private void SelectLanguage(int SelectedIndex)
+        {
+
+            switch (SelectedIndex)
+            {
+                case 0:
+                    ConverterDialogModel.Options.OCRLanguage = COCRLanguage.Chinese;
+                    break;
+                case 1:
+                    ConverterDialogModel.Options.OCRLanguage = COCRLanguage.ChineseTraditional;
+                    break;
+                case 2:
+                    ConverterDialogModel.Options.OCRLanguage = COCRLanguage.English;
+                    break;
+                case 3:
+                    ConverterDialogModel.Options.OCRLanguage = COCRLanguage.Japanese;
+                    break;
+                case 4:
+                    ConverterDialogModel.Options.OCRLanguage = COCRLanguage.Korean;
+                    break;
+                default:
+                    break;
+            }
+        }
+
+        
+
         private async void convert()
         {
             HomePageBatchProcessingDialogModel.closeDialog = true;
@@ -288,55 +350,68 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                     case 0:
                         if (ConverterWordModel != null)
                         {
+                            ConverterWordModel.Options.OCRLanguage = ConverterDialogModel.Options.OCRLanguage;
+                            ConverterWordModel.Options.IsAllowOCR = ConverterDialogModel.Options.IsAllowOCR;
+                            
                             PageNumber = ConverterWordModel.PageIndexLists.Count().ToString();
-                            result = await ConverterHelper.WordConvert(filename, OutputPath, GetProgress, PageIndexLists, DocPassword);
+                            result = await ConverterHelper.WordConvert(filename, OutputPath, GetProgress, PageIndexLists, DocPassword,ConverterWordModel.WordOptions());
                         }
                         break;
 
                     case 1:
                         if (ConverterExcelModel != null)
                         {
+                            ConverterExcelModel.Options.OCRLanguage = ConverterDialogModel.Options.OCRLanguage;
+                            ConverterExcelModel.Options.IsAllowOCR = ConverterDialogModel.Options.IsAllowOCR;
                             PageNumber = ConverterExcelModel.PageIndexLists.Count().ToString();
-                            result = await ConverterHelper.ExcelConvert(filename, OutputPath, GetProgress, PageIndexLists, DocPassword, ConverterExcelModel.excelOptions);
+                            result = await ConverterHelper.ExcelConvert(filename, OutputPath, GetProgress, PageIndexLists, DocPassword, ConverterExcelModel.ExcelOptions());
                         }
                         break;
                     case 2:
 
                         if (ConverterPPTModel != null)
                         {
+                            ConverterPPTModel.Options.OCRLanguage = ConverterDialogModel.Options.OCRLanguage;
+                            ConverterPPTModel.Options.IsAllowOCR = ConverterDialogModel.Options.IsAllowOCR;
                             PageNumber = ConverterPPTModel.PageIndexLists.Count().ToString();
-                            result = await ConverterHelper.PPTConvert(filename, OutputPath, GetProgress, PageIndexLists, DocPassword);
+                            result = await ConverterHelper.PPTConvert(filename, OutputPath, GetProgress, PageIndexLists, DocPassword,ConverterPPTModel.PPTOptions());
                         }
                         break;
                     case 3:
 
                         if (ConverterRTFModel != null)
                         {
+                            ConverterPPTModel.Options.OCRLanguage = ConverterDialogModel.Options.OCRLanguage;
+                            ConverterPPTModel.Options.IsAllowOCR = ConverterDialogModel.Options.IsAllowOCR;
                             PageNumber = ConverterRTFModel.PageIndexLists.Count().ToString();
                             result = await ConverterHelper.RTFConvert(filename, OutputPath, GetProgress, PageIndexLists, DocPassword);
                         }
                         break;
-                    case 4:
+                    case 5:
 
                         if (ConverterHTMLModel != null)
                         {
+                            ConverterHTMLModel.Options.OCRLanguage = ConverterDialogModel.Options.OCRLanguage;
+                            ConverterHTMLModel.Options.IsAllowOCR = ConverterDialogModel.Options.IsAllowOCR;
                             PageNumber = ConverterHTMLModel.PageIndexLists.Count().ToString();
                             result = await ConverterHelper.HTMLConvert(filename, OutputPath, GetProgress, PageIndexLists, DocPassword, ConverterHTMLModel.HTMLOptions());
                         }
                         break;
-                    case 5:
+                    case 6:
 
                         if (ConverterTextModel != null)
                         {
+                            ConverterTextModel.Options.OCRLanguage = ConverterDialogModel.Options.OCRLanguage;
+                            ConverterTextModel.Options.IsAllowOCR = ConverterDialogModel.Options.IsAllowOCR;
                             PageNumber = ConverterTextModel.PageIndexLists.Count().ToString();
-                            result = await ConverterHelper.TxtConvert(filename, OutputPath, GetProgress, PageIndexLists, DocPassword);
+                            result = await ConverterHelper.TxtConvert(filename, OutputPath, GetProgress, PageIndexLists, DocPassword, ConverterTextModel.TxtOptions());
                         }
                         break;
-                    case 6:
+                    case 4:
                         if (ConverterCSVModel != null)
                         {
                             PageNumber = ConverterCSVModel.PageIndexLists.Count().ToString();
-                            result = await ConverterHelper.CSVConvert(filename, OutputPath, GetProgress, PageIndexLists, DocPassword);
+                            result = await ConverterHelper.CSVConvert(filename, OutputPath, GetProgress, PageIndexLists, DocPassword, ConverterCSVModel.CSVOptions());
                         }
                         break;
                     case 7:
@@ -344,7 +419,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                         if (ConverterImgModel != null)
                         {
                             PageNumber = ConverterImgModel.PageIndexLists.Count().ToString();
-                            result = await ConverterHelper.ImgConvert(filename, OutputPath, GetProgress, PageIndexLists, DocPassword, ConverterImgModel.imageType);
+                            result = await ConverterHelper.ImgConvert(filename, OutputPath, GetProgress, PageIndexLists, DocPassword, ConverterImgModel.imageType, ConverterImgModel.ImgOptions());
                         }
                         break;
                     default:
@@ -636,7 +711,14 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             ConverterTypeIndex=index;
             NavigationParameters param = new NavigationParameters();
             param.Add(ParameterNames.ViewContentViewModel, this);
-            if (index == 0 || index == 1 || index == 6 || index == 7)
+            if (index == 7 || index == 4)
+            {
+                OCRVisibility = Visibility.Hidden;
+            }
+            else {
+                OCRVisibility = Visibility.Visible;
+            }
+            if (index == 0 || index == 1 || index == 4 || index == 7)
             {
                 ConverterVisible = Visibility.Collapsed;
                 ConverterRegion.RequestNavigate(ConverterRegionName, HomePageConverterDialogModel.GetConverter[index], param);

+ 0 - 6
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterExcelViewModel.cs

@@ -67,7 +67,6 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                     case "OnlyTextRadioBtn":
                         homePageConverterDialogViewModel.ConverterExcelModel.Options.WorksheetOpts = WorksheetOptions.ForTheDocument;
                         homePageConverterDialogViewModel.ConverterExcelModel.Options.ContentOpts = ContentOptions.OnlyText;
-                        homePageConverterDialogViewModel.ConverterExcelModel.excelOptions = homePageConverterDialogViewModel.ConverterExcelModel.ExcelOptions();
                         break;
                     default:
                         break;
@@ -82,12 +81,10 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
                 case 0:
                     homePageConverterDialogViewModel.ConverterExcelModel.Options.WorksheetOpts = WorksheetOptions.ForEachPage;
                     homePageConverterDialogViewModel.ConverterExcelModel.Options.ContentOpts = ContentOptions.AllContent;
-                    homePageConverterDialogViewModel.ConverterExcelModel.excelOptions = homePageConverterDialogViewModel.ConverterExcelModel.ExcelOptions();
                     break;
                 case 1:
                     homePageConverterDialogViewModel.ConverterExcelModel.Options.WorksheetOpts = WorksheetOptions.ForTheDocument;
                     homePageConverterDialogViewModel.ConverterExcelModel.Options.ContentOpts = ContentOptions.AllContent;
-                    homePageConverterDialogViewModel.ConverterExcelModel.excelOptions = homePageConverterDialogViewModel.ConverterExcelModel.ExcelOptions();
                     break;
                 default:
                     break;
@@ -102,15 +99,12 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             {
                 case 0:
                     homePageConverterDialogViewModel.ConverterExcelModel.Options.WorksheetOpts = WorksheetOptions.ForEachTable;
-                    homePageConverterDialogViewModel.ConverterExcelModel.excelOptions = homePageConverterDialogViewModel.ConverterExcelModel.ExcelOptions();
                     break;
                 case 1:
                     homePageConverterDialogViewModel.ConverterExcelModel.Options.WorksheetOpts = WorksheetOptions.ForEachPage;
-                    homePageConverterDialogViewModel.ConverterExcelModel.excelOptions = homePageConverterDialogViewModel.ConverterExcelModel.ExcelOptions();
                     break;
                 case 2:
                     homePageConverterDialogViewModel.ConverterExcelModel.Options.WorksheetOpts = WorksheetOptions.ForEachPage;
-                    homePageConverterDialogViewModel.ConverterExcelModel.excelOptions = homePageConverterDialogViewModel.ConverterExcelModel.ExcelOptions();
                     break;
                 default:
                     break;

+ 4 - 0
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterImgViewModel.cs

@@ -1,5 +1,6 @@
 using ComPDFKit_Conversion.Converter;
 using ComPDFKit_Conversion.Options;
+using Microsoft.Office.Interop.Word;
 using PDF_Office.Model;
 using Prism.Commands;
 using Prism.Mvvm;
@@ -7,6 +8,7 @@ using Prism.Regions;
 using System;
 using System.Collections.Generic;
 using System.Linq;
+using System.Reflection;
 
 namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter
 {
@@ -115,6 +117,8 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcess
             if (homePageConverterVM != null)
             {
                 homePageConverterDialogViewModel = homePageConverterVM;
+                UpdateImageDpi(0);
+                UpdateImageType(0);
             }
         }
 

+ 7 - 2
PDF Office/Views/Dialog/ConverterDialogs/ConverterExcelDialog.xaml

@@ -54,10 +54,15 @@
                         <StackPanel Orientation="Vertical"  Margin="0,16,0,0">
                             <StackPanel Orientation="Vertical">
                                 <TextBlock Text="文本识别设置:" HorizontalAlignment="Left" Width="84" Height="20"/>
-                                <CheckBox Name="OCRCheckBox"  Margin="0,5,0,0">
+                                <CheckBox Name="OCRCheckBox"  Margin="0,5,0,0" IsChecked="{Binding OCRCheckBoxIsCheckBox}">
                                     <TextBlock Text="在需要时识别文本"/>
                                 </CheckBox>
-                                <ComboBox IsEnabled="{Binding ElementName=OCRCheckBox,Path=IsChecked}"  Margin="0,6,0,0" Width="228" Height="28.55" HorizontalAlignment="Left">
+                                <ComboBox IsEnabled="{Binding ElementName=OCRCheckBox,Path=IsChecked}"  Margin="0,6,0,0" Width="228" Height="28.55" HorizontalAlignment="Left" SelectedIndex="{Binding LanguageSelectedIndex}">
+                                    <ComboBoxItem Content="Chinese Simplified"/>
+                                    <ComboBoxItem Content="Chinese Traditional"/>
+                                    <ComboBoxItem Content="English"/>
+                                    <ComboBoxItem Content="Japan"/>
+                                    <ComboBoxItem Content="Korean"/>
                                 </ComboBox>
                             </StackPanel>
                             <StackPanel Orientation="Vertical" Margin="0,14,0,0">

+ 7 - 2
PDF Office/Views/Dialog/ConverterDialogs/ConverterHTMLDialog.xaml

@@ -30,10 +30,15 @@
                     <StackPanel Orientation="Vertical"  Margin="18,16,0,0">
                         <StackPanel Orientation="Vertical">
                             <TextBlock Text="文本识别设置:" HorizontalAlignment="Left" Width="84" Height="20"/>
-                            <CheckBox Name="OCRCheckBox"  Margin="0,5,0,0">
+                            <CheckBox Name="OCRCheckBox"  Margin="0,5,0,0" IsChecked="{Binding OCRCheckBoxIsCheckBox}">
                                 <TextBlock Text="在需要时识别文本"/>
                             </CheckBox>
-                            <ComboBox IsEnabled="{Binding ElementName=OCRCheckBox,Path=IsChecked}"  Margin="0,6,0,0" Width="228" Height="28.55" HorizontalAlignment="Left">
+                            <ComboBox IsEnabled="{Binding ElementName=OCRCheckBox,Path=IsChecked}"  Margin="0,6,0,0" Width="228" Height="28.55" HorizontalAlignment="Left" SelectedIndex="{Binding LanguageSelectedIndex}">
+                                <ComboBoxItem Content="Chinese Simplified"/>
+                                <ComboBoxItem Content="Chinese Traditional"/>
+                                <ComboBoxItem Content="English"/>
+                                <ComboBoxItem Content="Japan"/>
+                                <ComboBoxItem Content="Korean"/>
                             </ComboBox>
                         </StackPanel>
                         <StackPanel Orientation="Vertical" Margin="0,14,0,0">

+ 2 - 2
PDF Office/Views/Dialog/ConverterDialogs/ConverterImgDialog.xaml

@@ -45,7 +45,7 @@
                                 ItemsSource="{Binding ImageTypeFamily}"
                                 SelectedIndex="{Binding ImageTypeSelectedIndex, Mode=TwoWay}"
                                 />
-                            <!--<ComboBox
+                            <ComboBox
                                 Name="ImageDPIComboBox"
                                 Width="228"
                                 Height="32"
@@ -53,7 +53,7 @@
                                 HorizontalAlignment="Left"
                                 ItemsSource="{Binding ImageDPIFamily}"
                                 SelectedIndex="{Binding ImageDPISelectedIndex, Mode=TwoWay}"
-                                />-->
+                                />
                         </StackPanel>
                         <StackPanel Margin="0,16,0,0">
                             <TextBlock

+ 7 - 2
PDF Office/Views/Dialog/ConverterDialogs/ConverterPPTDialog.xaml

@@ -30,10 +30,15 @@
                     <StackPanel Orientation="Vertical"  Margin="18,16,0,0">
                         <StackPanel Orientation="Vertical">
                             <TextBlock Text="文本识别设置:" HorizontalAlignment="Left" Width="84" Height="20"/>
-                            <CheckBox Name="OCRCheckBox"  Margin="0,5,0,0">
+                            <CheckBox Name="OCRCheckBox"  Margin="0,5,0,0" IsChecked="{Binding OCRCheckBoxIsCheckBox}" >
                                 <TextBlock Text="在需要时识别文本"/>
                             </CheckBox>
-                            <ComboBox IsEnabled="{Binding ElementName=OCRCheckBox,Path=IsChecked}"  Margin="0,6,0,0" Width="228" Height="28.55" HorizontalAlignment="Left">
+                            <ComboBox IsEnabled="{Binding ElementName=OCRCheckBox,Path=IsChecked}"  Margin="0,6,0,0" Width="228" Height="28.55" HorizontalAlignment="Left" SelectedIndex="{Binding LanguageSelectedIndex}">
+                                <ComboBoxItem Content="Chinese Simplified"/>
+                                <ComboBoxItem Content="Chinese Traditional"/>
+                                <ComboBoxItem Content="English"/>
+                                <ComboBoxItem Content="Japan"/>
+                                <ComboBoxItem Content="Korean"/>
                             </ComboBox>
                         </StackPanel>
                         <StackPanel Orientation="Vertical" Margin="0,14,0,0">

+ 7 - 2
PDF Office/Views/Dialog/ConverterDialogs/ConverterRTFDialog.xaml

@@ -30,10 +30,15 @@
                     <StackPanel Orientation="Vertical"  Margin="18,16,0,0">
                         <StackPanel Orientation="Vertical">
                             <TextBlock Text="文本识别设置:" HorizontalAlignment="Left" Width="84" Height="20"/>
-                            <CheckBox Name="OCRCheckBox"  Margin="0,5,0,0">
+                            <CheckBox Name="OCRCheckBox"  Margin="0,5,0,0" IsChecked="{Binding OCRCheckBoxIsCheckBox}" >
                                 <TextBlock Text="在需要时识别文本"/>
                             </CheckBox>
-                            <ComboBox IsEnabled="{Binding ElementName=OCRCheckBox,Path=IsChecked}"  Margin="0,6,0,0" Width="228" Height="28.55" HorizontalAlignment="Left">
+                            <ComboBox IsEnabled="{Binding ElementName=OCRCheckBox,Path=IsChecked}"  Margin="0,6,0,0" Width="228" Height="28.55" HorizontalAlignment="Left" SelectedIndex="{Binding LanguageSelectedIndex}">
+                                <ComboBoxItem Content="Chinese Simplified"/>
+                                <ComboBoxItem Content="Chinese Traditional"/>
+                                <ComboBoxItem Content="English"/>
+                                <ComboBoxItem Content="Japan"/>
+                                <ComboBoxItem Content="Korean"/>
                             </ComboBox>
                         </StackPanel>
                         <StackPanel Orientation="Vertical" Margin="0,14,0,0">

+ 7 - 2
PDF Office/Views/Dialog/ConverterDialogs/ConverterTextDialog.xaml

@@ -30,10 +30,15 @@
                     <StackPanel Orientation="Vertical"  Margin="18,16,0,0">
                         <StackPanel Orientation="Vertical">
                             <TextBlock Text="文本识别设置:" HorizontalAlignment="Left" Width="84" Height="20"/>
-                            <CheckBox Name="OCRCheckBox"  Margin="0,5,0,0">
+                            <CheckBox Name="OCRCheckBox"  Margin="0,5,0,0" IsChecked="{Binding OCRCheckBoxIsCheckBox}">
                                 <TextBlock Text="在需要时识别文本"/>
                             </CheckBox>
-                            <ComboBox IsEnabled="{Binding ElementName=OCRCheckBox,Path=IsChecked}"  Margin="0,6,0,0" Width="228" Height="28.55" HorizontalAlignment="Left">
+                            <ComboBox IsEnabled="{Binding ElementName=OCRCheckBox,Path=IsChecked}" Margin="0,6,0,0" Width="228" Height="28.55" HorizontalAlignment="Left" SelectedIndex="{Binding LanguageSelectedIndex}">
+                                <ComboBoxItem Content="Chinese Simplified"/>
+                                <ComboBoxItem Content="Chinese Traditional"/>
+                                <ComboBoxItem Content="English"/>
+                                <ComboBoxItem Content="Japan"/>
+                                <ComboBoxItem Content="Korean"/>
                             </ComboBox>
                         </StackPanel>
                         <StackPanel Orientation="Vertical" Margin="0,14,0,0">

+ 7 - 2
PDF Office/Views/Dialog/ConverterDialogs/ConverterWordDialog.xaml

@@ -42,10 +42,15 @@
                         <StackPanel Orientation="Vertical"  Margin="0,17,0,0">
                             <StackPanel Orientation="Vertical">
                                 <TextBlock Text="文本识别设置:" HorizontalAlignment="Left" Width="84" Height="20"/>
-                                <CheckBox Name="OCRCheckBox"  Margin="0,5,0,0">
+                                <CheckBox Name="OCRCheckBox"  Margin="0,5,0,0" IsChecked="{Binding OCRCheckBoxIsCheckBox}">
                                     <TextBlock Text="在需要时识别文本"/>
                                 </CheckBox>
-                                <ComboBox IsEnabled="{Binding ElementName=OCRCheckBox,Path=IsChecked}"  Margin="0,6,0,0" Width="228" Height="28.55" HorizontalAlignment="Left">
+                                <ComboBox IsEnabled="{Binding ElementName=OCRCheckBox,Path=IsChecked}"  Margin="0,6,0,0" Width="228" Height="28.55" HorizontalAlignment="Left" SelectedIndex="{Binding LanguageSelectedIndex}">
+                                    <ComboBoxItem Content="Chinese Simplified"/>
+                                    <ComboBoxItem Content="Chinese Traditional"/>
+                                    <ComboBoxItem Content="English"/>
+                                    <ComboBoxItem Content="Japan"/>
+                                    <ComboBoxItem Content="Korean"/>
                                 </ComboBox>
                             </StackPanel>
                             <StackPanel Orientation="Vertical" Margin="0,14,0,0">

+ 8 - 3
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterDialog.xaml

@@ -146,12 +146,17 @@
                     </ComboBox>
                 </StackPanel>
                 <ContentControl Margin="0,18,0,0" x:Name="PrintMod" prism:RegionManager.RegionName="{Binding ConverterRegionName}"   Visibility="{Binding ConverterVisible}"/>
-                <StackPanel Orientation="Vertical" Margin="0,18,0,0">
+                <StackPanel Orientation="Vertical" Margin="0,18,0,0" Visibility="{Binding OCRVisibility}">
                     <TextBlock Text="文本识别设置:" HorizontalAlignment="Left" Width="84" Height="20"/>
-                    <CheckBox Name="OCRCheckBox"  Margin="0,5,0,0">
+                    <CheckBox Name="OCRCheckBox"  Margin="0,5,0,0" IsChecked="{Binding OCRCheckBoxIsCheckBox}">
                         <TextBlock Text="在需要时识别文本"/>
                     </CheckBox>
-                    <ComboBox IsEnabled="{Binding ElementName=OCRCheckBox,Path=IsChecked}"  Margin="0,6,0,0" Width="228" Height="28.55" HorizontalAlignment="Left">
+                    <ComboBox IsEnabled="{Binding ElementName=OCRCheckBox,Path=IsChecked}"  Margin="0,6,0,0" Width="228" Height="28.55" HorizontalAlignment="Left" SelectedIndex="{Binding LanguageSelectedIndex}">
+                        <ComboBoxItem Content="Chinese Simplified"/>
+                        <ComboBoxItem Content="Chinese Traditional"/>
+                        <ComboBoxItem Content="English"/>
+                        <ComboBoxItem Content="Japan"/>
+                        <ComboBoxItem Content="Korean"/>
                     </ComboBox>
                 </StackPanel>
             </StackPanel>

+ 1 - 1
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterImg.xaml

@@ -7,7 +7,7 @@
         <StackPanel Width="245">
             <TextBlock Text="文件类型" Height="20" Width="48" HorizontalAlignment="Left" />
             <ComboBox Name="ImageTypeComboBox" Height="32" Width="228" HorizontalAlignment="Left" Margin="0,8,0,0" ItemsSource="{Binding ImageTypeFamily}" SelectedIndex="0" SelectionChanged="ImageTypeComboBox_SelectionChanged"></ComboBox>
-            <!--<ComboBox Name="ImageDPIComboBox" Height="32" Width="228" HorizontalAlignment="Left" Margin="0,8,0,0" ItemsSource="{Binding ImageDPIFamily}" SelectedIndex="0" SelectionChanged="ImageDPIComboBox_SelectionChanged"></ComboBox>-->
+            <ComboBox Name="ImageDPIComboBox" Height="32" Width="228" HorizontalAlignment="Left" Margin="0,8,0,0" ItemsSource="{Binding ImageDPIFamily}" SelectedIndex="0" SelectionChanged="ImageDPIComboBox_SelectionChanged"></ComboBox>
         </StackPanel>
     </Grid>
 </UserControl>

+ 12 - 27
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePageBatchProcessing/HomePageConverter/HomePageConverterImg.xaml.cs

@@ -22,32 +22,17 @@ namespace PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.H
 
             ((HomePageConverterImgViewModel)this.DataContext).UpdateImageType(ImageTypeComboBox.SelectedIndex);
         }
-        //图片dpi
-        //private void ImageDPIComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
-        //{
-        //    switch (ImageDPIComboBox.SelectedIndex)
-        //    {
-        //        case 0:
-        //            Trace.WriteLine("50");
-        //            break;
-        //        case 1:
-        //            Trace.WriteLine("72");
-        //            break;
-        //        case 2:
-        //            Trace.WriteLine("96");
-        //            break;
-        //        case 3:
-        //            Trace.WriteLine("150");
-        //            break;
-        //        case 4:
-        //            Trace.WriteLine("300");
-        //            break;
-        //        case 5:
-        //            Trace.WriteLine("600");
-        //            break;
-        //        default:
-        //            break;
-        //    }
-        //}
+
+
+       
+        private void ImageDPIComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
+        {
+            if (((HomePageConverterImgViewModel)this.DataContext).homePageConverterDialogViewModel == null)
+                return;
+
+            ((HomePageConverterImgViewModel)this.DataContext).UpdateImageDpi(ImageDPIComboBox.SelectedIndex);
+            
+            
+        }
     }
 }

PDF Office/x64/DocumentAILib/ComDocumentAINative.dll → PDF Office/x64/ComDocumentAINative.dll


PDF Office/x64/DocumentAILib/DocumentAI.dll → PDF Office/x64/DocumentAI.dll


PDF Office/x64/DocumentAILib/libiomp5md.dll → PDF Office/x64/libiomp5md.dll


PDF Office/x64/DocumentAILib/mkldnn.dll → PDF Office/x64/mkldnn.dll


PDF Office/x64/DocumentAILib/mklml.dll → PDF Office/x64/mklml.dll


BIN
PDF Office/x64/onnxruntime.dll


BIN
PDF Office/x64/opencv_world420.dll


PDF Office/x64/DocumentAILib/opencv_world420d.dll → PDF Office/x64/opencv_world420d.dll


PDF Office/x64/DocumentAILib/paddle2onnx.dll → PDF Office/x64/paddle2onnx.dll


PDF Office/x64/DocumentAILib/paddle_inference.dll → PDF Office/x64/paddle_inference.dll