Browse Source

compdfkit(win) - 更换 license

liuaoran 1 year ago
parent
commit
10c535555a
72 changed files with 250 additions and 206 deletions
  1. 4 6
      Demo/Examples/Annotations/App.xaml.cs
  2. 1 1
      Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFCreateSignatureDialog.xaml
  3. 1 1
      Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFCreateStampDialog.xaml
  4. 1 1
      Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFDeleteDialog.xaml
  5. 15 15
      Demo/Examples/Compdfkit_Tools/Common/Helper/CommonHelper.cs
  6. 5 4
      Demo/Examples/Compdfkit_Tools/PDFView/PDFSearch/PDFSearchControl/CPDFSearchControl.xaml.cs
  7. 1 1
      Demo/Examples/Compdfkit_Tools/PDFView/PDFSearch/PDFSearchUI/CPDFSearchResultUI.xaml.cs
  8. 2 2
      Demo/Examples/Compdfkit_Tools/PageEdit/PDFPageInsert/CPDFPageInsertUI.xaml
  9. 4 6
      Demo/Examples/ContentEditor/App.xaml.cs
  10. 2 4
      Demo/Examples/ContentEditor/ContentEditor.csproj
  11. 2 2
      Demo/Examples/DigitalSignature/App.xaml.cs
  12. 4 4
      Demo/Examples/DigitalSignature/DigitalSignature.csproj
  13. 4 6
      Demo/Examples/DocsEditor/App.xaml.cs
  14. 4 4
      Demo/Examples/DocsEditor/DocsEditor.csproj
  15. 1 1
      Demo/Examples/Examlpes.sln
  16. 10 11
      Demo/Examples/Forms/App.xaml.cs
  17. 2 2
      Demo/Examples/Forms/Forms.csproj
  18. 15 15
      Demo/Examples/PDFViewer/App.xaml.cs
  19. 2 2
      Demo/Examples/PDFViewer/MainPage.xaml.cs
  20. 3 2
      Demo/Examples/PDFViewer/MainWindow.xaml
  21. 10 5
      Demo/Examples/PDFViewer/MainWindow.xaml.cs
  22. 4 4
      Demo/Examples/PDFViewer/PDFViewer.csproj
  23. 2 2
      Demo/Examples/PDFViewer/Properties/AssemblyInfo.cs
  24. 1 1
      Demo/Examples/PDFViewer/SettingsDialog.xaml
  25. 8 0
      Demo/Examples/PDFViewer/SettingsDialog.xaml.cs
  26. 2 2
      Demo/Examples/Samples/AnnotationImportExportTest/CS/AnnotationImportExportTest.csproj
  27. 3 2
      Demo/Examples/Samples/AnnotationImportExportTest/VB/AnnotationImportExportTest.vbproj
  28. 2 2
      Demo/Examples/Samples/AnnotationTest/CS/AnnotationTest.csproj
  29. 2 2
      Demo/Examples/Samples/AnnotationTest/VB/AnnotationTest.vbproj
  30. 3 2
      Demo/Examples/Samples/BackgroundTest/CS/BackgroundTest.csproj
  31. 2 2
      Demo/Examples/Samples/BackgroundTest/VB/BackgroundTest.vbproj
  32. 2 2
      Demo/Examples/Samples/BatesTest/CS/BatesTest.csproj
  33. 2 2
      Demo/Examples/Samples/BatesTest/VB/BatesTest.vbproj
  34. 2 2
      Demo/Examples/Samples/BookmarkTest/CS/BookmarkTest.csproj
  35. 2 2
      Demo/Examples/Samples/BookmarkTest/VB/BookmarkTest.vbproj
  36. 2 2
      Demo/Examples/Samples/DigitalSignatureTest/CS/DigitalSignatureTest.csproj
  37. 2 2
      Demo/Examples/Samples/DigitalSignatureTest/VB/DigitalSignatureTest.vbproj
  38. 2 2
      Demo/Examples/Samples/DocumentCompare/CS/DocumentCompareTest.csproj
  39. 2 2
      Demo/Examples/Samples/DocumentCompare/VB/DocumentCompareTest.vbproj
  40. 2 2
      Demo/Examples/Samples/DocumentInfoTest/CS/DocumentInfoTest.csproj
  41. 2 2
      Demo/Examples/Samples/DocumentInfoTest/VB/DocumentInfoTest.vbproj
  42. 2 2
      Demo/Examples/Samples/EncryptTest/CS/EncryptTest.csproj
  43. 2 2
      Demo/Examples/Samples/EncryptTest/VB/EncryptTest.vbproj
  44. 2 2
      Demo/Examples/Samples/FlattenTest/CS/FlattenTest.csproj
  45. 2 2
      Demo/Examples/Samples/FlattenTest/VB/FlattenTest.vbproj
  46. 2 2
      Demo/Examples/Samples/HeaderFooterTest/CS/HeaderFooterTest.csproj
  47. 2 2
      Demo/Examples/Samples/HeaderFooterTest/VB/HeaderFooterTest.vbproj
  48. 2 2
      Demo/Examples/Samples/ImageExtractTest/CS/ImageExtractTest.csproj
  49. 2 2
      Demo/Examples/Samples/ImageExtractTest/VB/ImageExtractTest.vbproj
  50. 2 2
      Demo/Examples/Samples/InteractiveFormsTest/CS/InteractiveFormsTest.csproj
  51. 2 2
      Demo/Examples/Samples/InteractiveFormsTest/VB/InteractiveFormsTest.vbproj
  52. 25 5
      Demo/Examples/Samples/LicenseKey.cs
  53. 19 6
      Demo/Examples/Samples/LicenseKey.vb
  54. 2 2
      Demo/Examples/Samples/OutlineTest/CS/OutlineTest.csproj
  55. 2 2
      Demo/Examples/Samples/OutlineTest/VB/OutlineTest.vbproj
  56. 2 2
      Demo/Examples/Samples/PDFATest/CS/PDFATest.csproj
  57. 2 2
      Demo/Examples/Samples/PDFATest/VB/PDFATest.vbproj
  58. 2 2
      Demo/Examples/Samples/PDFPageTest/CS/PDFPageTest.csproj
  59. 2 2
      Demo/Examples/Samples/PDFPageTest/VB/PDFPageTest.vbproj
  60. 2 2
      Demo/Examples/Samples/PDFRedactTest/CS/PDFRedactTest.csproj
  61. 2 2
      Demo/Examples/Samples/PDFRedactTest/VB/PDFRedactTest.vbproj
  62. 2 2
      Demo/Examples/Samples/PDFToImage/CS/PDFToImageTest.csproj
  63. 2 2
      Demo/Examples/Samples/PDFToImage/VB/PDFToImageTest.vbproj
  64. 2 2
      Demo/Examples/Samples/TextExtractTest/CS/TextExtractTest.csproj
  65. 2 2
      Demo/Examples/Samples/TextExtractTest/VB/TextExtractTest.vbproj
  66. 2 2
      Demo/Examples/Samples/TextSearchTest/CS/TextSearchTest.csproj
  67. 2 2
      Demo/Examples/Samples/TextSearchTest/VB/TextSearchTest.vbproj
  68. 2 2
      Demo/Examples/Samples/WatermarkTest/CS/WatermarkTest.csproj
  69. 2 2
      Demo/Examples/Samples/WatermarkTest/VB/WatermarkTest.vbproj
  70. 4 5
      Demo/Examples/Viewer/App.xaml.cs
  71. 2 4
      Demo/Examples/Viewer/Viewer.csproj
  72. 6 0
      Demo/Examples/license_key_windows.xml

