Browse Source

转档库替换,转档OCR添加

liyijie 1 year ago
parent
commit
74f968ae18

+ 5 - 5
PDF Office/App.xaml.cs

@@ -714,10 +714,10 @@ namespace PDF_Master
 
             try
             {
-                //加载OCR库
-                if (!DocumentAIKitLicenseVerify())
-                {
-                }
+                ////加载OCR库
+                //if (!DocumentAIKitLicenseVerify())
+                //{
+                //}
                 /*LicenseError licenseerror = CPDFConverter.SDKLicenseVerify(ConverterDevKey, ConverterDevSecret, ConverterUserkey, ConverterUserSecret);
                 string resPath = Path.GetDirectoryName(typeof(MainWindow).Assembly.Location) + "\\";
                 if (licenseerror != LicenseError.ERR_SUCCESS)
@@ -734,7 +734,7 @@ namespace PDF_Master
                     return false;
                 }
                 CPDFConverter.Init(resPath);
-                CPDFConverter.SetOCRModelFolder(modelFolderPath);
+                //CPDFConverter.SetOCRModelFolder(modelFolderPath);
             }
             catch { }
             return result;

BIN
PDF Office/ComDocumentAIKit.dll


BIN
PDF Office/ComPDFKit_Conversion.dll


+ 2 - 2
PDF Office/Model/Dialog/ConverterDialogs/ConverterDialogsModel.cs

@@ -15,8 +15,8 @@ namespace PDF_Master.Model.Dialog.ConverterDialogs
     public class ConvertOptions
     {
         public COCRLanguage OCRLanguage = COCRLanguage.English;
-        public bool IsAllowOCR = false;
-        public bool IsContainOCRBgImage = false;
+        public bool IsAllowOCR = true;
+        public bool IsContainOCRBgImage = true;
         public bool IsContainAnnotations = true;
         public bool IsContainImages = true;
         public ContentOptions ContentOpts = ContentOptions.AllContent;

File diff suppressed because it is too large
+ 2686 - 2672
PDF Office/PDF Master.csproj


+ 5 - 5
PDF Office/PDF Master.csproj.user

@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <ProjectView>ProjectFiles</ProjectView>
-  </PropertyGroup>
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <ProjectView>ProjectFiles</ProjectView>
+  </PropertyGroup>
 </Project>

+ 1 - 1
PDF Office/Views/Dialog/ConverterDialogs/ConverterExcelDialog.xaml

@@ -55,7 +55,7 @@
                             </StackPanel>
                         </StackPanel>
                         <StackPanel Orientation="Vertical"  Margin="0,18,0,0">
-                            <StackPanel Orientation="Vertical" Visibility="Collapsed">
+                            <StackPanel Orientation="Vertical" Visibility="Visible">
                                 <TextBlock Text="Text Recognition Settings:" HorizontalAlignment="Left"  Height="20"  Style="{StaticResource PropertyHeaderLv2}"/>
                                 <CheckBox Name="OCRCheckBox"  Margin="0,10,0,0" IsChecked="{Binding OCRCheckBoxIsCheckBox}" Padding="8,0,0,0" >
                                     <TextBlock Text="Recognize text if needed"/>

+ 1 - 1
PDF Office/Views/Dialog/ConverterDialogs/ConverterHTMLDialog.xaml

@@ -28,7 +28,7 @@
                 </Grid>
                 <Grid Grid.Column="1">
                     <StackPanel Orientation="Vertical"  Margin="0,2,0,0">
-                        <StackPanel Orientation="Vertical" Visibility="Collapsed">
+                        <StackPanel Orientation="Vertical" Visibility="Visible">
                             <TextBlock Text="HTML Recognition Settings" HorizontalAlignment="Left"  Height="20"  Style="{StaticResource PropertyHeaderLv2}"/>
                             <CheckBox Name="OCRCheckBox"  Margin="0,8,0,0" Padding="8,0,0,0" IsChecked="{Binding OCRCheckBoxIsCheckBox}">
                                 <TextBlock Text="Recognize text if needed"/>

+ 1 - 1
PDF Office/Views/Dialog/ConverterDialogs/ConverterPPTDialog.xaml

@@ -28,7 +28,7 @@
                 </Grid>
                 <Grid Grid.Column="1">
                     <StackPanel Orientation="Vertical"  Margin="0,2,0,0">
-                        <StackPanel Orientation="Vertical" Visibility="Collapsed">
+                        <StackPanel Orientation="Vertical" Visibility="Visible">
                             <TextBlock Text="PPT Recognition Settings" HorizontalAlignment="Left"  Style="{StaticResource PropertyHeaderLv2}" Height="20"/>
                             <CheckBox Name="OCRCheckBox"  Margin="0,10,0,0" IsChecked="{Binding OCRCheckBoxIsCheckBox}" Padding="8,0,0,0">
                                 <TextBlock Text="Recognize text if needed"/>

+ 1 - 1
PDF Office/Views/Dialog/ConverterDialogs/ConverterRTFDialog.xaml

@@ -28,7 +28,7 @@
                 </Grid>
                 <Grid Grid.Column="1">
                     <StackPanel Orientation="Vertical"  Margin="0,2,0,0">
-                        <StackPanel Orientation="Vertical" Visibility="Collapsed">
+                        <StackPanel Orientation="Vertical" Visibility="Visible">
                             <TextBlock Text="RTF Recognition Settings" HorizontalAlignment="Left"  Style="{StaticResource PropertyHeaderLv2}" Height="20"/>
                             <CheckBox Name="OCRCheckBox"  Margin="0,10,0,0" IsChecked="{Binding OCRCheckBoxIsCheckBox}" Padding="8,0,0,0">
                                 <TextBlock Text="Recognize text if needed"/>

+ 1 - 1
PDF Office/Views/Dialog/ConverterDialogs/ConverterTextDialog.xaml

@@ -28,7 +28,7 @@
                 </Grid>
                 <Grid Grid.Column="1">
                     <StackPanel Orientation="Vertical"  Margin="0,2,0,0">
-                        <StackPanel Orientation="Vertical" Visibility="Collapsed">
+                        <StackPanel Orientation="Vertical" Visibility="Visible">
                             <TextBlock Text="Text Recognition Settings" HorizontalAlignment="Left"  Style="{StaticResource PropertyHeaderLv2}" Height="20"/>
                             <CheckBox Name="OCRCheckBox"  Margin="0,10,0,0" IsChecked="{Binding OCRCheckBoxIsCheckBox}" Padding="8,0,0,0" >
                                 <TextBlock Text="Recognize text if needed"/>

+ 1 - 1
PDF Office/Views/Dialog/ConverterDialogs/ConverterWordDialog.xaml

@@ -42,7 +42,7 @@
                             </StackPanel>
                         </StackPanel>
                         <StackPanel Orientation="Vertical"  Margin="0,16,0,0">
-                            <StackPanel Orientation="Vertical" Visibility="Collapsed">
+                            <StackPanel Orientation="Vertical" Visibility="Visible">
                                 <TextBlock Text="Text Recognition Settings" HorizontalAlignment="Left"  Style="{StaticResource PropertyHeaderLv2}" Height="20"/>
                                 <CheckBox Name="OCRCheckBox"  Margin="0,8,0,0" IsChecked="{Binding OCRCheckBoxIsCheckBox}" Padding="8,0,0,0">
                                     <TextBlock Text="Recognize text if needed"/>

BIN
PDF Office/x64/CPDFConverterNative.dll


BIN
PDF Office/x64/ComDocumentAINative.dll


BIN
PDF Office/x64/DocumentAI.dll


BIN
PDF Office/x64/onnxruntime.dll


BIN
PDF Office/x64/opencv_world420.dll


BIN
PDF Office/x64/paddle2onnx.dll


BIN
PDF Office/x86/CPDFConverterNative.dll