+ 4 - 6
Demo/Examples/Annotations/App.xaml.cs

@@ -3,9 +3,7 @@ using ComPDFKit.NativeMethod;
 using Compdfkit_Tools.Helper;
 using Compdfkit_Tools.Helper;
 using System.Reflection;
 using System.Reflection;
 using System.Threading;
 using System.Threading;
-using System.Windows;
-using System.Xml;
-using static ComPDFKit.NativeMethod.CPDFSDKVerifier;
+using System.Windows; 
 
 
 
 
 namespace AnnotationViewControl
 namespace AnnotationViewControl
@@ -24,12 +22,12 @@ namespace AnnotationViewControl
             Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
             Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
         }
         }
 
 
-        private static bool LicenseVerify()
+        public static bool LicenseVerify()
         {
         {
-            if (!LoadNativeLibrary())
+            if (!CPDFSDKVerifier.LoadNativeLibrary())
                 return false;
                 return false;
 
 
-            LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify("license_key_windows.txt", true);
+            LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify(SDKLicenseHelper.ParseLicenseXML(), false);
             return (verifyResult == LicenseErrorCode.E_LICENSE_SUCCESS);
             return (verifyResult == LicenseErrorCode.E_LICENSE_SUCCESS);
         }
         }
     }
     }

+ 1 - 1
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFCreateSignatureDialog.xaml

@@ -9,7 +9,7 @@
         AllowsTransparency="True" 
         AllowsTransparency="True" 
         WindowStyle="None"
         WindowStyle="None"
         Loaded="Window_Loaded"
         Loaded="Window_Loaded"
-        Title="CreateSignatureDialog" Height="422" Width="626">
+        Title="CreateSignatureDialog" Height="422" Width="626"  BorderThickness="1" BorderBrush="#5A000000">
     <Window.Resources>
     <Window.Resources>
         <ResourceDictionary>
         <ResourceDictionary>
             <ResourceDictionary.MergedDictionaries>
             <ResourceDictionary.MergedDictionaries>

+ 1 - 1
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFCreateStampDialog.xaml

@@ -10,7 +10,7 @@
         ShowInTaskbar="False"
         ShowInTaskbar="False"
         ResizeMode="NoResize"
         ResizeMode="NoResize"
         Loaded="Window_Loaded"
         Loaded="Window_Loaded"
-        Title="CreateStampDialog" Height="357" Width="626">
+        Title="CreateStampDialog" Height="357" Width="626" BorderThickness="1" BorderBrush="#5A000000">
     <Window.Resources>
     <Window.Resources>
         <ResourceDictionary>
         <ResourceDictionary>
             <ResourceDictionary.MergedDictionaries>
             <ResourceDictionary.MergedDictionaries>

+ 1 - 1
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFDeleteDialog.xaml

@@ -8,7 +8,7 @@
         AllowsTransparency="True" 
         AllowsTransparency="True" 
         WindowStyle="None"
         WindowStyle="None"
         Loaded="Window_Loaded"
         Loaded="Window_Loaded"
-        Title="DeleteDialog" Height="146" Width="318">
+        Title="DeleteDialog" Height="146" Width="318"  BorderThickness="1" BorderBrush="#5A000000">
     <Window.Resources>
     <Window.Resources>
         <ResourceDictionary>
         <ResourceDictionary>
             <ResourceDictionary.MergedDictionaries>
             <ResourceDictionary.MergedDictionaries>

+ 15 - 15
Demo/Examples/Compdfkit_Tools/Common/Helper/CommonHelper.cs

@@ -34,25 +34,25 @@ namespace Compdfkit_Tools.Helper
 {
 {
     public class SDKLicenseHelper
     public class SDKLicenseHelper
     {
     {
-        public string key = string.Empty;
-        public string secret = string.Empty;
-        public SDKLicenseHelper()
+        public static string ParseLicenseXML()
         {
         {
-            string sdkLicensePath = "license_key_windows.xml";
-            XmlDocument xmlDocument = new XmlDocument();
-            xmlDocument.Load(sdkLicensePath);
-
-            XmlNode keyNode = xmlDocument.SelectSingleNode("/license/key");
-            XmlNode secretNode = xmlDocument.SelectSingleNode("/license/secret");
-
-            if (keyNode != null && secretNode != null)
+            try
             {
             {
-                key = keyNode.InnerText;
-                secret = secretNode.InnerText;
+                XmlDocument xmlDocument = new XmlDocument();
+                xmlDocument.Load("license_key_windows.xml");
+                XmlNode xmlNode = xmlDocument.SelectSingleNode("/license/key");
+                if (xmlNode == null)
+                {
+                    return string.Empty;
+                }
+                else
+                {
+                    return xmlNode.InnerText;
+                }
             }
             }
-            else
+            catch
             {
             {
-                Console.WriteLine("Key or secret element not found in the XML.");
+                return string.Empty;
             }
             }
         }
         }
     }
     }

+ 5 - 4
Demo/Examples/Compdfkit_Tools/PDFView/PDFSearch/PDFSearchControl/CPDFSearchControl.xaml.cs

@@ -115,14 +115,15 @@ namespace Compdfkit_Tools.PDFControl
             {
             {
                 keyWord = SearchInput.SearchKeyWord;
                 keyWord = SearchInput.SearchKeyWord;
                 pdfView.StartFindText(keyWord, searchOption);
                 pdfView.StartFindText(keyWord, searchOption);
+                SearchResult.ClearSearchResult();
             }
             }
             if (e == CPDFSearchInputUI.MoveDirection.Previous)
             if (e == CPDFSearchInputUI.MoveDirection.Previous)
             {
             {
-                pdfView.FindBackward();
+                pdfView.FindPrevious();
             }
             }
             else
             else
             {
             {
-                pdfView.FindForward();
+                pdfView.FindNext();
             }
             }
         }
         }
 
 
@@ -187,7 +188,7 @@ namespace Compdfkit_Tools.PDFControl
             {
             {
                 currentHighLightIndex--;
                 currentHighLightIndex--;
                 BindSearchResult result = SearchResult.GetItem(currentHighLightIndex);
                 BindSearchResult result = SearchResult.GetItem(currentHighLightIndex);
-                HighLightSelectResult(result);
+                SearchResult.ClearSearchResult();
             }
             }
         }
         }
 
 
@@ -197,7 +198,7 @@ namespace Compdfkit_Tools.PDFControl
             if (currentHighLightIndex >= 0)
             if (currentHighLightIndex >= 0)
             {
             {
                 BindSearchResult result = SearchResult.GetItem(currentHighLightIndex);
                 BindSearchResult result = SearchResult.GetItem(currentHighLightIndex);
-                HighLightSelectResult(result);
+                SearchResult.ClearSearchResult();
             }
             }
         }
         }
 
 

+ 1 - 1
Demo/Examples/Compdfkit_Tools/PDFView/PDFSearch/PDFSearchUI/CPDFSearchResultUI.xaml.cs

@@ -39,7 +39,7 @@ namespace Compdfkit_Tools.PDFControlUI
         {
         {
             InvokeSelectionChangedEvent(ResultListControl.SelectedIndex);
             InvokeSelectionChangedEvent(ResultListControl.SelectedIndex);
         }
         }
-
+         
         public void ClearSearchResult()
         public void ClearSearchResult()
         {
         {
             searchResults.Clear();
             searchResults.Clear();

+ 2 - 2
Demo/Examples/Compdfkit_Tools/PageEdit/PDFPageInsert/CPDFPageInsertUI.xaml

@@ -93,8 +93,8 @@
                             <TextBlock x:Name="MaxPageTextBox" Text="10000"  VerticalAlignment="Center" ></TextBlock>
                             <TextBlock x:Name="MaxPageTextBox" Text="10000"  VerticalAlignment="Center" ></TextBlock>
                         </StackPanel>
                         </StackPanel>
                         <ComboBox x:Name="PageLocationComboBox" Width="215" Height="32" HorizontalAlignment="Left" Margin="20,8,0,0"  Style="{StaticResource ComboBoxStyle1}" VerticalContentAlignment="Center" IsEnabled="{Binding ElementName=CustomPageRadioButton, Path= IsChecked}" SelectionChanged="PageLocationComboBox_SelectionChanged">
                         <ComboBox x:Name="PageLocationComboBox" Width="215" Height="32" HorizontalAlignment="Left" Margin="20,8,0,0"  Style="{StaticResource ComboBoxStyle1}" VerticalContentAlignment="Center" IsEnabled="{Binding ElementName=CustomPageRadioButton, Path= IsChecked}" SelectionChanged="PageLocationComboBox_SelectionChanged">
-                            <ComboBoxItem Content="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Option_Before}" IsSelected="True"></ComboBoxItem>
-                            <ComboBoxItem Content="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Option_After}"></ComboBoxItem>
+                            <ComboBoxItem Content="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Option_After }" IsSelected="True"></ComboBoxItem>
+                            <ComboBoxItem Content="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Option_Before}"></ComboBoxItem>
                         </ComboBox>
                         </ComboBox>
                     </StackPanel>
                     </StackPanel>
                 </Grid>
                 </Grid>

+ 4 - 6
Demo/Examples/ContentEditor/App.xaml.cs

@@ -9,9 +9,7 @@ using System.Linq;
 using System.Reflection;
 using System.Reflection;
 using System.Threading;
 using System.Threading;
 using System.Threading.Tasks;
 using System.Threading.Tasks;
-using System.Windows;
-using System.Xml;
-using static ComPDFKit.NativeMethod.CPDFSDKVerifier;
+using System.Windows; 
 
 
 namespace ContentEditorViewControl
 namespace ContentEditorViewControl
 {
 {
@@ -27,12 +25,12 @@ namespace ContentEditorViewControl
             Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
             Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
         }
         }
 
 
-        private static bool LicenseVerify()
+        public static bool LicenseVerify()
         {
         {
-            if (!LoadNativeLibrary())
+            if (!CPDFSDKVerifier.LoadNativeLibrary())
                 return false;
                 return false;
 
 
-            LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify("license_key_windows.txt", true);
+            LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify(SDKLicenseHelper.ParseLicenseXML(), false);
             return (verifyResult == LicenseErrorCode.E_LICENSE_SUCCESS);
             return (verifyResult == LicenseErrorCode.E_LICENSE_SUCCESS);
         }
         }
     }
     }

+ 2 - 4
Demo/Examples/ContentEditor/ContentEditor.csproj

@@ -123,12 +123,10 @@
     <Resource Include="ComPDFKit_Logo.ico" />
     <Resource Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
-  </ItemGroup>
-  <ItemGroup>
     <Content Include="..\TestFile\ComPDFKit_Sample_File_Windows.pdf">
     <Content Include="..\TestFile\ComPDFKit_Sample_File_Windows.pdf">
       <Link>ComPDFKit_Sample_File_Windows.pdf</Link>
       <Link>ComPDFKit_Sample_File_Windows.pdf</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

+ 2 - 2
Demo/Examples/DigitalSignature/App.xaml.cs

@@ -25,12 +25,12 @@ namespace DigitalSignature
             Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
             Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
         }
         }
 
 
-        private static bool LicenseVerify()
+        public static bool LicenseVerify()
         {
         {
             if (!CPDFSDKVerifier.LoadNativeLibrary())
             if (!CPDFSDKVerifier.LoadNativeLibrary())
                 return false;
                 return false;
 
 
-            LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify("license_key_windows.txt", true);
+            LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify(SDKLicenseHelper.ParseLicenseXML(), false);
             return (verifyResult == LicenseErrorCode.E_LICENSE_SUCCESS);
             return (verifyResult == LicenseErrorCode.E_LICENSE_SUCCESS);
         }
         }
     }
     }

+ 4 - 4
Demo/Examples/DigitalSignature/DigitalSignature.csproj

@@ -127,10 +127,6 @@
       <Generator>ResXFileCodeGenerator</Generator>
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>Resources.Designer.cs</LastGenOutput>
       <LastGenOutput>Resources.Designer.cs</LastGenOutput>
     </EmbeddedResource>
     </EmbeddedResource>
-    <None Include="..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
     <None Include="packages.config" />
     <None Include="packages.config" />
     <None Include="Properties\Settings.settings">
     <None Include="Properties\Settings.settings">
       <Generator>SettingsSingleFileGenerator</Generator>
       <Generator>SettingsSingleFileGenerator</Generator>
@@ -159,6 +155,10 @@
     </BootstrapperPackage>
     </BootstrapperPackage>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
+    <None Include="..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
     <Content Include="..\TestFile\ComPDFKit_Signatures_Sample_File.pdf">
     <Content Include="..\TestFile\ComPDFKit_Signatures_Sample_File.pdf">
       <Link>ComPDFKit_Signatures_Sample_File.pdf</Link>
       <Link>ComPDFKit_Signatures_Sample_File.pdf</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

+ 4 - 6
Demo/Examples/DocsEditor/App.xaml.cs

@@ -9,9 +9,7 @@ using System.Linq;
 using System.Reflection;
 using System.Reflection;
 using System.Threading;
 using System.Threading;
 using System.Threading.Tasks;
 using System.Threading.Tasks;
-using System.Windows;
-using System.Xml;
-using static ComPDFKit.NativeMethod.CPDFSDKVerifier;
+using System.Windows; 
 
 
 
 
 namespace DocsEditControl
 namespace DocsEditControl
@@ -30,12 +28,12 @@ namespace DocsEditControl
             Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
             Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
         }
         }
 
 
-        private static bool LicenseVerify()
+        public static bool LicenseVerify()
         {
         {
-            if (!LoadNativeLibrary())
+            if (!CPDFSDKVerifier.LoadNativeLibrary())
                 return false;
                 return false;
 
 
-            LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify("license_key_windows.txt", true);
+            LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify(SDKLicenseHelper.ParseLicenseXML(), false);
             return (verifyResult == LicenseErrorCode.E_LICENSE_SUCCESS);
             return (verifyResult == LicenseErrorCode.E_LICENSE_SUCCESS);
         }
         }
     }
     }

+ 4 - 4
Demo/Examples/DocsEditor/DocsEditor.csproj

@@ -122,13 +122,13 @@
     </ProjectReference>
     </ProjectReference>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
     <Resource Include="ComPDFKit_Logo.ico" />
     <Resource Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
+    <None Include="..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
     <Content Include="..\TestFile\ComPDFKit_Sample_File_Windows.pdf">
     <Content Include="..\TestFile\ComPDFKit_Sample_File_Windows.pdf">
       <Link>ComPDFKit_Sample_File_Windows.pdf</Link>
       <Link>ComPDFKit_Sample_File_Windows.pdf</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

+ 1 - 1
Demo/Examples/Examlpes.sln

@@ -5,7 +5,7 @@ VisualStudioVersion = 17.5.33516.290
 MinimumVisualStudioVersion = 10.0.40219.1
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "License", "License", "{43ED4BF9-5941-4F32-A9DC-016E94A0E74E}"
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "License", "License", "{43ED4BF9-5941-4F32-A9DC-016E94A0E74E}"
 	ProjectSection(SolutionItems) = preProject
 	ProjectSection(SolutionItems) = preProject
-		license_key_windows.txt = license_key_windows.txt
+		license_key_windows.xml = license_key_windows.xml
 	EndProjectSection
 	EndProjectSection
 EndProject
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Viewer", "Viewer\Viewer.csproj", "{A25DD47F-1FDF-48A1-8D0E-8CFF2C066A74}"
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Viewer", "Viewer\Viewer.csproj", "{A25DD47F-1FDF-48A1-8D0E-8CFF2C066A74}"

+ 10 - 11
Demo/Examples/Forms/App.xaml.cs

@@ -4,8 +4,7 @@ using System.Threading;
 using System.Windows;
 using System.Windows;
 using System.Xml;
 using System.Xml;
 using ComPDFKit.NativeMethod;
 using ComPDFKit.NativeMethod;
-using Compdfkit_Tools.Helper;
-using static ComPDFKit.NativeMethod.CPDFSDKVerifier;
+using Compdfkit_Tools.Helper; 
 
 
 namespace FormViewControl
 namespace FormViewControl
 { 
 { 
@@ -14,6 +13,15 @@ namespace FormViewControl
     /// </summary>
     /// </summary>
     public partial class App: Application
     public partial class App: Application
     {
     {
+        public static bool LicenseVerify()
+        {
+            if (!CPDFSDKVerifier.LoadNativeLibrary())
+                return false;
+
+            LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify(SDKLicenseHelper.ParseLicenseXML(), false);
+            return (verifyResult == LicenseErrorCode.E_LICENSE_SUCCESS);
+        }
+
         protected override void OnStartup(StartupEventArgs e)
         protected override void OnStartup(StartupEventArgs e)
         {
         {
             base.OnStartup(e);
             base.OnStartup(e);
@@ -21,14 +29,5 @@ namespace FormViewControl
             Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
             Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
             Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
             Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
         }
         }
-
-        private static bool LicenseVerify()
-        {
-            if (!LoadNativeLibrary())
-                return false;
-
-            LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify("license_key_windows.txt", true);
-            return (verifyResult == LicenseErrorCode.E_LICENSE_SUCCESS);
-        }
     }
     }
 }
 }

+ 2 - 2
Demo/Examples/Forms/Forms.csproj

@@ -104,8 +104,8 @@
     </ProjectReference>
     </ProjectReference>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="..\TestFile\ComPDFKit_Forms_Sample_File.pdf">
     <Content Include="..\TestFile\ComPDFKit_Forms_Sample_File.pdf">

+ 15 - 15
Demo/Examples/PDFViewer/App.xaml.cs

@@ -21,10 +21,10 @@ namespace PDFViewer
     /// <summary>
     /// <summary>
     /// Interaction logic for App.xaml
     /// Interaction logic for App.xaml
     /// </summary>
     /// </summary>
-    public partial class App: Application
+    public partial class App : Application
     {
     {
         public static string CurrentCulture = Settings.Default.Cultrue;
         public static string CurrentCulture = Settings.Default.Cultrue;
-        public static List<string> SupportedCultureList= new List<string>()
+        public static List<string> SupportedCultureList = new List<string>()
         {
         {
             "en-US", "zh-CN"
             "en-US", "zh-CN"
         };
         };
@@ -32,6 +32,15 @@ namespace PDFViewer
         public static FilePathList OpenedFilePathList = new FilePathList();
         public static FilePathList OpenedFilePathList = new FilePathList();
         public static ResourceManager MainResourceManager = new ResourceManager("PDFViewer.Strings.SettingDialog", Assembly.GetExecutingAssembly());
         public static ResourceManager MainResourceManager = new ResourceManager("PDFViewer.Strings.SettingDialog", Assembly.GetExecutingAssembly());
 
 
+        public static bool LicenseVerify()
+        {
+            if (!CPDFSDKVerifier.LoadNativeLibrary())
+                return false;
+
+            LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify(SDKLicenseHelper.ParseLicenseXML(), false);
+            return (verifyResult == LicenseErrorCode.E_LICENSE_SUCCESS);
+        }
+
         protected override void OnStartup(StartupEventArgs e)
         protected override void OnStartup(StartupEventArgs e)
         {
         {
             if (string.IsNullOrEmpty(CurrentCulture))
             if (string.IsNullOrEmpty(CurrentCulture))
@@ -44,7 +53,7 @@ namespace PDFViewer
                 Settings.Default.Cultrue = CurrentCulture;
                 Settings.Default.Cultrue = CurrentCulture;
                 Settings.Default.Save();
                 Settings.Default.Save();
             }
             }
-            
+
             Thread.CurrentThread.CurrentUICulture = new CultureInfo(CurrentCulture);
             Thread.CurrentThread.CurrentUICulture = new CultureInfo(CurrentCulture);
             Thread.CurrentThread.CurrentCulture = new CultureInfo(CurrentCulture);
             Thread.CurrentThread.CurrentCulture = new CultureInfo(CurrentCulture);
             base.OnStartup(e);
             base.OnStartup(e);
@@ -52,17 +61,8 @@ namespace PDFViewer
             HistoryFile(@"TestFile\ComPDFKit_Sample_File_Windows.pdf");
             HistoryFile(@"TestFile\ComPDFKit_Sample_File_Windows.pdf");
             FileHistoryHelper<PDFFileInfo>.Instance.LoadHistory();
             FileHistoryHelper<PDFFileInfo>.Instance.LoadHistory();
         }
         }
-        
-        private static bool LicenseVerify()
-        {
-            if (!CPDFSDKVerifier.LoadNativeLibrary())
-                return false;
 
 
-            LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify("license_key_windows.txt", true);
-            CPDFSDKVerifier.PrintPermissions();
-            return (verifyResult == LicenseErrorCode.E_LICENSE_SUCCESS);
-        }
-        
+
         private void HistoryFile(string item)
         private void HistoryFile(string item)
         {
         {
             PDFFileInfo fileInfo = new PDFFileInfo();
             PDFFileInfo fileInfo = new PDFFileInfo();
@@ -82,7 +82,7 @@ namespace PDFViewer
             base.Add(item);
             base.Add(item);
         }
         }
     }
     }
-    
+
     public class ResourceConverter : IValueConverter
     public class ResourceConverter : IValueConverter
     {
     {
         public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
         public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
@@ -93,7 +93,7 @@ namespace PDFViewer
             }
             }
             return App.MainResourceManager.GetString(parameter.ToString());
             return App.MainResourceManager.GetString(parameter.ToString());
         }
         }
-        
+
         public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
         public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
         {
         {
             throw new NotSupportedException();
             throw new NotSupportedException();

+ 2 - 2
Demo/Examples/PDFViewer/MainPage.xaml.cs

@@ -632,8 +632,8 @@ namespace PDFViewer
                     }
                     }
                     CPDFDocument document = CPDFDocument.InitWithFilePath(pdfViewer.PDFView.Document.FilePath);
                     CPDFDocument document = CPDFDocument.InitWithFilePath(pdfViewer.PDFView.Document.FilePath);
                     if (document?.WriteFlattenToFilePath(savePath) == true)
                     if (document?.WriteFlattenToFilePath(savePath) == true)
-                    {
-                        OpenFile(savePath);
+                    {  
+                        System.Diagnostics.Process.Start("Explorer.exe", "/select," + savePath);
                     }
                     }
                     document?.Release();
                     document?.Release();
                 }
                 }

+ 3 - 2
Demo/Examples/PDFViewer/MainWindow.xaml

@@ -12,8 +12,9 @@
         xmlns:cpdfcommon="clr-namespace:Compdfkit_Tools.Common;assembly=Compdfkit_Tools"
         xmlns:cpdfcommon="clr-namespace:Compdfkit_Tools.Common;assembly=Compdfkit_Tools"
         xmlns:cpdftools="clr-namespace:Compdfkit_Tools.PDFControl;assembly=Compdfkit_Tools"
         xmlns:cpdftools="clr-namespace:Compdfkit_Tools.PDFControl;assembly=Compdfkit_Tools"
         xmlns:dragablz="clr-namespace:Dragablz;assembly=Dragablz"
         xmlns:dragablz="clr-namespace:Dragablz;assembly=Dragablz"
+        xmlns:sys="clr-namespace:System;assembly=mscorlib"
         BorderThickness="{Binding RelativeSource={RelativeSource Mode=Self},Path=WindowState,Converter={StaticResource WindowStateToThicknessConverter}}"
         BorderThickness="{Binding RelativeSource={RelativeSource Mode=Self},Path=WindowState,Converter={StaticResource WindowStateToThicknessConverter}}"
-        Title="ComPDFKit V1.11.0" Height="720" Width="1200" MinWidth="780">
+        Title="{Binding AppInfo}" Height="720" Width="1200" MinWidth="780">
 
 
     <Window.Resources>
     <Window.Resources>
         <cpdfcommon:HomePageHeightConverter x:Key="HomePageHeightConverter"></cpdfcommon:HomePageHeightConverter>
         <cpdfcommon:HomePageHeightConverter x:Key="HomePageHeightConverter"></cpdfcommon:HomePageHeightConverter>
@@ -293,7 +294,7 @@
                                                 <Path Data="M18.2856 3.71387H15.4284L15.4284 7.71385H10.857C9.59465 7.71385 8.5713 8.7372 8.5713 9.99956C8.5713 11.2619 9.59465 12.2853 10.857 12.2853H15.4284L15.4284 16.2853L4.57129 16.2853V18.2853C4.57129 19.2321 5.3388 19.9996 6.28558 19.9996H18.2856C19.2324 19.9996 19.9999 19.2321 19.9999 18.2853V5.42815C19.9999 4.48138 19.2324 3.71387 18.2856 3.71387Z" Fill="#31BC98"/>
                                                 <Path Data="M18.2856 3.71387H15.4284L15.4284 7.71385H10.857C9.59465 7.71385 8.5713 8.7372 8.5713 9.99956C8.5713 11.2619 9.59465 12.2853 10.857 12.2853H15.4284L15.4284 16.2853L4.57129 16.2853V18.2853C4.57129 19.2321 5.3388 19.9996 6.28558 19.9996H18.2856C19.2324 19.9996 19.9999 19.2321 19.9999 18.2853V5.42815C19.9999 4.48138 19.2324 3.71387 18.2856 3.71387Z" Fill="#31BC98"/>
                                             </Grid>
                                             </Grid>
                                         </Viewbox>
                                         </Viewbox>
-                                        <TextBlock Margin="10,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Left" FontFamily="Microsoft YaHei" FontSize="12" FontWeight="DemiBold" Text="ComPDFKit V1.12.0">
+                                        <TextBlock Margin="10,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Left" FontFamily="Microsoft YaHei" FontSize="12" FontWeight="DemiBold" Text="{Binding AppInfo}">
                                             <TextBlock.Foreground>
                                             <TextBlock.Foreground>
                                                 <Binding Path="IsToggled" ElementName="HomePageButton" Converter="{StaticResource BoolToColorConverter}"></Binding>
                                                 <Binding Path="IsToggled" ElementName="HomePageButton" Converter="{StaticResource BoolToColorConverter}"></Binding>
                                             </TextBlock.Foreground>
                                             </TextBlock.Foreground>

+ 10 - 5
Demo/Examples/PDFViewer/MainWindow.xaml.cs

@@ -23,6 +23,7 @@ using System.Windows.Controls.Primitives;
 using Compdfkit_Tools.Common;
 using Compdfkit_Tools.Common;
 using Compdfkit_Tools.Data;
 using Compdfkit_Tools.Data;
 using ComPDFKit.PDFDocument;
 using ComPDFKit.PDFDocument;
+using System.Reflection;
 
 
 namespace PDFViewer
 namespace PDFViewer
 {
 {
@@ -35,13 +36,17 @@ namespace PDFViewer
         private PDFViewControl passwordViewer;
         private PDFViewControl passwordViewer;
         private PDFViewControl pdfViewControl = new PDFViewControl();
         private PDFViewControl pdfViewControl = new PDFViewControl();
         private string[] oldAndNewFilePath;
         private string[] oldAndNewFilePath;
-
+        public string AppInfo
+        {
+            get { return Assembly.GetExecutingAssembly().GetName().Name + " " + string.Join(".", Assembly.GetExecutingAssembly().GetName().Version.ToString().Split('.').Take(3)); }
+        }
         #endregion
         #endregion
 
 
         public MainWindow()
         public MainWindow()
         {
         {
             InitializeComponent();
             InitializeComponent();
             Loaded += MainWindow_Loaded;
             Loaded += MainWindow_Loaded;
+            DataContext = this;
         }
         }
 
 
         private void MainWindow_Loaded(object sender, RoutedEventArgs e)
         private void MainWindow_Loaded(object sender, RoutedEventArgs e)
@@ -124,18 +129,18 @@ namespace PDFViewer
                     confirmCreate = true;
                     confirmCreate = true;
                 };
                 };
                 createBlankPageSettingDialog.ShowDialog();
                 createBlankPageSettingDialog.ShowDialog();
-                if(!confirmCreate)
+                if (!confirmCreate)
                 {
                 {
                     return;
                     return;
                 }
                 }
-                
+
                 TabItemExt tabItem = new TabItemExt();
                 TabItemExt tabItem = new TabItemExt();
                 MainPage viewPage = new MainPage();
                 MainPage viewPage = new MainPage();
                 CPDFDocument document = CPDFDocument.CreateDocument();
                 CPDFDocument document = CPDFDocument.CreateDocument();
                 document.SetInfo(new CPDFInfo
                 document.SetInfo(new CPDFInfo
-                { Author = Properties.Settings.Default.DocumentAuthor, Creator = "ComPDFKit", CreationDate = DateTime.Now.ToString(),Subject="Document", Producer="ComPDFKit" , Keywords="Document", Version="1.11.0"});
+                { Author = Properties.Settings.Default.DocumentAuthor, Creator = "ComPDFKit", CreationDate = DateTime.Now.ToString(), Subject = "Document", Producer = "ComPDFKit", Keywords = "Document", Version = "1.11.0" });
                 document.InsertPage(0, blankPageSetting.Size.Width * 7.2 / 2.54, blankPageSetting.Size.Height * 7.2 / 2.54, "");
                 document.InsertPage(0, blankPageSetting.Size.Width * 7.2 / 2.54, blankPageSetting.Size.Height * 7.2 / 2.54, "");
-                if(blankPageSetting.Orientation == Orientation.Horizontal)
+                if (blankPageSetting.Orientation == Orientation.Horizontal)
                 {
                 {
                     document.RotatePage(0, 1);
                     document.RotatePage(0, 1);
                 }
                 }

+ 4 - 4
Demo/Examples/PDFViewer/PDFViewer.csproj

@@ -136,14 +136,14 @@
     <None Include="App.config" />
     <None Include="App.config" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
+    <None Include="..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
     <Content Include="..\TestFile\PDF32000_2008.pdf">
     <Content Include="..\TestFile\PDF32000_2008.pdf">
       <Link>TestFile\PDF32000_2008.pdf</Link>
       <Link>TestFile\PDF32000_2008.pdf</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
     </Content>
-    <None Include="..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
     <Content Include="..\TestFile\ComPDFKit_Annotations_Sample_File.pdf">
     <Content Include="..\TestFile\ComPDFKit_Annotations_Sample_File.pdf">
       <Link>TestFile\ComPDFKit_Annotations_Sample_File.pdf</Link>
       <Link>TestFile\ComPDFKit_Annotations_Sample_File.pdf</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

+ 2 - 2
Demo/Examples/PDFViewer/Properties/AssemblyInfo.cs

@@ -24,5 +24,5 @@ using System.Windows;
     ResourceDictionaryLocation.SourceAssembly 
     ResourceDictionaryLocation.SourceAssembly 
 )]
 )]
 
 
-[assembly: AssemblyVersion("1.11.0.0")]
-[assembly: AssemblyFileVersion("1.11.0.0")]
+[assembly: AssemblyVersion("1.12.0")]
+[assembly: AssemblyFileVersion("1.12.0")]

+ 1 - 1
Demo/Examples/PDFViewer/SettingsDialog.xaml

@@ -146,7 +146,7 @@
             <StackPanel  Margin="10">
             <StackPanel  Margin="10">
                 <Grid Margin="0,0,0,8" Height="32">
                 <Grid Margin="0,0,0,8" Height="32">
                     <TextBlock Text="{Binding  ConverterParameter=Subtitle_Version, Converter={StaticResource ResourceConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
                     <TextBlock Text="{Binding  ConverterParameter=Subtitle_Version, Converter={StaticResource ResourceConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
-                    <TextBlock HorizontalAlignment="Right"  VerticalAlignment="Center" Text="V1.11.0"></TextBlock>
+                    <TextBlock HorizontalAlignment="Right"  VerticalAlignment="Center" Text="{Binding AppVersion}"></TextBlock>
                 </Grid>
                 </Grid>
             </StackPanel>
             </StackPanel>
         </Border>
         </Border>

+ 8 - 0
Demo/Examples/PDFViewer/SettingsDialog.xaml.cs

@@ -1,6 +1,8 @@
 using System;
 using System;
 using System.ComponentModel;
 using System.ComponentModel;
 using System.Diagnostics;
 using System.Diagnostics;
+using System.Linq;
+using System.Reflection;
 using System.Windows;
 using System.Windows;
 using System.Windows.Controls;
 using System.Windows.Controls;
 using Compdfkit_Tools.Helper;
 using Compdfkit_Tools.Helper;
@@ -12,12 +14,18 @@ namespace PDFViewer
     /// </summary>
     /// </summary>
     public partial class SettingsDialog : Window
     public partial class SettingsDialog : Window
     {
     {
+        public string AppVersion
+        {
+            get { return string.Join(".", Assembly.GetExecutingAssembly().GetName().Version.ToString().Split('.').Take(3)); }
+        }
+
         public event EventHandler<string> LanguageChanged;
         public event EventHandler<string> LanguageChanged;
         public SettingsDialog()
         public SettingsDialog()
         {
         {
             InitializeComponent();
             InitializeComponent();
             Closing += MainWindow_Closing;
             Closing += MainWindow_Closing;
             Title = App.MainResourceManager.GetString("Title_Settings");
             Title = App.MainResourceManager.GetString("Title_Settings");
+            DataContext = this;
         }
         }
 
 
         private void MainWindow_Closing(object sender, CancelEventArgs e)
         private void MainWindow_Closing(object sender, CancelEventArgs e)

+ 2 - 2
Demo/Examples/Samples/AnnotationImportExportTest/CS/AnnotationImportExportTest.csproj

@@ -125,8 +125,8 @@
     </BootstrapperPackage>
     </BootstrapperPackage>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 3 - 2
Demo/Examples/Samples/AnnotationImportExportTest/VB/AnnotationImportExportTest.vbproj

@@ -26,6 +26,7 @@
     <OutputPath>bin\Debug\</OutputPath>
     <OutputPath>bin\Debug\</OutputPath>
     <DocumentationFile>Samples_ComPDFKit.xml</DocumentationFile>
     <DocumentationFile>Samples_ComPDFKit.xml</DocumentationFile>
     <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
     <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
+    <Prefer32Bit>false</Prefer32Bit>
   </PropertyGroup>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <PlatformTarget>AnyCPU</PlatformTarget>
     <PlatformTarget>AnyCPU</PlatformTarget>
@@ -131,8 +132,8 @@
     <None Include="packages.config" />
     <None Include="packages.config" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/AnnotationTest/CS/AnnotationTest.csproj

@@ -114,8 +114,8 @@
     </BootstrapperPackage>
     </BootstrapperPackage>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/AnnotationTest/VB/AnnotationTest.vbproj

@@ -140,8 +140,8 @@
     </None>
     </None>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
   </ItemGroup>
   </ItemGroup>

+ 3 - 2
Demo/Examples/Samples/BackgroundTest/CS/BackgroundTest.csproj

@@ -39,6 +39,7 @@
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
+    <Prefer32Bit>false</Prefer32Bit>
   </PropertyGroup>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <PlatformTarget>AnyCPU</PlatformTarget>
     <PlatformTarget>AnyCPU</PlatformTarget>
@@ -112,8 +113,8 @@
     </BootstrapperPackage>
     </BootstrapperPackage>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/BackgroundTest/VB/BackgroundTest.vbproj

@@ -136,8 +136,8 @@
       <Link>logo.png</Link>
       <Link>logo.png</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/BatesTest/CS/BatesTest.csproj

@@ -72,8 +72,8 @@
     <None Include="packages.config" />
     <None Include="packages.config" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/BatesTest/VB/BatesTest.vbproj

@@ -127,8 +127,8 @@
     <None Include="packages.config" />
     <None Include="packages.config" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
   </ItemGroup>
   </ItemGroup>

+ 2 - 2
Demo/Examples/Samples/BookmarkTest/CS/BookmarkTest.csproj

@@ -76,8 +76,8 @@
     <None Include="packages.config" />
     <None Include="packages.config" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/BookmarkTest/VB/BookmarkTest.vbproj

@@ -127,8 +127,8 @@
     <None Include="packages.config" />
     <None Include="packages.config" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
   </ItemGroup>
   </ItemGroup>

+ 2 - 2
Demo/Examples/Samples/DigitalSignatureTest/CS/DigitalSignatureTest.csproj

@@ -83,8 +83,8 @@
     </None>
     </None>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/DigitalSignatureTest/VB/DigitalSignatureTest.vbproj

@@ -131,8 +131,8 @@
     <None Include="packages.config" />
     <None Include="packages.config" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/DocumentCompare/CS/DocumentCompareTest.csproj

@@ -87,8 +87,8 @@
     </None>
     </None>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/DocumentCompare/VB/DocumentCompareTest.vbproj

@@ -142,8 +142,8 @@
     </None>
     </None>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/DocumentInfoTest/CS/DocumentInfoTest.csproj

@@ -99,8 +99,8 @@
     </BootstrapperPackage>
     </BootstrapperPackage>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/DocumentInfoTest/VB/DocumentInfoTest.vbproj

@@ -127,8 +127,8 @@
     <None Include="packages.config" />
     <None Include="packages.config" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/EncryptTest/CS/EncryptTest.csproj

@@ -76,8 +76,8 @@
     <None Include="packages.config" />
     <None Include="packages.config" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/EncryptTest/VB/EncryptTest.vbproj

@@ -131,8 +131,8 @@
     <None Include="packages.config" />
     <None Include="packages.config" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/FlattenTest/CS/FlattenTest.csproj

@@ -72,8 +72,8 @@
     <None Include="packages.config" />
     <None Include="packages.config" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/FlattenTest/VB/FlattenTest.vbproj

@@ -126,8 +126,8 @@
     <None Include="packages.config" />
     <None Include="packages.config" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/HeaderFooterTest/CS/HeaderFooterTest.csproj

@@ -69,8 +69,8 @@
     <None Include="packages.config" />
     <None Include="packages.config" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/HeaderFooterTest/VB/HeaderFooterTest.vbproj

@@ -124,8 +124,8 @@
     <None Include="packages.config" />
     <None Include="packages.config" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/ImageExtractTest/CS/ImageExtractTest.csproj

@@ -75,8 +75,8 @@
     <None Include="packages.config" />
     <None Include="packages.config" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/ImageExtractTest/VB/ImageExtractTest.vbproj

@@ -127,8 +127,8 @@
     <None Include="packages.config" />
     <None Include="packages.config" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/InteractiveFormsTest/CS/InteractiveFormsTest.csproj

@@ -73,8 +73,8 @@
     <None Include="packages.config" />
     <None Include="packages.config" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/InteractiveFormsTest/VB/InteractiveFormsTest.vbproj

@@ -126,8 +126,8 @@
     <None Include="packages.config" />
     <None Include="packages.config" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 25 - 5
Demo/Examples/Samples/LicenseKey.cs

@@ -1,16 +1,36 @@
 using ComPDFKit.NativeMethod;
 using ComPDFKit.NativeMethod;
-using System;
 using System.Xml;
 using System.Xml;
-using static ComPDFKit.NativeMethod.CPDFSDKVerifier;
 
 
 public static class SDKLicenseHelper
 public static class SDKLicenseHelper
-{ 
+{
+    public static string ParseLicenseXML()
+    {
+        try
+        {
+            XmlDocument xmlDocument = new XmlDocument();
+            xmlDocument.Load("license_key_windows.xml");
+            XmlNode xmlNode = xmlDocument.SelectSingleNode("/license/key");
+            if (xmlNode == null)
+            {
+                return string.Empty;
+            }
+            else
+            {
+                return xmlNode.InnerText;
+            }
+        }
+        catch
+        {
+            return string.Empty;
+        }
+    }
+
     public static bool LicenseVerify()
     public static bool LicenseVerify()
     {
     {
-        if (!LoadNativeLibrary())
+        if (!CPDFSDKVerifier.LoadNativeLibrary())
             return false;
             return false;
 
 
-        LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify("license_key_windows.txt", true);
+        LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify(ParseLicenseXML(), false);
         return (verifyResult == LicenseErrorCode.E_LICENSE_SUCCESS);
         return (verifyResult == LicenseErrorCode.E_LICENSE_SUCCESS);
     }
     }
 }
 }

+ 19 - 6
Demo/Examples/Samples/LicenseKey.vb

@@ -1,17 +1,30 @@
-Imports ComPDFKit.NativeMethod
-Imports System
+Imports System
 Imports System.Xml
 Imports System.Xml
-Imports ComPDFKit.NativeMethod.CPDFSDKVerifier
-
+Imports ComPDFKit.NativeMethod
 
 
 Public NotInheritable Class SDKLicenseHelper
 Public NotInheritable Class SDKLicenseHelper
 
 
+    Public Shared Function ParseLicenseXML() As String
+        Try
+            Dim xmlDocument As New XmlDocument()
+            xmlDocument.Load("license_key_windows.xml")
+            Dim xmlNode As XmlNode = xmlDocument.SelectSingleNode("/license/key")
+            If xmlNode Is Nothing Then
+                Return String.Empty
+            Else
+                Return xmlNode.InnerText
+            End If
+        Catch
+            Return String.Empty
+        End Try
+    End Function
+
     Public Shared Function LicenseVerify() As Boolean
     Public Shared Function LicenseVerify() As Boolean
-        If Not LoadNativeLibrary() Then
+        If Not CPDFSDKVerifier.LoadNativeLibrary() Then
             Return False
             Return False
         End If
         End If
 
 
-        Dim verifyResult As LicenseErrorCode = CPDFSDKVerifier.LicenseVerify("license_key_windows.txt", True)
+        Dim verifyResult As LicenseErrorCode = CPDFSDKVerifier.LicenseVerify(ParseLicenseXML(), False)
         Return (verifyResult <> LicenseErrorCode.E_LICENSE_SUCCESS)
         Return (verifyResult <> LicenseErrorCode.E_LICENSE_SUCCESS)
     End Function
     End Function
 End Class
 End Class

+ 2 - 2
Demo/Examples/Samples/OutlineTest/CS/OutlineTest.csproj

@@ -72,8 +72,8 @@
     <None Include="packages.config" />
     <None Include="packages.config" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/OutlineTest/VB/OutlineTest.vbproj

@@ -126,8 +126,8 @@
     <None Include="packages.config" />
     <None Include="packages.config" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/PDFATest/CS/PDFATest.csproj

@@ -72,8 +72,8 @@
     <None Include="packages.config" />
     <None Include="packages.config" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/PDFATest/VB/PDFATest.vbproj

@@ -126,8 +126,8 @@
     <None Include="packages.config" />
     <None Include="packages.config" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/PDFPageTest/CS/PDFPageTest.csproj

@@ -76,8 +76,8 @@
     <None Include="packages.config" />
     <None Include="packages.config" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/PDFPageTest/VB/PDFPageTest.vbproj

@@ -130,8 +130,8 @@
     <None Include="packages.config" />
     <None Include="packages.config" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/PDFRedactTest/CS/PDFRedactTest.csproj

@@ -71,8 +71,8 @@
     <None Include="packages.config" />
     <None Include="packages.config" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/PDFRedactTest/VB/PDFRedactTest.vbproj

@@ -127,8 +127,8 @@
     <None Include="packages.config" />
     <None Include="packages.config" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/PDFToImage/CS/PDFToImageTest.csproj

@@ -74,8 +74,8 @@
     <None Include="packages.config" />
     <None Include="packages.config" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/PDFToImage/VB/PDFToImageTest.vbproj

@@ -129,8 +129,8 @@
     <None Include="packages.config" />
     <None Include="packages.config" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/TextExtractTest/CS/TextExtractTest.csproj

@@ -72,8 +72,8 @@
     <None Include="packages.config" />
     <None Include="packages.config" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/TextExtractTest/VB/TextExtractTest.vbproj

@@ -126,8 +126,8 @@
     <None Include="packages.config" />
     <None Include="packages.config" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/TextSearchTest/CS/TextSearchTest.csproj

@@ -73,8 +73,8 @@
     <None Include="packages.config" />
     <None Include="packages.config" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/TextSearchTest/VB/TextSearchTest.vbproj

@@ -128,8 +128,8 @@
     <None Include="packages.config" />
     <None Include="packages.config" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/WatermarkTest/CS/WatermarkTest.csproj

@@ -84,8 +84,8 @@
     </None>
     </None>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 2 - 2
Demo/Examples/Samples/WatermarkTest/VB/WatermarkTest.vbproj

@@ -135,8 +135,8 @@
       <Link>logo.png</Link>
       <Link>logo.png</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
-    <None Include="..\..\..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
     <Content Include="ComPDFKit_Logo.ico" />
     <Content Include="ComPDFKit_Logo.ico" />

+ 4 - 5
Demo/Examples/Viewer/App.xaml.cs

@@ -5,8 +5,7 @@ using System.IO;
 using System.Reflection;
 using System.Reflection;
 using System.Threading;
 using System.Threading;
 using System.Windows;
 using System.Windows;
-using System.Xml;
-using static ComPDFKit.NativeMethod.CPDFSDKVerifier;
+using System.Xml; 
 
 
 namespace Viewer
 namespace Viewer
 { 
 { 
@@ -25,12 +24,12 @@ namespace Viewer
             Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
             Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
         }
         }
 
 
-        private static bool LicenseVerify()
+        public static bool LicenseVerify()
         {
         {
-            if (!LoadNativeLibrary())
+            if (!CPDFSDKVerifier.LoadNativeLibrary())
                 return false;
                 return false;
 
 
-            LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify("license_key_windows.txt", true);
+            LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify(SDKLicenseHelper.ParseLicenseXML(), false);
             return (verifyResult == LicenseErrorCode.E_LICENSE_SUCCESS);
             return (verifyResult == LicenseErrorCode.E_LICENSE_SUCCESS);
         }
         }
     }
     }

+ 2 - 4
Demo/Examples/Viewer/Viewer.csproj

@@ -125,12 +125,10 @@
     </ProjectReference>
     </ProjectReference>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="..\license_key_windows.txt">
-      <Link>license_key_windows.txt</Link>
+    <None Include="..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
-  </ItemGroup>
-  <ItemGroup>
     <Content Include="..\TestFile\ComPDFKit_Sample_File_Windows.pdf">
     <Content Include="..\TestFile\ComPDFKit_Sample_File_Windows.pdf">
       <Link>ComPDFKit_Sample_File_Windows.pdf</Link>
       <Link>ComPDFKit_Sample_File_Windows.pdf</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

File diff suppressed because it is too large
+ 6 - 0
Demo/Examples/license_key_windows.xml