Browse Source

compdfkit(win) - VB部分测试用例

weixiangjie 1 year ago
parent
commit
91d498d93f
100 changed files with 4416 additions and 39 deletions
  1. 1 10
      Demo/Examples/Compdfkit_Tools/Compdfkit_Tools.csproj
  2. 1 9
      Demo/Examples/DigitalSignature/DigitalSignature.csproj
  3. 210 0
      Demo/Examples/Examlpes.sln
  4. 1 9
      Demo/Examples/Forms/Forms.csproj
  5. 4 4
      Demo/Examples/Samples/AnnotationImportExportTest/CS/AnnotationImportExportTest.csproj
  6. 1 1
      Demo/Examples/Samples/DocumentCompare/CS/DocumentCompare.cs
  7. 6 0
      Demo/Examples/Samples/DocumentCompare/VB/App.config
  8. BIN
      Demo/Examples/Samples/DocumentCompare/VB/ComPDFKit_Logo.ico
  9. 75 0
      Demo/Examples/Samples/DocumentCompare/VB/DocumentCompareTest.vb
  10. 157 0
      Demo/Examples/Samples/DocumentCompare/VB/DocumentCompareTest.vbproj
  11. 13 0
      Demo/Examples/Samples/DocumentCompare/VB/My Project/Application.Designer.vb
  12. 10 0
      Demo/Examples/Samples/DocumentCompare/VB/My Project/Application.myapp
  13. 35 0
      Demo/Examples/Samples/DocumentCompare/VB/My Project/AssemblyInfo.vb
  14. 63 0
      Demo/Examples/Samples/DocumentCompare/VB/My Project/Resources.Designer.vb
  15. 117 0
      Demo/Examples/Samples/DocumentCompare/VB/My Project/Resources.resx
  16. 73 0
      Demo/Examples/Samples/DocumentCompare/VB/My Project/Settings.Designer.vb
  17. 7 0
      Demo/Examples/Samples/DocumentCompare/VB/My Project/Settings.settings
  18. BIN
      Demo/Examples/Samples/DocumentCompare/VB/TextChanged.pdf
  19. 4 0
      Demo/Examples/Samples/DocumentCompare/VB/packages.config
  20. 6 0
      Demo/Examples/Samples/DocumentInfoTest/VB/App.config
  21. BIN
      Demo/Examples/Samples/DocumentInfoTest/VB/ComPDFKit_Logo.ico
  22. 70 0
      Demo/Examples/Samples/DocumentInfoTest/VB/DocumentInfoTest.vb
  23. 142 0
      Demo/Examples/Samples/DocumentInfoTest/VB/DocumentInfoTest.vbproj
  24. 13 0
      Demo/Examples/Samples/DocumentInfoTest/VB/My Project/Application.Designer.vb
  25. 10 0
      Demo/Examples/Samples/DocumentInfoTest/VB/My Project/Application.myapp
  26. 35 0
      Demo/Examples/Samples/DocumentInfoTest/VB/My Project/AssemblyInfo.vb
  27. 63 0
      Demo/Examples/Samples/DocumentInfoTest/VB/My Project/Resources.Designer.vb
  28. 117 0
      Demo/Examples/Samples/DocumentInfoTest/VB/My Project/Resources.resx
  29. 73 0
      Demo/Examples/Samples/DocumentInfoTest/VB/My Project/Settings.Designer.vb
  30. 7 0
      Demo/Examples/Samples/DocumentInfoTest/VB/My Project/Settings.settings
  31. 4 0
      Demo/Examples/Samples/DocumentInfoTest/VB/packages.config
  32. 1 1
      Demo/Examples/Samples/EncryptTest/CS/EncryptTest.cs
  33. 6 0
      Demo/Examples/Samples/EncryptTest/VB/App.config
  34. BIN
      Demo/Examples/Samples/EncryptTest/VB/ComPDFKit_Logo.ico
  35. 314 0
      Demo/Examples/Samples/EncryptTest/VB/EncryptTest.vb
  36. 146 0
      Demo/Examples/Samples/EncryptTest/VB/EncryptTest.vbproj
  37. 13 0
      Demo/Examples/Samples/EncryptTest/VB/My Project/Application.Designer.vb
  38. 10 0
      Demo/Examples/Samples/EncryptTest/VB/My Project/Application.myapp
  39. 35 0
      Demo/Examples/Samples/EncryptTest/VB/My Project/AssemblyInfo.vb
  40. 63 0
      Demo/Examples/Samples/EncryptTest/VB/My Project/Resources.Designer.vb
  41. 117 0
      Demo/Examples/Samples/EncryptTest/VB/My Project/Resources.resx
  42. 73 0
      Demo/Examples/Samples/EncryptTest/VB/My Project/Settings.Designer.vb
  43. 7 0
      Demo/Examples/Samples/EncryptTest/VB/My Project/Settings.settings
  44. 4 0
      Demo/Examples/Samples/EncryptTest/VB/packages.config
  45. 1 1
      Demo/Examples/Samples/FlattenTest/CS/FlattenTest.cs
  46. 6 0
      Demo/Examples/Samples/FlattenTest/VB/App.config
  47. BIN
      Demo/Examples/Samples/FlattenTest/VB/ComPDFKit_Logo.ico
  48. 65 0
      Demo/Examples/Samples/FlattenTest/VB/FlattenTest.vb
  49. 141 0
      Demo/Examples/Samples/FlattenTest/VB/FlattenTest.vbproj
  50. 13 0
      Demo/Examples/Samples/FlattenTest/VB/My Project/Application.Designer.vb
  51. 10 0
      Demo/Examples/Samples/FlattenTest/VB/My Project/Application.myapp
  52. 35 0
      Demo/Examples/Samples/FlattenTest/VB/My Project/AssemblyInfo.vb
  53. 62 0
      Demo/Examples/Samples/FlattenTest/VB/My Project/Resources.Designer.vb
  54. 117 0
      Demo/Examples/Samples/FlattenTest/VB/My Project/Resources.resx
  55. 73 0
      Demo/Examples/Samples/FlattenTest/VB/My Project/Settings.Designer.vb
  56. 7 0
      Demo/Examples/Samples/FlattenTest/VB/My Project/Settings.settings
  57. 4 0
      Demo/Examples/Samples/FlattenTest/VB/packages.config
  58. 1 1
      Demo/Examples/Samples/HeaderFooterTest/CS/HeaderFooterTest.cs
  59. 6 0
      Demo/Examples/Samples/HeaderFooterTest/VB/App.config
  60. BIN
      Demo/Examples/Samples/HeaderFooterTest/VB/ComPDFKit_Logo.ico
  61. 164 0
      Demo/Examples/Samples/HeaderFooterTest/VB/HeaderFooterTest.vb
  62. 139 0
      Demo/Examples/Samples/HeaderFooterTest/VB/HeaderFooterTest.vbproj
  63. 13 0
      Demo/Examples/Samples/HeaderFooterTest/VB/My Project/Application.Designer.vb
  64. 10 0
      Demo/Examples/Samples/HeaderFooterTest/VB/My Project/Application.myapp
  65. 35 0
      Demo/Examples/Samples/HeaderFooterTest/VB/My Project/AssemblyInfo.vb
  66. 63 0
      Demo/Examples/Samples/HeaderFooterTest/VB/My Project/Resources.Designer.vb
  67. 117 0
      Demo/Examples/Samples/HeaderFooterTest/VB/My Project/Resources.resx
  68. 73 0
      Demo/Examples/Samples/HeaderFooterTest/VB/My Project/Settings.Designer.vb
  69. 7 0
      Demo/Examples/Samples/HeaderFooterTest/VB/My Project/Settings.settings
  70. 4 0
      Demo/Examples/Samples/HeaderFooterTest/VB/packages.config
  71. 1 1
      Demo/Examples/Samples/ImageExtractTest/CS/ImageExtractTest.cs
  72. 6 0
      Demo/Examples/Samples/ImageExtractTest/VB/App.config
  73. BIN
      Demo/Examples/Samples/ImageExtractTest/VB/ComPDFKit_Logo.ico
  74. 34 0
      Demo/Examples/Samples/ImageExtractTest/VB/ImageExtractTest.vb
  75. 142 0
      Demo/Examples/Samples/ImageExtractTest/VB/ImageExtractTest.vbproj
  76. 13 0
      Demo/Examples/Samples/ImageExtractTest/VB/My Project/Application.Designer.vb
  77. 10 0
      Demo/Examples/Samples/ImageExtractTest/VB/My Project/Application.myapp
  78. 35 0
      Demo/Examples/Samples/ImageExtractTest/VB/My Project/AssemblyInfo.vb
  79. 63 0
      Demo/Examples/Samples/ImageExtractTest/VB/My Project/Resources.Designer.vb
  80. 117 0
      Demo/Examples/Samples/ImageExtractTest/VB/My Project/Resources.resx
  81. 73 0
      Demo/Examples/Samples/ImageExtractTest/VB/My Project/Settings.Designer.vb
  82. 7 0
      Demo/Examples/Samples/ImageExtractTest/VB/My Project/Settings.settings
  83. 4 0
      Demo/Examples/Samples/ImageExtractTest/VB/packages.config
  84. 1 1
      Demo/Examples/Samples/InteractiveFormsTest/CS/InteractiveFormsTest.cs
  85. 6 0
      Demo/Examples/Samples/InteractiveFormsTest/VB/App.config
  86. BIN
      Demo/Examples/Samples/InteractiveFormsTest/VB/ComPDFKit_Logo.ico
  87. 162 0
      Demo/Examples/Samples/InteractiveFormsTest/VB/InteractiveFormsTest.vb
  88. 141 0
      Demo/Examples/Samples/InteractiveFormsTest/VB/InteractiveFormsTest.vbproj
  89. 13 0
      Demo/Examples/Samples/InteractiveFormsTest/VB/My Project/Application.Designer.vb
  90. 10 0
      Demo/Examples/Samples/InteractiveFormsTest/VB/My Project/Application.myapp
  91. 35 0
      Demo/Examples/Samples/InteractiveFormsTest/VB/My Project/AssemblyInfo.vb
  92. 62 0
      Demo/Examples/Samples/InteractiveFormsTest/VB/My Project/Resources.Designer.vb
  93. 117 0
      Demo/Examples/Samples/InteractiveFormsTest/VB/My Project/Resources.resx
  94. 73 0
      Demo/Examples/Samples/InteractiveFormsTest/VB/My Project/Settings.Designer.vb
  95. 7 0
      Demo/Examples/Samples/InteractiveFormsTest/VB/My Project/Settings.settings
  96. 4 0
      Demo/Examples/Samples/InteractiveFormsTest/VB/packages.config
  97. 1 1
      Demo/Examples/Samples/OutlineTest/CS/OutlineTest.cs
  98. 6 0
      Demo/Examples/Samples/OutlineTest/VB/App.config
  99. BIN
      Demo/Examples/Samples/OutlineTest/VB/ComPDFKit_Logo.ico
  100. 0 0
      Demo/Examples/Samples/OutlineTest/VB/My Project/Application.Designer.vb

+ 1 - 10
Demo/Examples/Compdfkit_Tools/Compdfkit_Tools.csproj

@@ -17,6 +17,7 @@
     <TargetFrameworkProfile />
     <NuGetPackageImportStamp>
     </NuGetPackageImportStamp>
+    <LangVersion>7.3</LangVersion>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <PlatformTarget>AnyCPU</PlatformTarget>
@@ -931,16 +932,6 @@
     </Page>
     <Page Include="PDFView\RegularViewerControl.xaml" />
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\..\..\..\compdfkit\ComPDFKit\ComPDFKitCSharp\ComPDFKit.Desk.csproj">
-      <Project>{56e518ad-c126-4b48-9a09-0a64c87020e4}</Project>
-      <Name>ComPDFKit.Desk</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\..\..\compdfkit\ComPDFKit\ComPDFKitDesktop\ComPDFKit.Viewer\ComPDFKit.Viewer.csproj">
-      <Project>{18ec356d-8130-49d4-b4e6-ac290e1065b7}</Project>
-      <Name>ComPDFKit.Viewer</Name>
-    </ProjectReference>
-  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets" Condition="Exists('..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets')" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">

+ 1 - 9
Demo/Examples/DigitalSignature/DigitalSignature.csproj

@@ -145,14 +145,6 @@
     <None Include="App.config" />
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\..\..\..\compdfkit\ComPDFKit\ComPDFKitCSharp\ComPDFKit.Desk.csproj">
-      <Project>{56e518ad-c126-4b48-9a09-0a64c87020e4}</Project>
-      <Name>ComPDFKit.Desk</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\..\..\compdfkit\ComPDFKit\ComPDFKitDesktop\ComPDFKit.Viewer\ComPDFKit.Viewer.csproj">
-      <Project>{18ec356d-8130-49d4-b4e6-ac290e1065b7}</Project>
-      <Name>ComPDFKit.Viewer</Name>
-    </ProjectReference>
     <ProjectReference Include="..\Compdfkit_Tools\Compdfkit_Tools.csproj">
       <Project>{9363bcb1-3a67-446a-8093-5708b86bf418}</Project>
       <Name>Compdfkit_Tools</Name>
@@ -174,7 +166,7 @@
   <Import Project="..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets" Condition="Exists('..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets')" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
     <PropertyGroup>
-      <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
+      <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.The missing file is {0}.</ErrorText>
     </PropertyGroup>
     <Error Condition="!Exists('..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets'))" />
   </Target>

+ 210 - 0
Demo/Examples/Examlpes.sln

@@ -76,6 +76,34 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WatermarkTest", "Samples\Wa
 EndProject
 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "AnnotationImportExportTest", "Samples\AnnotationImportExportTest\VB\AnnotationImportExportTest.vbproj", "{FFBD38E6-2CAE-4A9F-9E51-2A3CEFD82A0D}"
 EndProject
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "TextSearchTest", "Samples\TextSearchTest\VB\TextSearchTest.vbproj", "{72F0E73F-C5E7-4059-AE51-D285221A79F6}"
+EndProject
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "TextExtractTest", "Samples\TextExtractTest\VB\TextExtractTest.vbproj", "{9E580A41-AD4F-4106-AA50-EFDB46DEA40A}"
+EndProject
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "PDFToImageTest", "Samples\PDFToImage\VB\PDFToImageTest.vbproj", "{6D1DE0A5-8E7D-403E-8470-F72BB06FD35A}"
+EndProject
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "PDFRedactTest", "Samples\PDFRedactTest\VB\PDFRedactTest.vbproj", "{E1E76750-042A-4EB5-A753-402C5AD07780}"
+EndProject
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "PDFPageTest", "Samples\PDFPageTest\VB\PDFPageTest.vbproj", "{6494E133-B334-4183-AF63-1287AC4E9085}"
+EndProject
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "PDFATest", "Samples\PDFATest\VB\PDFATest.vbproj", "{24A7C9D4-042C-4687-ABAD-339F3C07CDDF}"
+EndProject
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "OutlineTest", "Samples\OutlineTest\VB\OutlineTest.vbproj", "{8506EBB7-AAC4-49AF-ACAD-616D500ECF2A}"
+EndProject
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "InteractiveFormsTest", "Samples\InteractiveFormsTest\VB\InteractiveFormsTest.vbproj", "{805251B5-D40B-4920-B725-6C92B4C9DBE2}"
+EndProject
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ImageExtractTest", "Samples\ImageExtractTest\VB\ImageExtractTest.vbproj", "{AE11BDA6-8A50-405C-A5F2-54EFCD3C76F9}"
+EndProject
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "HeaderFooterTest", "Samples\HeaderFooterTest\VB\HeaderFooterTest.vbproj", "{BF771C7A-78C3-4775-963C-A5632426CA1A}"
+EndProject
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "FlattenTest", "Samples\FlattenTest\VB\FlattenTest.vbproj", "{BB1E309D-A937-4E41-B8A3-C2F52AE509CD}"
+EndProject
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EncryptTest", "Samples\EncryptTest\VB\EncryptTest.vbproj", "{36760764-DC79-4857-8500-9BD7CF77101E}"
+EndProject
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "DocumentInfoTest", "Samples\DocumentInfoTest\VB\DocumentInfoTest.vbproj", "{9E6E96F8-C900-4374-A7A3-93481F733379}"
+EndProject
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "DocumentCompareTest", "Samples\DocumentCompare\VB\DocumentCompareTest.vbproj", "{F22C3E06-1B62-4516-AFC8-11F9B706206D}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -456,6 +484,174 @@ Global
 		{FFBD38E6-2CAE-4A9F-9E51-2A3CEFD82A0D}.Release|x64.Build.0 = Release|Any CPU
 		{FFBD38E6-2CAE-4A9F-9E51-2A3CEFD82A0D}.Release|x86.ActiveCfg = Release|Any CPU
 		{FFBD38E6-2CAE-4A9F-9E51-2A3CEFD82A0D}.Release|x86.Build.0 = Release|Any CPU
+		{72F0E73F-C5E7-4059-AE51-D285221A79F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{72F0E73F-C5E7-4059-AE51-D285221A79F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{72F0E73F-C5E7-4059-AE51-D285221A79F6}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{72F0E73F-C5E7-4059-AE51-D285221A79F6}.Debug|x64.Build.0 = Debug|Any CPU
+		{72F0E73F-C5E7-4059-AE51-D285221A79F6}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{72F0E73F-C5E7-4059-AE51-D285221A79F6}.Debug|x86.Build.0 = Debug|Any CPU
+		{72F0E73F-C5E7-4059-AE51-D285221A79F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{72F0E73F-C5E7-4059-AE51-D285221A79F6}.Release|Any CPU.Build.0 = Release|Any CPU
+		{72F0E73F-C5E7-4059-AE51-D285221A79F6}.Release|x64.ActiveCfg = Release|Any CPU
+		{72F0E73F-C5E7-4059-AE51-D285221A79F6}.Release|x64.Build.0 = Release|Any CPU
+		{72F0E73F-C5E7-4059-AE51-D285221A79F6}.Release|x86.ActiveCfg = Release|Any CPU
+		{72F0E73F-C5E7-4059-AE51-D285221A79F6}.Release|x86.Build.0 = Release|Any CPU
+		{9E580A41-AD4F-4106-AA50-EFDB46DEA40A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{9E580A41-AD4F-4106-AA50-EFDB46DEA40A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{9E580A41-AD4F-4106-AA50-EFDB46DEA40A}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{9E580A41-AD4F-4106-AA50-EFDB46DEA40A}.Debug|x64.Build.0 = Debug|Any CPU
+		{9E580A41-AD4F-4106-AA50-EFDB46DEA40A}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{9E580A41-AD4F-4106-AA50-EFDB46DEA40A}.Debug|x86.Build.0 = Debug|Any CPU
+		{9E580A41-AD4F-4106-AA50-EFDB46DEA40A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{9E580A41-AD4F-4106-AA50-EFDB46DEA40A}.Release|Any CPU.Build.0 = Release|Any CPU
+		{9E580A41-AD4F-4106-AA50-EFDB46DEA40A}.Release|x64.ActiveCfg = Release|Any CPU
+		{9E580A41-AD4F-4106-AA50-EFDB46DEA40A}.Release|x64.Build.0 = Release|Any CPU
+		{9E580A41-AD4F-4106-AA50-EFDB46DEA40A}.Release|x86.ActiveCfg = Release|Any CPU
+		{9E580A41-AD4F-4106-AA50-EFDB46DEA40A}.Release|x86.Build.0 = Release|Any CPU
+		{6D1DE0A5-8E7D-403E-8470-F72BB06FD35A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{6D1DE0A5-8E7D-403E-8470-F72BB06FD35A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{6D1DE0A5-8E7D-403E-8470-F72BB06FD35A}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{6D1DE0A5-8E7D-403E-8470-F72BB06FD35A}.Debug|x64.Build.0 = Debug|Any CPU
+		{6D1DE0A5-8E7D-403E-8470-F72BB06FD35A}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{6D1DE0A5-8E7D-403E-8470-F72BB06FD35A}.Debug|x86.Build.0 = Debug|Any CPU
+		{6D1DE0A5-8E7D-403E-8470-F72BB06FD35A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{6D1DE0A5-8E7D-403E-8470-F72BB06FD35A}.Release|Any CPU.Build.0 = Release|Any CPU
+		{6D1DE0A5-8E7D-403E-8470-F72BB06FD35A}.Release|x64.ActiveCfg = Release|Any CPU
+		{6D1DE0A5-8E7D-403E-8470-F72BB06FD35A}.Release|x64.Build.0 = Release|Any CPU
+		{6D1DE0A5-8E7D-403E-8470-F72BB06FD35A}.Release|x86.ActiveCfg = Release|Any CPU
+		{6D1DE0A5-8E7D-403E-8470-F72BB06FD35A}.Release|x86.Build.0 = Release|Any CPU
+		{E1E76750-042A-4EB5-A753-402C5AD07780}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{E1E76750-042A-4EB5-A753-402C5AD07780}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{E1E76750-042A-4EB5-A753-402C5AD07780}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{E1E76750-042A-4EB5-A753-402C5AD07780}.Debug|x64.Build.0 = Debug|Any CPU
+		{E1E76750-042A-4EB5-A753-402C5AD07780}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{E1E76750-042A-4EB5-A753-402C5AD07780}.Debug|x86.Build.0 = Debug|Any CPU
+		{E1E76750-042A-4EB5-A753-402C5AD07780}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{E1E76750-042A-4EB5-A753-402C5AD07780}.Release|Any CPU.Build.0 = Release|Any CPU
+		{E1E76750-042A-4EB5-A753-402C5AD07780}.Release|x64.ActiveCfg = Release|Any CPU
+		{E1E76750-042A-4EB5-A753-402C5AD07780}.Release|x64.Build.0 = Release|Any CPU
+		{E1E76750-042A-4EB5-A753-402C5AD07780}.Release|x86.ActiveCfg = Release|Any CPU
+		{E1E76750-042A-4EB5-A753-402C5AD07780}.Release|x86.Build.0 = Release|Any CPU
+		{6494E133-B334-4183-AF63-1287AC4E9085}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{6494E133-B334-4183-AF63-1287AC4E9085}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{6494E133-B334-4183-AF63-1287AC4E9085}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{6494E133-B334-4183-AF63-1287AC4E9085}.Debug|x64.Build.0 = Debug|Any CPU
+		{6494E133-B334-4183-AF63-1287AC4E9085}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{6494E133-B334-4183-AF63-1287AC4E9085}.Debug|x86.Build.0 = Debug|Any CPU
+		{6494E133-B334-4183-AF63-1287AC4E9085}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{6494E133-B334-4183-AF63-1287AC4E9085}.Release|Any CPU.Build.0 = Release|Any CPU
+		{6494E133-B334-4183-AF63-1287AC4E9085}.Release|x64.ActiveCfg = Release|Any CPU
+		{6494E133-B334-4183-AF63-1287AC4E9085}.Release|x64.Build.0 = Release|Any CPU
+		{6494E133-B334-4183-AF63-1287AC4E9085}.Release|x86.ActiveCfg = Release|Any CPU
+		{6494E133-B334-4183-AF63-1287AC4E9085}.Release|x86.Build.0 = Release|Any CPU
+		{24A7C9D4-042C-4687-ABAD-339F3C07CDDF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{24A7C9D4-042C-4687-ABAD-339F3C07CDDF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{24A7C9D4-042C-4687-ABAD-339F3C07CDDF}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{24A7C9D4-042C-4687-ABAD-339F3C07CDDF}.Debug|x64.Build.0 = Debug|Any CPU
+		{24A7C9D4-042C-4687-ABAD-339F3C07CDDF}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{24A7C9D4-042C-4687-ABAD-339F3C07CDDF}.Debug|x86.Build.0 = Debug|Any CPU
+		{24A7C9D4-042C-4687-ABAD-339F3C07CDDF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{24A7C9D4-042C-4687-ABAD-339F3C07CDDF}.Release|Any CPU.Build.0 = Release|Any CPU
+		{24A7C9D4-042C-4687-ABAD-339F3C07CDDF}.Release|x64.ActiveCfg = Release|Any CPU
+		{24A7C9D4-042C-4687-ABAD-339F3C07CDDF}.Release|x64.Build.0 = Release|Any CPU
+		{24A7C9D4-042C-4687-ABAD-339F3C07CDDF}.Release|x86.ActiveCfg = Release|Any CPU
+		{24A7C9D4-042C-4687-ABAD-339F3C07CDDF}.Release|x86.Build.0 = Release|Any CPU
+		{8506EBB7-AAC4-49AF-ACAD-616D500ECF2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{8506EBB7-AAC4-49AF-ACAD-616D500ECF2A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{8506EBB7-AAC4-49AF-ACAD-616D500ECF2A}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{8506EBB7-AAC4-49AF-ACAD-616D500ECF2A}.Debug|x64.Build.0 = Debug|Any CPU
+		{8506EBB7-AAC4-49AF-ACAD-616D500ECF2A}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{8506EBB7-AAC4-49AF-ACAD-616D500ECF2A}.Debug|x86.Build.0 = Debug|Any CPU
+		{8506EBB7-AAC4-49AF-ACAD-616D500ECF2A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{8506EBB7-AAC4-49AF-ACAD-616D500ECF2A}.Release|Any CPU.Build.0 = Release|Any CPU
+		{8506EBB7-AAC4-49AF-ACAD-616D500ECF2A}.Release|x64.ActiveCfg = Release|Any CPU
+		{8506EBB7-AAC4-49AF-ACAD-616D500ECF2A}.Release|x64.Build.0 = Release|Any CPU
+		{8506EBB7-AAC4-49AF-ACAD-616D500ECF2A}.Release|x86.ActiveCfg = Release|Any CPU
+		{8506EBB7-AAC4-49AF-ACAD-616D500ECF2A}.Release|x86.Build.0 = Release|Any CPU
+		{805251B5-D40B-4920-B725-6C92B4C9DBE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{805251B5-D40B-4920-B725-6C92B4C9DBE2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{805251B5-D40B-4920-B725-6C92B4C9DBE2}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{805251B5-D40B-4920-B725-6C92B4C9DBE2}.Debug|x64.Build.0 = Debug|Any CPU
+		{805251B5-D40B-4920-B725-6C92B4C9DBE2}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{805251B5-D40B-4920-B725-6C92B4C9DBE2}.Debug|x86.Build.0 = Debug|Any CPU
+		{805251B5-D40B-4920-B725-6C92B4C9DBE2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{805251B5-D40B-4920-B725-6C92B4C9DBE2}.Release|Any CPU.Build.0 = Release|Any CPU
+		{805251B5-D40B-4920-B725-6C92B4C9DBE2}.Release|x64.ActiveCfg = Release|Any CPU
+		{805251B5-D40B-4920-B725-6C92B4C9DBE2}.Release|x64.Build.0 = Release|Any CPU
+		{805251B5-D40B-4920-B725-6C92B4C9DBE2}.Release|x86.ActiveCfg = Release|Any CPU
+		{805251B5-D40B-4920-B725-6C92B4C9DBE2}.Release|x86.Build.0 = Release|Any CPU
+		{AE11BDA6-8A50-405C-A5F2-54EFCD3C76F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{AE11BDA6-8A50-405C-A5F2-54EFCD3C76F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{AE11BDA6-8A50-405C-A5F2-54EFCD3C76F9}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{AE11BDA6-8A50-405C-A5F2-54EFCD3C76F9}.Debug|x64.Build.0 = Debug|Any CPU
+		{AE11BDA6-8A50-405C-A5F2-54EFCD3C76F9}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{AE11BDA6-8A50-405C-A5F2-54EFCD3C76F9}.Debug|x86.Build.0 = Debug|Any CPU
+		{AE11BDA6-8A50-405C-A5F2-54EFCD3C76F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{AE11BDA6-8A50-405C-A5F2-54EFCD3C76F9}.Release|Any CPU.Build.0 = Release|Any CPU
+		{AE11BDA6-8A50-405C-A5F2-54EFCD3C76F9}.Release|x64.ActiveCfg = Release|Any CPU
+		{AE11BDA6-8A50-405C-A5F2-54EFCD3C76F9}.Release|x64.Build.0 = Release|Any CPU
+		{AE11BDA6-8A50-405C-A5F2-54EFCD3C76F9}.Release|x86.ActiveCfg = Release|Any CPU
+		{AE11BDA6-8A50-405C-A5F2-54EFCD3C76F9}.Release|x86.Build.0 = Release|Any CPU
+		{BF771C7A-78C3-4775-963C-A5632426CA1A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{BF771C7A-78C3-4775-963C-A5632426CA1A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{BF771C7A-78C3-4775-963C-A5632426CA1A}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{BF771C7A-78C3-4775-963C-A5632426CA1A}.Debug|x64.Build.0 = Debug|Any CPU
+		{BF771C7A-78C3-4775-963C-A5632426CA1A}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{BF771C7A-78C3-4775-963C-A5632426CA1A}.Debug|x86.Build.0 = Debug|Any CPU
+		{BF771C7A-78C3-4775-963C-A5632426CA1A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{BF771C7A-78C3-4775-963C-A5632426CA1A}.Release|Any CPU.Build.0 = Release|Any CPU
+		{BF771C7A-78C3-4775-963C-A5632426CA1A}.Release|x64.ActiveCfg = Release|Any CPU
+		{BF771C7A-78C3-4775-963C-A5632426CA1A}.Release|x64.Build.0 = Release|Any CPU
+		{BF771C7A-78C3-4775-963C-A5632426CA1A}.Release|x86.ActiveCfg = Release|Any CPU
+		{BF771C7A-78C3-4775-963C-A5632426CA1A}.Release|x86.Build.0 = Release|Any CPU
+		{BB1E309D-A937-4E41-B8A3-C2F52AE509CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{BB1E309D-A937-4E41-B8A3-C2F52AE509CD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{BB1E309D-A937-4E41-B8A3-C2F52AE509CD}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{BB1E309D-A937-4E41-B8A3-C2F52AE509CD}.Debug|x64.Build.0 = Debug|Any CPU
+		{BB1E309D-A937-4E41-B8A3-C2F52AE509CD}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{BB1E309D-A937-4E41-B8A3-C2F52AE509CD}.Debug|x86.Build.0 = Debug|Any CPU
+		{BB1E309D-A937-4E41-B8A3-C2F52AE509CD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{BB1E309D-A937-4E41-B8A3-C2F52AE509CD}.Release|Any CPU.Build.0 = Release|Any CPU
+		{BB1E309D-A937-4E41-B8A3-C2F52AE509CD}.Release|x64.ActiveCfg = Release|Any CPU
+		{BB1E309D-A937-4E41-B8A3-C2F52AE509CD}.Release|x64.Build.0 = Release|Any CPU
+		{BB1E309D-A937-4E41-B8A3-C2F52AE509CD}.Release|x86.ActiveCfg = Release|Any CPU
+		{BB1E309D-A937-4E41-B8A3-C2F52AE509CD}.Release|x86.Build.0 = Release|Any CPU
+		{36760764-DC79-4857-8500-9BD7CF77101E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{36760764-DC79-4857-8500-9BD7CF77101E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{36760764-DC79-4857-8500-9BD7CF77101E}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{36760764-DC79-4857-8500-9BD7CF77101E}.Debug|x64.Build.0 = Debug|Any CPU
+		{36760764-DC79-4857-8500-9BD7CF77101E}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{36760764-DC79-4857-8500-9BD7CF77101E}.Debug|x86.Build.0 = Debug|Any CPU
+		{36760764-DC79-4857-8500-9BD7CF77101E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{36760764-DC79-4857-8500-9BD7CF77101E}.Release|Any CPU.Build.0 = Release|Any CPU
+		{36760764-DC79-4857-8500-9BD7CF77101E}.Release|x64.ActiveCfg = Release|Any CPU
+		{36760764-DC79-4857-8500-9BD7CF77101E}.Release|x64.Build.0 = Release|Any CPU
+		{36760764-DC79-4857-8500-9BD7CF77101E}.Release|x86.ActiveCfg = Release|Any CPU
+		{36760764-DC79-4857-8500-9BD7CF77101E}.Release|x86.Build.0 = Release|Any CPU
+		{9E6E96F8-C900-4374-A7A3-93481F733379}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{9E6E96F8-C900-4374-A7A3-93481F733379}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{9E6E96F8-C900-4374-A7A3-93481F733379}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{9E6E96F8-C900-4374-A7A3-93481F733379}.Debug|x64.Build.0 = Debug|Any CPU
+		{9E6E96F8-C900-4374-A7A3-93481F733379}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{9E6E96F8-C900-4374-A7A3-93481F733379}.Debug|x86.Build.0 = Debug|Any CPU
+		{9E6E96F8-C900-4374-A7A3-93481F733379}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{9E6E96F8-C900-4374-A7A3-93481F733379}.Release|Any CPU.Build.0 = Release|Any CPU
+		{9E6E96F8-C900-4374-A7A3-93481F733379}.Release|x64.ActiveCfg = Release|Any CPU
+		{9E6E96F8-C900-4374-A7A3-93481F733379}.Release|x64.Build.0 = Release|Any CPU
+		{9E6E96F8-C900-4374-A7A3-93481F733379}.Release|x86.ActiveCfg = Release|Any CPU
+		{9E6E96F8-C900-4374-A7A3-93481F733379}.Release|x86.Build.0 = Release|Any CPU
+		{F22C3E06-1B62-4516-AFC8-11F9B706206D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{F22C3E06-1B62-4516-AFC8-11F9B706206D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{F22C3E06-1B62-4516-AFC8-11F9B706206D}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{F22C3E06-1B62-4516-AFC8-11F9B706206D}.Debug|x64.Build.0 = Debug|Any CPU
+		{F22C3E06-1B62-4516-AFC8-11F9B706206D}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{F22C3E06-1B62-4516-AFC8-11F9B706206D}.Debug|x86.Build.0 = Debug|Any CPU
+		{F22C3E06-1B62-4516-AFC8-11F9B706206D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{F22C3E06-1B62-4516-AFC8-11F9B706206D}.Release|Any CPU.Build.0 = Release|Any CPU
+		{F22C3E06-1B62-4516-AFC8-11F9B706206D}.Release|x64.ActiveCfg = Release|Any CPU
+		{F22C3E06-1B62-4516-AFC8-11F9B706206D}.Release|x64.Build.0 = Release|Any CPU
+		{F22C3E06-1B62-4516-AFC8-11F9B706206D}.Release|x86.ActiveCfg = Release|Any CPU
+		{F22C3E06-1B62-4516-AFC8-11F9B706206D}.Release|x86.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -486,6 +682,20 @@ Global
 		{0B9A4542-3DFF-4862-973C-12308CBB2FAA} = {812D8275-2791-4CEF-A4E8-39A78E49D8FB}
 		{0A17E1EE-3912-491F-A9DB-E5F72B36938D} = {0B9A4542-3DFF-4862-973C-12308CBB2FAA}
 		{FFBD38E6-2CAE-4A9F-9E51-2A3CEFD82A0D} = {0B9A4542-3DFF-4862-973C-12308CBB2FAA}
+		{72F0E73F-C5E7-4059-AE51-D285221A79F6} = {0B9A4542-3DFF-4862-973C-12308CBB2FAA}
+		{9E580A41-AD4F-4106-AA50-EFDB46DEA40A} = {0B9A4542-3DFF-4862-973C-12308CBB2FAA}
+		{6D1DE0A5-8E7D-403E-8470-F72BB06FD35A} = {0B9A4542-3DFF-4862-973C-12308CBB2FAA}
+		{E1E76750-042A-4EB5-A753-402C5AD07780} = {0B9A4542-3DFF-4862-973C-12308CBB2FAA}
+		{6494E133-B334-4183-AF63-1287AC4E9085} = {0B9A4542-3DFF-4862-973C-12308CBB2FAA}
+		{24A7C9D4-042C-4687-ABAD-339F3C07CDDF} = {0B9A4542-3DFF-4862-973C-12308CBB2FAA}
+		{8506EBB7-AAC4-49AF-ACAD-616D500ECF2A} = {0B9A4542-3DFF-4862-973C-12308CBB2FAA}
+		{805251B5-D40B-4920-B725-6C92B4C9DBE2} = {0B9A4542-3DFF-4862-973C-12308CBB2FAA}
+		{AE11BDA6-8A50-405C-A5F2-54EFCD3C76F9} = {0B9A4542-3DFF-4862-973C-12308CBB2FAA}
+		{BF771C7A-78C3-4775-963C-A5632426CA1A} = {0B9A4542-3DFF-4862-973C-12308CBB2FAA}
+		{BB1E309D-A937-4E41-B8A3-C2F52AE509CD} = {0B9A4542-3DFF-4862-973C-12308CBB2FAA}
+		{36760764-DC79-4857-8500-9BD7CF77101E} = {0B9A4542-3DFF-4862-973C-12308CBB2FAA}
+		{9E6E96F8-C900-4374-A7A3-93481F733379} = {0B9A4542-3DFF-4862-973C-12308CBB2FAA}
+		{F22C3E06-1B62-4516-AFC8-11F9B706206D} = {0B9A4542-3DFF-4862-973C-12308CBB2FAA}
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
 		SolutionGuid = {8EE774F1-5FBF-482A-9A31-5ABDEC216DEF}

+ 1 - 9
Demo/Examples/Forms/Forms.csproj

@@ -115,14 +115,6 @@
     <Resource Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\..\..\..\compdfkit\ComPDFKit\ComPDFKitCSharp\ComPDFKit.Desk.csproj">
-      <Project>{56e518ad-c126-4b48-9a09-0a64c87020e4}</Project>
-      <Name>ComPDFKit.Desk</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\..\..\compdfkit\ComPDFKit\ComPDFKitDesktop\ComPDFKit.Viewer\ComPDFKit.Viewer.csproj">
-      <Project>{18ec356d-8130-49d4-b4e6-ac290e1065b7}</Project>
-      <Name>ComPDFKit.Viewer</Name>
-    </ProjectReference>
     <ProjectReference Include="..\Compdfkit_Tools\Compdfkit_Tools.csproj">
       <Project>{9363bcb1-3a67-446a-8093-5708b86bf418}</Project>
       <Name>Compdfkit_Tools</Name>
@@ -132,7 +124,7 @@
   <Import Project="..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets" Condition="Exists('..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets')" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
     <PropertyGroup>
-      <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
+      <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.The missing file is {0}.</ErrorText>
     </PropertyGroup>
     <Error Condition="!Exists('..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets'))" />
   </Target>

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

@@ -71,11 +71,11 @@
     <ApplicationIcon>ComPDFKit_Logo.ico</ApplicationIcon>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="ComPDFKit.Desk, Version=1.10.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <HintPath>..\..\..\..\packages\ComPDFKit.NetFramework.1.10.0\lib\ComPDFKit.Desk.dll</HintPath>
+    <Reference Include="ComPDFKit.Desk">
+      <HintPath>..\..\..\packages\ComPDFKit.NetFramework.1.10.0\lib\ComPDFKit.Desk.dll</HintPath>
     </Reference>
-    <Reference Include="ComPDFKit.Viewer, Version=1.10.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <HintPath>..\..\..\..\packages\ComPDFKit.NetFramework.1.10.0\lib\ComPDFKit.Viewer.dll</HintPath>
+    <Reference Include="ComPDFKit.Viewer">
+      <HintPath>..\..\..\packages\ComPDFKit.NetFramework.1.10.0\lib\ComPDFKit.Viewer.dll</HintPath>
     </Reference>
     <Reference Include="PresentationFramework.Aero2, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
       <HintPath>..\..\..\..\packages\PresentationFramework.Aero2.1.0.1\lib\PresentationFramework.Aero2.dll</HintPath>

+ 1 - 1
Demo/Examples/Samples/DocumentCompare/CS/DocumentCompare.cs

@@ -7,7 +7,7 @@ namespace DocumentCompareTest
 {
     internal class DocumentCompare
     {
-        static private string outputPath = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory()))) + "\\Output\\DocumentCompare";
+        static private string outputPath = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory()))) + "\\Output\\CS";
 
         static void Main(string[] args)
         {

+ 6 - 0
Demo/Examples/Samples/DocumentCompare/VB/App.config

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+    <startup> 
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
+    </startup>
+</configuration>

BIN
Demo/Examples/Samples/DocumentCompare/VB/ComPDFKit_Logo.ico


+ 75 - 0
Demo/Examples/Samples/DocumentCompare/VB/DocumentCompareTest.vb

@@ -0,0 +1,75 @@
+Imports ComPDFKit.Compare
+Imports ComPDFKit.PDFDocument
+Imports System
+Imports System.IO
+
+Module DocumentCompareTest
+    Private outputPath As String = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory()))) & "\Output\VB"
+
+    Sub Main(args As String())
+        Console.WriteLine("Running PDFPage test sample..." & vbCrLf)
+
+        SDKLicenseHelper.LicenseVerify()
+
+        If Not Directory.Exists(outputPath) Then
+            Directory.CreateDirectory(outputPath)
+        End If
+
+        Dim document1 As CPDFDocument = CPDFDocument.InitWithFilePath("ElectricalDiagram.pdf")
+        Dim document2 As CPDFDocument = CPDFDocument.InitWithFilePath("ElectricalDiagram_New.pdf")
+        If OverlayCompareDocument(document1, document2) Then
+            Console.WriteLine("Compare document done.")
+        Else
+            Console.WriteLine("Compare document failed.")
+        End If
+
+        document1.Release()
+        document2.Release()
+        Console.WriteLine("--------------------")
+
+        Dim document3 As CPDFDocument = CPDFDocument.InitWithFilePath("Text.pdf")
+        Dim document4 As CPDFDocument = CPDFDocument.InitWithFilePath("TextChanged.pdf")
+        If ContentCompareDocument(document3, document4) Then
+            Console.WriteLine("Compare document done.")
+        Else
+            Console.WriteLine("Compare document failed.")
+        End If
+
+        document3.Release()
+        document4.Release()
+        Console.WriteLine("--------------------")
+
+        Console.WriteLine("Done!")
+        Console.WriteLine("--------------------")
+        Console.ReadLine()
+    End Sub
+
+    Private Function OverlayCompareDocument(document1 As CPDFDocument, document2 As CPDFDocument) As Boolean
+        Dim compareOverlay As New CPDFCompareOverlay(document1, "1-5", document2, "1-5")
+        compareOverlay.Compare()
+        Dim comparisonDocument As CPDFDocument = compareOverlay.ComparisonDocument()
+        Dim path As String = outputPath & "\CompareDocumentTest.pdf"
+        If Not comparisonDocument.WriteToFilePath(path) Then
+            Return False
+        End If
+
+        Console.WriteLine("Browse the changed file in " & path)
+        Return True
+    End Function
+
+    Private Function ContentCompareDocument(document As CPDFDocument, documentNew As CPDFDocument) As Boolean
+        Dim compareContent As New CPDFCompareContent(document, documentNew)
+        Dim pageCount As Integer = Math.Min(document.PageCount, documentNew.PageCount)
+        For i As Integer = 0 To pageCount - 1
+            Console.WriteLine("Page: {0}", i)
+
+            Dim compareResults As CPDFCompareResults = compareContent.Compare(i, i, CPDFCompareType.CPDFCompareTypeAll, True)
+            Console.WriteLine("Replace count: {0}", compareResults.ReplaceCount)
+            Console.WriteLine("TextResults count: {0}", compareResults.TextResults.Count)
+            Console.WriteLine("Delete count: {0}", compareResults.DeleteCount)
+            Console.WriteLine("Insert count: {0}", compareResults.InsertCount)
+        Next
+
+        Return True
+    End Function
+End Module

+ 157 - 0
Demo/Examples/Samples/DocumentCompare/VB/DocumentCompareTest.vbproj

@@ -0,0 +1,157 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{F22C3E06-1B62-4516-AFC8-11F9B706206D}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <StartupObject>DocumentCompareTest.DocumentCompareTest</StartupObject>
+    <RootNamespace>DocumentCompareTest</RootNamespace>
+    <AssemblyName>Samples_ComPDFKit</AssemblyName>
+    <FileAlignment>512</FileAlignment>
+    <MyType>Console</MyType>
+    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <Deterministic>true</Deterministic>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <DefineDebug>true</DefineDebug>
+    <DefineTrace>true</DefineTrace>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DocumentationFile>Samples_ComPDFKit.xml</DocumentationFile>
+    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <DefineDebug>false</DefineDebug>
+    <DefineTrace>true</DefineTrace>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DocumentationFile>Samples_ComPDFKit.xml</DocumentationFile>
+    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
+  </PropertyGroup>
+  <PropertyGroup>
+    <OptionExplicit>On</OptionExplicit>
+  </PropertyGroup>
+  <PropertyGroup>
+    <OptionCompare>Binary</OptionCompare>
+  </PropertyGroup>
+  <PropertyGroup>
+    <OptionStrict>Off</OptionStrict>
+  </PropertyGroup>
+  <PropertyGroup>
+    <OptionInfer>On</OptionInfer>
+  </PropertyGroup>
+  <PropertyGroup>
+    <ApplicationIcon>ComPDFKit_Logo.ico</ApplicationIcon>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="ComPDFKit.Desk, Version=1.10.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\..\..\packages\ComPDFKit.NetFramework.1.10.0\lib\ComPDFKit.Desk.dll</HintPath>
+    </Reference>
+    <Reference Include="ComPDFKit.Viewer, Version=1.10.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\..\..\packages\ComPDFKit.NetFramework.1.10.0\lib\ComPDFKit.Viewer.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Deployment" />
+    <Reference Include="System.Xml" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="System.Net.Http" />
+  </ItemGroup>
+  <ItemGroup>
+    <Import Include="Microsoft.VisualBasic" />
+    <Import Include="System" />
+    <Import Include="System.Collections" />
+    <Import Include="System.Collections.Generic" />
+    <Import Include="System.Data" />
+    <Import Include="System.Diagnostics" />
+    <Import Include="System.Linq" />
+    <Import Include="System.Xml.Linq" />
+    <Import Include="System.Threading.Tasks" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="..\..\LicenseKey.vb">
+      <Link>LicenseKey.vb</Link>
+    </Compile>
+    <Compile Include="DocumentCompareTest.vb" />
+    <Compile Include="My Project\AssemblyInfo.vb" />
+    <Compile Include="My Project\Application.Designer.vb">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Application.myapp</DependentUpon>
+      <DesignTime>True</DesignTime>
+    </Compile>
+    <Compile Include="My Project\Resources.Designer.vb">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <Compile Include="My Project\Settings.Designer.vb">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Settings.settings</DependentUpon>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="My Project\Resources.resx">
+      <Generator>VbMyResourcesResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.vb</LastGenOutput>
+      <CustomToolNamespace>My.Resources</CustomToolNamespace>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\..\TestFile\ElectricalDiagram.pdf">
+      <Link>ElectricalDiagram.pdf</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="..\..\..\TestFile\ElectricalDiagram_New.pdf">
+      <Link>ElectricalDiagram_New.pdf</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="..\..\..\TestFile\Signed.pdf">
+      <Link>Signed.pdf</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="..\..\..\TestFile\Text.pdf">
+      <Link>Text.pdf</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="My Project\Application.myapp">
+      <Generator>MyApplicationCodeGenerator</Generator>
+      <LastGenOutput>Application.Designer.vb</LastGenOutput>
+    </None>
+    <None Include="My Project\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <CustomToolNamespace>My</CustomToolNamespace>
+      <LastGenOutput>Settings.Designer.vb</LastGenOutput>
+    </None>
+    <None Include="App.config" />
+    <None Include="packages.config" />
+    <None Include="TextChanged.pdf">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <Content Include="ComPDFKit_Logo.ico" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
+  <Import Project="..\..\..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets" Condition="Exists('..\..\..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets')" />
+  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+    <PropertyGroup>
+      <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.The missing file is {0}.</ErrorText>
+    </PropertyGroup>
+    <Error Condition="!Exists('..\..\..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets'))" />
+  </Target>
+</Project>

+ 13 - 0
Demo/Examples/Samples/DocumentCompare/VB/My Project/Application.Designer.vb

@@ -0,0 +1,13 @@
+'------------------------------------------------------------------------------
+' <auto-generated>
+'     此代码由工具生成。
+'     运行时版本:4.0.30319.42000
+'
+'     对此文件的更改可能会导致不正确的行为,并且如果
+'     重新生成代码,这些更改将会丢失。
+' </auto-generated>
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+

+ 10 - 0
Demo/Examples/Samples/DocumentCompare/VB/My Project/Application.myapp

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+  <MySubMain>false</MySubMain>
+  <SingleInstance>false</SingleInstance>
+  <ShutdownMode>0</ShutdownMode>
+  <EnableVisualStyles>true</EnableVisualStyles>
+  <AuthenticationMode>0</AuthenticationMode>
+  <ApplicationType>2</ApplicationType>
+  <SaveMySettingsOnExit>true</SaveMySettingsOnExit>
+</MyApplicationData>

+ 35 - 0
Demo/Examples/Samples/DocumentCompare/VB/My Project/AssemblyInfo.vb

@@ -0,0 +1,35 @@
+Imports System
+Imports System.Reflection
+Imports System.Runtime.InteropServices
+
+' 有关程序集的一般信息由以下
+' 控制。更改这些特性值可修改
+' 与程序集关联的信息。
+
+'查看程序集特性的值
+
+<Assembly: AssemblyTitle("VB")>
+<Assembly: AssemblyDescription("")>
+<Assembly: AssemblyCompany("")>
+<Assembly: AssemblyProduct("VB")>
+<Assembly: AssemblyCopyright("Copyright ©  2023")>
+<Assembly: AssemblyTrademark("")>
+
+<Assembly: ComVisible(False)>
+
+'如果此项目向 COM 公开,则下列 GUID 用于 typelib 的 ID
+<Assembly: Guid("5d6926d5-a122-4c79-8a86-76edea15983e")>
+
+' 程序集的版本信息由下列四个值组成: 
+'
+'      主版本
+'      次版本
+'      生成号
+'      修订号
+'
+'可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
+'通过使用 "*",如下所示:
+' <Assembly: AssemblyVersion("1.0.*")>
+
+<Assembly: AssemblyVersion("1.0.0.0")>
+<Assembly: AssemblyFileVersion("1.0.0.0")>

+ 63 - 0
Demo/Examples/Samples/DocumentCompare/VB/My Project/Resources.Designer.vb

@@ -0,0 +1,63 @@
+'------------------------------------------------------------------------------
+' <auto-generated>
+'     此代码由工具生成。
+'     运行时版本:4.0.30319.42000
+'
+'     对此文件的更改可能会导致不正确的行为,并且如果
+'     重新生成代码,这些更改将会丢失。
+' </auto-generated>
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
+Imports System
+
+Namespace My.Resources
+    
+    '此类是由 StronglyTypedResourceBuilder
+    '类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
+    '若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
+    '(以 /str 作为命令选项),或重新生成 VS 项目。
+    '''<summary>
+    '''  一个强类型的资源类,用于查找本地化的字符串等。
+    '''</summary>
+    <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0"),  _
+     Global.System.Diagnostics.DebuggerNonUserCodeAttribute(),  _
+     Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(),  _
+     Global.Microsoft.VisualBasic.HideModuleNameAttribute()>  _
+    Friend Module Resources
+        
+        Private resourceMan As Global.System.Resources.ResourceManager
+        
+        Private resourceCulture As Global.System.Globalization.CultureInfo
+        
+        '''<summary>
+        '''  返回此类使用的缓存的 ResourceManager 实例。
+        '''</summary>
+        <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)>  _
+        Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
+            Get
+                If Object.ReferenceEquals(resourceMan, Nothing) Then
+                    Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("DocumentCompareTest.Resources", GetType(Resources).Assembly)
+                    resourceMan = temp
+                End If
+                Return resourceMan
+            End Get
+        End Property
+        
+        '''<summary>
+        '''  重写当前线程的 CurrentUICulture 属性,对
+        '''  使用此强类型资源类的所有资源查找执行重写。
+        '''</summary>
+        <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)>  _
+        Friend Property Culture() As Global.System.Globalization.CultureInfo
+            Get
+                Return resourceCulture
+            End Get
+            Set
+                resourceCulture = value
+            End Set
+        End Property
+    End Module
+End Namespace

+ 117 - 0
Demo/Examples/Samples/DocumentCompare/VB/My Project/Resources.resx

@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 73 - 0
Demo/Examples/Samples/DocumentCompare/VB/My Project/Settings.Designer.vb

@@ -0,0 +1,73 @@
+'------------------------------------------------------------------------------
+' <auto-generated>
+'     此代码由工具生成。
+'     运行时版本:4.0.30319.42000
+'
+'     对此文件的更改可能会导致不正确的行为,并且如果
+'     重新生成代码,这些更改将会丢失。
+' </auto-generated>
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
+
+Namespace My
+    
+    <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(),  _
+     Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.6.0.0"),  _
+     Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)>  _
+    Partial Friend NotInheritable Class MySettings
+        Inherits Global.System.Configuration.ApplicationSettingsBase
+        
+        Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
+        
+#Region "My.Settings 自动保存功能"
+#If _MyType = "WindowsForms" Then
+    Private Shared addedHandler As Boolean
+
+    Private Shared addedHandlerLockObject As New Object
+
+    <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
+    Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
+        If My.Application.SaveMySettingsOnExit Then
+            My.Settings.Save()
+        End If
+    End Sub
+#End If
+#End Region
+        
+        Public Shared ReadOnly Property [Default]() As MySettings
+            Get
+                
+#If _MyType = "WindowsForms" Then
+               If Not addedHandler Then
+                    SyncLock addedHandlerLockObject
+                        If Not addedHandler Then
+                            AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
+                            addedHandler = True
+                        End If
+                    End SyncLock
+                End If
+#End If
+                Return defaultInstance
+            End Get
+        End Property
+    End Class
+End Namespace
+
+Namespace My
+    
+    <Global.Microsoft.VisualBasic.HideModuleNameAttribute(),  _
+     Global.System.Diagnostics.DebuggerNonUserCodeAttribute(),  _
+     Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()>  _
+    Friend Module MySettingsProperty
+        
+        <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")>  _
+        Friend ReadOnly Property Settings() As Global.DocumentCompareTest.My.MySettings
+            Get
+                Return Global.DocumentCompareTest.My.MySettings.Default
+            End Get
+        End Property
+    End Module
+End Namespace

+ 7 - 0
Demo/Examples/Samples/DocumentCompare/VB/My Project/Settings.settings

@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
+  <Profiles>
+    <Profile Name="(Default)" />
+  </Profiles>
+  <Settings />
+</SettingsFile>

BIN
Demo/Examples/Samples/DocumentCompare/VB/TextChanged.pdf


+ 4 - 0
Demo/Examples/Samples/DocumentCompare/VB/packages.config

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="ComPDFKit.NetFramework" version="1.10.0" targetFramework="net461" />
+</packages>

+ 6 - 0
Demo/Examples/Samples/DocumentInfoTest/VB/App.config

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+    <startup> 
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
+    </startup>
+</configuration>

BIN
Demo/Examples/Samples/DocumentInfoTest/VB/ComPDFKit_Logo.ico


+ 70 - 0
Demo/Examples/Samples/DocumentInfoTest/VB/DocumentInfoTest.vb

@@ -0,0 +1,70 @@
+Imports ComPDFKit.PDFDocument
+Imports System
+Imports System.IO
+
+Module DocumentInfoTest
+    Sub Main(args As String())
+        Console.WriteLine("Running DocumentInfo test sample..." & vbCrLf)
+        SDKLicenseHelper.LicenseVerify()
+
+        ' Sample 1: Print information
+        Dim document As CPDFDocument = CPDFDocument.InitWithFilePath("CommonFivePage.pdf")
+        PrintDocumentInfo(document)
+        Console.WriteLine("--------------------")
+
+        Console.WriteLine("Done.")
+        Console.WriteLine("--------------------")
+
+        Console.ReadLine()
+    End Sub
+
+    Public Function GetFileSize(filePath As String) As String
+        Dim fileInfo As FileInfo = Nothing
+        Try
+            fileInfo = New FileInfo(filePath)
+        Catch
+            Return "0B"
+        End Try
+
+        If fileInfo IsNot Nothing AndAlso fileInfo.Exists Then
+            Dim fileSize As Double = fileInfo.Length
+            If fileSize > 1024 Then
+                fileSize = Math.Round(fileSize / 1024, 2)
+                If fileSize > 1024 Then
+                    fileSize = Math.Round(fileSize / 1024, 2)
+                    If fileSize > 1024 Then
+                        fileSize = Math.Round(fileSize / 1024, 2)
+                        Return fileSize & " GB"
+                    Else
+                        Return fileSize & " MB"
+                    End If
+                Else
+                    Return fileSize & " KB"
+                End If
+            Else
+                Return fileSize & " B"
+            End If
+        End If
+
+        Return "0B"
+    End Function
+
+    Private Sub PrintDocumentInfo(document As CPDFDocument)
+        Console.WriteLine("File Name: {0}", document.FileName)
+        Console.WriteLine("File Size: {0}", GetFileSize(document.FilePath))
+        Console.WriteLine("Title: {0}", document.GetInfo().Title)
+        Console.WriteLine("Author: {0}", document.GetInfo().Author)
+        Console.WriteLine("Subject: {0}", document.GetInfo().Subject)
+        Console.WriteLine("Keywords: {0}", document.GetInfo().Keywords)
+        Console.WriteLine("Version: {0}", document.GetInfo().Version)
+        Console.WriteLine("Page Count: {0}", document.PageCount)
+        Console.WriteLine("Creator: {0}", document.GetInfo().Creator)
+        Console.WriteLine("Creation Data: {0}", document.GetInfo().CreationDate)
+        Console.WriteLine("Allows Printing: {0}", document.GetPermissionsInfo().AllowsPrinting)
+        Console.WriteLine("Allows Copying: {0}", document.GetPermissionsInfo().AllowsCopying)
+        Console.WriteLine("Allows Document Changes: {0}", document.GetPermissionsInfo().AllowsDocumentChanges)
+        Console.WriteLine("Allows Document Assembly: {0}", document.GetPermissionsInfo().AllowsDocumentAssembly)
+        Console.WriteLine("Allows Commenting: {0}", document.GetPermissionsInfo().AllowsCommenting)
+        Console.WriteLine("Allows FormField Entry: {0}", document.GetPermissionsInfo().AllowsFormFieldEntry)
+    End Sub
+End Module

+ 142 - 0
Demo/Examples/Samples/DocumentInfoTest/VB/DocumentInfoTest.vbproj

@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{9E6E96F8-C900-4374-A7A3-93481F733379}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <StartupObject>DocumentInfoTest.DocumentInfoTest</StartupObject>
+    <RootNamespace>DocumentInfoTest</RootNamespace>
+    <AssemblyName>Samples_ComPDFKit</AssemblyName>
+    <FileAlignment>512</FileAlignment>
+    <MyType>Console</MyType>
+    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <Deterministic>true</Deterministic>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <DefineDebug>true</DefineDebug>
+    <DefineTrace>true</DefineTrace>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DocumentationFile>Samples_ComPDFKit.xml</DocumentationFile>
+    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <DefineDebug>false</DefineDebug>
+    <DefineTrace>true</DefineTrace>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DocumentationFile>Samples_ComPDFKit.xml</DocumentationFile>
+    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
+  </PropertyGroup>
+  <PropertyGroup>
+    <OptionExplicit>On</OptionExplicit>
+  </PropertyGroup>
+  <PropertyGroup>
+    <OptionCompare>Binary</OptionCompare>
+  </PropertyGroup>
+  <PropertyGroup>
+    <OptionStrict>Off</OptionStrict>
+  </PropertyGroup>
+  <PropertyGroup>
+    <OptionInfer>On</OptionInfer>
+  </PropertyGroup>
+  <PropertyGroup>
+    <ApplicationIcon>ComPDFKit_Logo.ico</ApplicationIcon>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="ComPDFKit.Desk, Version=1.10.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\..\..\packages\ComPDFKit.NetFramework.1.10.0\lib\ComPDFKit.Desk.dll</HintPath>
+    </Reference>
+    <Reference Include="ComPDFKit.Viewer, Version=1.10.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\..\..\packages\ComPDFKit.NetFramework.1.10.0\lib\ComPDFKit.Viewer.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Deployment" />
+    <Reference Include="System.Xml" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="System.Net.Http" />
+  </ItemGroup>
+  <ItemGroup>
+    <Import Include="Microsoft.VisualBasic" />
+    <Import Include="System" />
+    <Import Include="System.Collections" />
+    <Import Include="System.Collections.Generic" />
+    <Import Include="System.Data" />
+    <Import Include="System.Diagnostics" />
+    <Import Include="System.Linq" />
+    <Import Include="System.Xml.Linq" />
+    <Import Include="System.Threading.Tasks" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="..\..\LicenseKey.vb">
+      <Link>LicenseKey.vb</Link>
+    </Compile>
+    <Compile Include="DocumentInfoTest.vb" />
+    <Compile Include="My Project\AssemblyInfo.vb" />
+    <Compile Include="My Project\Application.Designer.vb">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Application.myapp</DependentUpon>
+      <DesignTime>True</DesignTime>
+    </Compile>
+    <Compile Include="My Project\Resources.Designer.vb">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <Compile Include="My Project\Settings.Designer.vb">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Settings.settings</DependentUpon>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="My Project\Resources.resx">
+      <Generator>VbMyResourcesResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.vb</LastGenOutput>
+      <CustomToolNamespace>My.Resources</CustomToolNamespace>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\..\TestFile\CommonFivePage.pdf">
+      <Link>CommonFivePage.pdf</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="My Project\Application.myapp">
+      <Generator>MyApplicationCodeGenerator</Generator>
+      <LastGenOutput>Application.Designer.vb</LastGenOutput>
+    </None>
+    <None Include="My Project\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <CustomToolNamespace>My</CustomToolNamespace>
+      <LastGenOutput>Settings.Designer.vb</LastGenOutput>
+    </None>
+    <None Include="App.config" />
+    <None Include="packages.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <Content Include="ComPDFKit_Logo.ico" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
+  <Import Project="..\..\..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets" Condition="Exists('..\..\..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets')" />
+  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+    <PropertyGroup>
+      <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.The missing file is {0}.</ErrorText>
+    </PropertyGroup>
+    <Error Condition="!Exists('..\..\..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets'))" />
+  </Target>
+</Project>

+ 13 - 0
Demo/Examples/Samples/DocumentInfoTest/VB/My Project/Application.Designer.vb

@@ -0,0 +1,13 @@
+'------------------------------------------------------------------------------
+' <auto-generated>
+'     此代码由工具生成。
+'     运行时版本:4.0.30319.42000
+'
+'     对此文件的更改可能会导致不正确的行为,并且如果
+'     重新生成代码,这些更改将会丢失。
+' </auto-generated>
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+

+ 10 - 0
Demo/Examples/Samples/DocumentInfoTest/VB/My Project/Application.myapp

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+  <MySubMain>false</MySubMain>
+  <SingleInstance>false</SingleInstance>
+  <ShutdownMode>0</ShutdownMode>
+  <EnableVisualStyles>true</EnableVisualStyles>
+  <AuthenticationMode>0</AuthenticationMode>
+  <ApplicationType>2</ApplicationType>
+  <SaveMySettingsOnExit>true</SaveMySettingsOnExit>
+</MyApplicationData>

+ 35 - 0
Demo/Examples/Samples/DocumentInfoTest/VB/My Project/AssemblyInfo.vb

@@ -0,0 +1,35 @@
+Imports System
+Imports System.Reflection
+Imports System.Runtime.InteropServices
+
+' 有关程序集的一般信息由以下
+' 控制。更改这些特性值可修改
+' 与程序集关联的信息。
+
+'查看程序集特性的值
+
+<Assembly: AssemblyTitle("VB")>
+<Assembly: AssemblyDescription("")>
+<Assembly: AssemblyCompany("")>
+<Assembly: AssemblyProduct("VB")>
+<Assembly: AssemblyCopyright("Copyright ©  2023")>
+<Assembly: AssemblyTrademark("")>
+
+<Assembly: ComVisible(False)>
+
+'如果此项目向 COM 公开,则下列 GUID 用于 typelib 的 ID
+<Assembly: Guid("4578823b-efee-489c-be3c-301a5e5c9caf")>
+
+' 程序集的版本信息由下列四个值组成: 
+'
+'      主版本
+'      次版本
+'      生成号
+'      修订号
+'
+'可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
+'通过使用 "*",如下所示:
+' <Assembly: AssemblyVersion("1.0.*")>
+
+<Assembly: AssemblyVersion("1.0.0.0")>
+<Assembly: AssemblyFileVersion("1.0.0.0")>

+ 63 - 0
Demo/Examples/Samples/DocumentInfoTest/VB/My Project/Resources.Designer.vb

@@ -0,0 +1,63 @@
+'------------------------------------------------------------------------------
+' <auto-generated>
+'     此代码由工具生成。
+'     运行时版本:4.0.30319.42000
+'
+'     对此文件的更改可能会导致不正确的行为,并且如果
+'     重新生成代码,这些更改将会丢失。
+' </auto-generated>
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
+Imports System
+
+Namespace My.Resources
+    
+    '此类是由 StronglyTypedResourceBuilder
+    '类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
+    '若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
+    '(以 /str 作为命令选项),或重新生成 VS 项目。
+    '''<summary>
+    '''  一个强类型的资源类,用于查找本地化的字符串等。
+    '''</summary>
+    <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0"),  _
+     Global.System.Diagnostics.DebuggerNonUserCodeAttribute(),  _
+     Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(),  _
+     Global.Microsoft.VisualBasic.HideModuleNameAttribute()>  _
+    Friend Module Resources
+        
+        Private resourceMan As Global.System.Resources.ResourceManager
+        
+        Private resourceCulture As Global.System.Globalization.CultureInfo
+        
+        '''<summary>
+        '''  返回此类使用的缓存的 ResourceManager 实例。
+        '''</summary>
+        <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)>  _
+        Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
+            Get
+                If Object.ReferenceEquals(resourceMan, Nothing) Then
+                    Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("DocumentInfoTest.Resources", GetType(Resources).Assembly)
+                    resourceMan = temp
+                End If
+                Return resourceMan
+            End Get
+        End Property
+        
+        '''<summary>
+        '''  重写当前线程的 CurrentUICulture 属性,对
+        '''  使用此强类型资源类的所有资源查找执行重写。
+        '''</summary>
+        <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)>  _
+        Friend Property Culture() As Global.System.Globalization.CultureInfo
+            Get
+                Return resourceCulture
+            End Get
+            Set
+                resourceCulture = value
+            End Set
+        End Property
+    End Module
+End Namespace

+ 117 - 0
Demo/Examples/Samples/DocumentInfoTest/VB/My Project/Resources.resx

@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 73 - 0
Demo/Examples/Samples/DocumentInfoTest/VB/My Project/Settings.Designer.vb

@@ -0,0 +1,73 @@
+'------------------------------------------------------------------------------
+' <auto-generated>
+'     此代码由工具生成。
+'     运行时版本:4.0.30319.42000
+'
+'     对此文件的更改可能会导致不正确的行为,并且如果
+'     重新生成代码,这些更改将会丢失。
+' </auto-generated>
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
+
+Namespace My
+    
+    <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(),  _
+     Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.6.0.0"),  _
+     Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)>  _
+    Partial Friend NotInheritable Class MySettings
+        Inherits Global.System.Configuration.ApplicationSettingsBase
+        
+        Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
+        
+#Region "My.Settings 自动保存功能"
+#If _MyType = "WindowsForms" Then
+    Private Shared addedHandler As Boolean
+
+    Private Shared addedHandlerLockObject As New Object
+
+    <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
+    Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
+        If My.Application.SaveMySettingsOnExit Then
+            My.Settings.Save()
+        End If
+    End Sub
+#End If
+#End Region
+        
+        Public Shared ReadOnly Property [Default]() As MySettings
+            Get
+                
+#If _MyType = "WindowsForms" Then
+               If Not addedHandler Then
+                    SyncLock addedHandlerLockObject
+                        If Not addedHandler Then
+                            AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
+                            addedHandler = True
+                        End If
+                    End SyncLock
+                End If
+#End If
+                Return defaultInstance
+            End Get
+        End Property
+    End Class
+End Namespace
+
+Namespace My
+    
+    <Global.Microsoft.VisualBasic.HideModuleNameAttribute(),  _
+     Global.System.Diagnostics.DebuggerNonUserCodeAttribute(),  _
+     Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()>  _
+    Friend Module MySettingsProperty
+        
+        <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")>  _
+        Friend ReadOnly Property Settings() As Global.DocumentInfoTest.My.MySettings
+            Get
+                Return Global.DocumentInfoTest.My.MySettings.Default
+            End Get
+        End Property
+    End Module
+End Namespace

+ 7 - 0
Demo/Examples/Samples/DocumentInfoTest/VB/My Project/Settings.settings

@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
+  <Profiles>
+    <Profile Name="(Default)" />
+  </Profiles>
+  <Settings />
+</SettingsFile>

+ 4 - 0
Demo/Examples/Samples/DocumentInfoTest/VB/packages.config

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="ComPDFKit.NetFramework" version="1.10.0" targetFramework="net461" />
+</packages>

+ 1 - 1
Demo/Examples/Samples/EncryptTest/CS/EncryptTest.cs

@@ -10,7 +10,7 @@ namespace EncryptTest
 {
     internal class EncryptTest
     {
-        static private string outputPath = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory()))) + "\\Output\\Encrypt";
+        static private string outputPath = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory()))) + "\\Output\\CS";
         static private string userPassword = string.Empty;
         static private string ownerPassword = string.Empty;
 

+ 6 - 0
Demo/Examples/Samples/EncryptTest/VB/App.config

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+    <startup> 
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
+    </startup>
+</configuration>

BIN
Demo/Examples/Samples/EncryptTest/VB/ComPDFKit_Logo.ico


+ 314 - 0
Demo/Examples/Samples/EncryptTest/VB/EncryptTest.vb

@@ -0,0 +1,314 @@
+Imports ComPDFKit.PDFDocument
+Imports System
+Imports System.IO
+
+Module EncryptTest
+    Private outputPath As String = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory()))) & "\Output\VB"
+    Private userPassword As String = String.Empty
+    Private ownerPassword As String = String.Empty
+
+    Sub Main(args As String())
+        Console.WriteLine("Running Encrypt test sample..." & vbCrLf)
+        SDKLicenseHelper.LicenseVerify()
+
+        If Not Directory.Exists(outputPath) Then
+            Directory.CreateDirectory(outputPath)
+        End If
+
+        ' Encrypt by user password
+        Dim document As CPDFDocument = CPDFDocument.InitWithFilePath("CommonFivePage.pdf")
+
+        If EncryptByUserPassword(document) Then
+            Console.WriteLine("Encrypt by user password done.")
+        Else
+            Console.WriteLine("Encrypt by user password failed.")
+        End If
+
+        document.Release()
+        Console.WriteLine("--------------------")
+
+        ' Encrypt by owner password
+        document = CPDFDocument.InitWithFilePath("CommonFivePage.pdf")
+
+        If EncryptByOwnerPassword(document) Then
+            Console.WriteLine("Encrypt by owner password done.")
+        Else
+            Console.WriteLine("Encrypt by owner password failed.")
+        End If
+
+        document.Release()
+        Console.WriteLine("--------------------")
+
+        ' Encrypt by both user and owner passwords
+        document = CPDFDocument.InitWithFilePath("CommonFivePage.pdf")
+
+        If EncryptByAllPasswords(document) Then
+            Console.WriteLine("Encrypt by Both user and owner passwords done.")
+        Else
+            Console.WriteLine("Encrypt by Both user and owner passwords failed.")
+        End If
+
+        document.Release()
+        Console.WriteLine("--------------------")
+
+        ' Unlock
+        document = CPDFDocument.InitWithFilePath("AllPasswords.pdf")
+
+        If Unlock(document) Then
+            Console.WriteLine("Unlock done.")
+        Else
+            Console.WriteLine("Unlock failed.")
+        End If
+
+        document.Release()
+        Console.WriteLine("--------------------")
+
+        ' Decrypt
+        document = CPDFDocument.InitWithFilePath("AllPasswords.pdf")
+
+        If Decrypt(document) Then
+            Console.WriteLine("Decrypt done.")
+        Else
+            Console.WriteLine("Decrypt failed.")
+        End If
+
+        document.Release()
+        Console.WriteLine("--------------------")
+
+        Console.WriteLine("Done!")
+        Console.WriteLine("--------------------")
+        Console.ReadLine()
+    End Sub
+
+    Private Function EncryptUseRC4Algo(document As CPDFDocument, permissionsInfo As CPDFPermissionsInfo) As Boolean
+        Dim encryptionLevel As CPDFDocumentEncryptionLevel = CPDFDocumentEncryptionLevel.CPDFDocumentEncryptionLevelRC4
+        document.Encrypt(userPassword, ownerPassword, permissionsInfo, encryptionLevel)
+        Dim encryptPath As String = outputPath & "\EncryptUseRC4Test.pdf"
+
+        If Not document.WriteToFilePath(encryptPath) Then
+            Return False
+        End If
+
+        Dim encryptedDoc As CPDFDocument = CPDFDocument.InitWithFilePath(encryptPath)
+
+        If encryptedDoc.IsEncrypted Then
+            Console.WriteLine("File is encrypted")
+            Console.WriteLine("Browse the changed file in: " & encryptPath)
+            Console.WriteLine("User password is: {0}", userPassword)
+        Else
+            Console.WriteLine("File encrypt failed")
+            Return False
+        End If
+
+        Return True
+    End Function
+
+    Private Function EncryptUseAES128Algo(document As CPDFDocument, permissionsInfo As CPDFPermissionsInfo) As Boolean
+        Dim encryptionLevel As CPDFDocumentEncryptionLevel = CPDFDocumentEncryptionLevel.CPDFDocumentEncryptionLevelAES128
+        document.Encrypt(userPassword, ownerPassword, permissionsInfo, encryptionLevel)
+        Dim encryptPath As String = outputPath & "\EncryptUseAES128Test.pdf"
+
+        If Not document.WriteToFilePath(encryptPath) Then
+            Return False
+        End If
+
+        Dim encryptedDoc As CPDFDocument = CPDFDocument.InitWithFilePath(encryptPath)
+
+        If encryptedDoc.IsEncrypted Then
+            Console.WriteLine("File is encrypted")
+            Console.WriteLine("Browse the changed file in: " & encryptPath)
+            Console.WriteLine("User password is: {0}", userPassword)
+        Else
+            Console.WriteLine("File encrypt failed")
+            Return False
+        End If
+
+        Return True
+    End Function
+
+    Private Function EncryptUseAES256Algo(document As CPDFDocument, permissionsInfo As CPDFPermissionsInfo) As Boolean
+        Dim encryptionLevel As CPDFDocumentEncryptionLevel = CPDFDocumentEncryptionLevel.CPDFDocumentEncryptionLevelAES256
+        document.Encrypt(userPassword, ownerPassword, permissionsInfo, encryptionLevel)
+        Dim encryptPath As String = outputPath & "\EncryptUseAES256Test.pdf"
+
+        If Not document.WriteToFilePath(encryptPath) Then
+            Return False
+        End If
+
+        Dim encryptedDoc As CPDFDocument = CPDFDocument.InitWithFilePath(encryptPath)
+
+        If encryptedDoc.IsEncrypted Then
+            Console.WriteLine("File is encrypted")
+            Console.WriteLine("Browse the changed file in " & encryptPath)
+            Console.WriteLine("User password is: {0}", userPassword)
+        Else
+            Console.WriteLine("File encrypt failed")
+            Return False
+        End If
+
+        Return True
+    End Function
+
+    Private Function EncryptUseNoEncryptAlgo(document As CPDFDocument, permissionsInfo As CPDFPermissionsInfo) As Boolean
+        Dim encryptionLevel As CPDFDocumentEncryptionLevel = CPDFDocumentEncryptionLevel.CPDFDocumentEncryptionLevelNoEncryptAlgo
+        document.Encrypt(userPassword, ownerPassword, permissionsInfo, encryptionLevel)
+        Dim encryptPath As String = outputPath & "\EncryptUseNoEncryptAlgoTest.pdf"
+
+        If Not document.WriteToFilePath(encryptPath) Then
+            Return False
+        End If
+
+        Dim encryptedDoc As CPDFDocument = CPDFDocument.InitWithFilePath(encryptPath)
+
+        If encryptedDoc.IsEncrypted Then
+            Console.WriteLine("File is encrypted.")
+            Console.WriteLine("Browse the changed file in " & encryptPath)
+            Console.WriteLine("User password is: {0}", userPassword)
+        Else
+            Console.WriteLine("File encrypt failed")
+            Return False
+        End If
+
+        Return True
+    End Function
+
+    Private Function EncryptByUserPassword(document As CPDFDocument) As Boolean
+        Dim result As Boolean = True
+        userPassword = "User"
+        ownerPassword = String.Empty
+        Dim permissionsInfo As New CPDFPermissionsInfo()
+
+        If EncryptUseRC4Algo(document, permissionsInfo) Then
+            Console.WriteLine("RC4 encrypt done." & vbCrLf)
+        Else
+            Console.WriteLine("RC4 encrypt failed." & vbCrLf)
+            result = False
+        End If
+
+        If EncryptUseAES128Algo(document, permissionsInfo) Then
+            Console.WriteLine("AES128 encrypt done." & vbCrLf)
+        Else
+            Console.WriteLine("AES128 encrypt failed." & vbCrLf)
+            result = False
+        End If
+
+        If EncryptUseAES256Algo(document, permissionsInfo) Then
+            Console.WriteLine("AES256 encrypt done." & vbCrLf)
+        Else
+            Console.WriteLine("AES256 encrypt failed." & vbCrLf)
+            result = False
+        End If
+
+        If EncryptUseNoEncryptAlgo(document, permissionsInfo) Then
+            Console.WriteLine("NoEncryptAlgo encrypt done." & vbCrLf)
+        Else
+            Console.WriteLine("NoEncryptAlgo encrypt failed." & vbCrLf)
+            result = False
+        End If
+
+        Return result
+    End Function
+
+    Private Function EncryptByOwnerPassword(document As CPDFDocument) As Boolean
+        userPassword = Nothing
+        ownerPassword = "Owner"
+        Dim permissionsInfo As New CPDFPermissionsInfo()
+        permissionsInfo.AllowsPrinting = False
+        permissionsInfo.AllowsCopying = False
+        Dim encryptionLevel As CPDFDocumentEncryptionLevel = CPDFDocumentEncryptionLevel.CPDFDocumentEncryptionLevelRC4
+        document.Encrypt(userPassword, ownerPassword, permissionsInfo, encryptionLevel)
+        Dim encryptPath As String = outputPath & "\EncryptByOwnerPasswordTest.pdf"
+
+        If Not document.WriteToFilePath(encryptPath) Then
+            Return False
+        End If
+
+        Dim encryptedDoc As CPDFDocument = CPDFDocument.InitWithFilePath(encryptPath)
+
+        If encryptedDoc.IsEncrypted Then
+            Console.WriteLine("File is encrypted.")
+            Console.WriteLine("Browse the changed file in " & encryptPath)
+            Console.WriteLine("Owner password is: {0}", ownerPassword)
+        Else
+            Console.WriteLine("File encrypt failed")
+            Return False
+        End If
+
+        Return True
+    End Function
+
+    Private Function EncryptByAllPasswords(document As CPDFDocument) As Boolean
+        userPassword = "User"
+        ownerPassword = "Owner"
+        Dim permissionsInfo As New CPDFPermissionsInfo()
+        permissionsInfo.AllowsPrinting = False
+        permissionsInfo.AllowsCopying = False
+        Dim encryptionLevel As CPDFDocumentEncryptionLevel = CPDFDocumentEncryptionLevel.CPDFDocumentEncryptionLevelRC4
+        document.Encrypt(userPassword, ownerPassword, permissionsInfo, encryptionLevel)
+        Dim encryptPath As String = outputPath & "\EncryptByAllPasswordsTest.pdf"
+
+        If Not document.WriteToFilePath(encryptPath) Then
+            Return False
+        End If
+
+        Dim encryptedDoc As CPDFDocument = CPDFDocument.InitWithFilePath(encryptPath)
+
+        If encryptedDoc.IsEncrypted Then
+            Console.WriteLine("File is encrypted.")
+            Console.WriteLine("Browse the changed file in " & encryptPath)
+            Console.WriteLine("User password is: {0}", userPassword)
+            Console.WriteLine("Owner password is: {0}", ownerPassword)
+        Else
+            Console.WriteLine("File encrypt failed")
+            Return False
+        End If
+
+        Return True
+    End Function
+
+    Private Sub PrintPermissionsInfo(permissionsInfo As CPDFPermissionsInfo)
+        Console.Write("AllowsPrinting: ")
+        Console.Write(If(permissionsInfo.AllowsPrinting = True, "Yes" & vbCrLf, "No" & vbCrLf))
+        Console.Write("AllowsCopying: ")
+        Console.Write(If(permissionsInfo.AllowsCopying = True, "Yes" & vbCrLf, "No" & vbCrLf))
+    End Sub
+
+    Private Function Unlock(document As CPDFDocument) As Boolean
+        userPassword = "User"
+        ownerPassword = "Owner"
+
+        If document.IsLocked Then
+            Console.WriteLine("Document is locked")
+        End If
+
+        PrintPermissionsInfo(document.GetPermissionsInfo())
+
+        Console.WriteLine("Unlock with owner password")
+        document.CheckOwnerPassword("123")
+
+        PrintPermissionsInfo(document.GetPermissionsInfo())
+
+        Return True
+    End Function
+
+    Private Function Decrypt(document As CPDFDocument) As Boolean
+        userPassword = "User"
+        ownerPassword = "Owner"
+        Dim decryptPath As String = outputPath & "\DecryptTest.pdf"
+        document.UnlockWithPassword(userPassword)
+
+        If Not document.Decrypt(decryptPath) Then
+            Return False
+        End If
+
+        Dim decryptDocument As CPDFDocument = CPDFDocument.InitWithFilePath(decryptPath)
+
+        If decryptDocument.IsEncrypted Then
+            Return False
+        Else
+            Console.WriteLine("Document decrypt done.")
+        End If
+
+        Return True
+    End Function
+End Module

+ 146 - 0
Demo/Examples/Samples/EncryptTest/VB/EncryptTest.vbproj

@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{36760764-DC79-4857-8500-9BD7CF77101E}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <StartupObject>EncryptTest.EncryptTest</StartupObject>
+    <RootNamespace>EncryptTest</RootNamespace>
+    <AssemblyName>Samples_ComPDFKit</AssemblyName>
+    <FileAlignment>512</FileAlignment>
+    <MyType>Console</MyType>
+    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <Deterministic>true</Deterministic>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <DefineDebug>true</DefineDebug>
+    <DefineTrace>true</DefineTrace>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DocumentationFile>Samples_ComPDFKit.xml</DocumentationFile>
+    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <DefineDebug>false</DefineDebug>
+    <DefineTrace>true</DefineTrace>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DocumentationFile>Samples_ComPDFKit.xml</DocumentationFile>
+    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
+  </PropertyGroup>
+  <PropertyGroup>
+    <OptionExplicit>On</OptionExplicit>
+  </PropertyGroup>
+  <PropertyGroup>
+    <OptionCompare>Binary</OptionCompare>
+  </PropertyGroup>
+  <PropertyGroup>
+    <OptionStrict>Off</OptionStrict>
+  </PropertyGroup>
+  <PropertyGroup>
+    <OptionInfer>On</OptionInfer>
+  </PropertyGroup>
+  <PropertyGroup>
+    <ApplicationIcon>ComPDFKit_Logo.ico</ApplicationIcon>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="ComPDFKit.Desk, Version=1.10.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\..\..\packages\ComPDFKit.NetFramework.1.10.0\lib\ComPDFKit.Desk.dll</HintPath>
+    </Reference>
+    <Reference Include="ComPDFKit.Viewer, Version=1.10.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\..\..\packages\ComPDFKit.NetFramework.1.10.0\lib\ComPDFKit.Viewer.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Deployment" />
+    <Reference Include="System.Xml" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="System.Net.Http" />
+  </ItemGroup>
+  <ItemGroup>
+    <Import Include="Microsoft.VisualBasic" />
+    <Import Include="System" />
+    <Import Include="System.Collections" />
+    <Import Include="System.Collections.Generic" />
+    <Import Include="System.Data" />
+    <Import Include="System.Diagnostics" />
+    <Import Include="System.Linq" />
+    <Import Include="System.Xml.Linq" />
+    <Import Include="System.Threading.Tasks" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="..\..\LicenseKey.vb">
+      <Link>LicenseKey.vb</Link>
+    </Compile>
+    <Compile Include="EncryptTest.vb" />
+    <Compile Include="My Project\AssemblyInfo.vb" />
+    <Compile Include="My Project\Application.Designer.vb">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Application.myapp</DependentUpon>
+      <DesignTime>True</DesignTime>
+    </Compile>
+    <Compile Include="My Project\Resources.Designer.vb">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <Compile Include="My Project\Settings.Designer.vb">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Settings.settings</DependentUpon>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="My Project\Resources.resx">
+      <Generator>VbMyResourcesResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.vb</LastGenOutput>
+      <CustomToolNamespace>My.Resources</CustomToolNamespace>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\..\TestFile\AllPasswords.pdf">
+      <Link>AllPasswords.pdf</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="..\..\..\TestFile\CommonFivePage.pdf">
+      <Link>CommonFivePage.pdf</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="My Project\Application.myapp">
+      <Generator>MyApplicationCodeGenerator</Generator>
+      <LastGenOutput>Application.Designer.vb</LastGenOutput>
+    </None>
+    <None Include="My Project\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <CustomToolNamespace>My</CustomToolNamespace>
+      <LastGenOutput>Settings.Designer.vb</LastGenOutput>
+    </None>
+    <None Include="App.config" />
+    <None Include="packages.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <Content Include="ComPDFKit_Logo.ico" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
+  <Import Project="..\..\..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets" Condition="Exists('..\..\..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets')" />
+  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+    <PropertyGroup>
+      <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.The missing file is {0}.</ErrorText>
+    </PropertyGroup>
+    <Error Condition="!Exists('..\..\..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets'))" />
+  </Target>
+</Project>

+ 13 - 0
Demo/Examples/Samples/EncryptTest/VB/My Project/Application.Designer.vb

@@ -0,0 +1,13 @@
+'------------------------------------------------------------------------------
+' <auto-generated>
+'     此代码由工具生成。
+'     运行时版本:4.0.30319.42000
+'
+'     对此文件的更改可能会导致不正确的行为,并且如果
+'     重新生成代码,这些更改将会丢失。
+' </auto-generated>
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+

+ 10 - 0
Demo/Examples/Samples/EncryptTest/VB/My Project/Application.myapp

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+  <MySubMain>false</MySubMain>
+  <SingleInstance>false</SingleInstance>
+  <ShutdownMode>0</ShutdownMode>
+  <EnableVisualStyles>true</EnableVisualStyles>
+  <AuthenticationMode>0</AuthenticationMode>
+  <ApplicationType>2</ApplicationType>
+  <SaveMySettingsOnExit>true</SaveMySettingsOnExit>
+</MyApplicationData>

+ 35 - 0
Demo/Examples/Samples/EncryptTest/VB/My Project/AssemblyInfo.vb

@@ -0,0 +1,35 @@
+Imports System
+Imports System.Reflection
+Imports System.Runtime.InteropServices
+
+' 有关程序集的一般信息由以下
+' 控制。更改这些特性值可修改
+' 与程序集关联的信息。
+
+'查看程序集特性的值
+
+<Assembly: AssemblyTitle("VB")>
+<Assembly: AssemblyDescription("")>
+<Assembly: AssemblyCompany("")>
+<Assembly: AssemblyProduct("VB")>
+<Assembly: AssemblyCopyright("Copyright ©  2023")>
+<Assembly: AssemblyTrademark("")>
+
+<Assembly: ComVisible(False)>
+
+'如果此项目向 COM 公开,则下列 GUID 用于 typelib 的 ID
+<Assembly: Guid("73fbbabc-5294-42cd-b6c1-47e4a3a7fe64")>
+
+' 程序集的版本信息由下列四个值组成: 
+'
+'      主版本
+'      次版本
+'      生成号
+'      修订号
+'
+'可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
+'通过使用 "*",如下所示:
+' <Assembly: AssemblyVersion("1.0.*")>
+
+<Assembly: AssemblyVersion("1.0.0.0")>
+<Assembly: AssemblyFileVersion("1.0.0.0")>

+ 63 - 0
Demo/Examples/Samples/EncryptTest/VB/My Project/Resources.Designer.vb

@@ -0,0 +1,63 @@
+'------------------------------------------------------------------------------
+' <auto-generated>
+'     此代码由工具生成。
+'     运行时版本:4.0.30319.42000
+'
+'     对此文件的更改可能会导致不正确的行为,并且如果
+'     重新生成代码,这些更改将会丢失。
+' </auto-generated>
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
+Imports System
+
+Namespace My.Resources
+    
+    '此类是由 StronglyTypedResourceBuilder
+    '类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
+    '若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
+    '(以 /str 作为命令选项),或重新生成 VS 项目。
+    '''<summary>
+    '''  一个强类型的资源类,用于查找本地化的字符串等。
+    '''</summary>
+    <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0"),  _
+     Global.System.Diagnostics.DebuggerNonUserCodeAttribute(),  _
+     Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(),  _
+     Global.Microsoft.VisualBasic.HideModuleNameAttribute()>  _
+    Friend Module Resources
+        
+        Private resourceMan As Global.System.Resources.ResourceManager
+        
+        Private resourceCulture As Global.System.Globalization.CultureInfo
+        
+        '''<summary>
+        '''  返回此类使用的缓存的 ResourceManager 实例。
+        '''</summary>
+        <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)>  _
+        Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
+            Get
+                If Object.ReferenceEquals(resourceMan, Nothing) Then
+                    Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("EncryptTest.Resources", GetType(Resources).Assembly)
+                    resourceMan = temp
+                End If
+                Return resourceMan
+            End Get
+        End Property
+        
+        '''<summary>
+        '''  重写当前线程的 CurrentUICulture 属性,对
+        '''  使用此强类型资源类的所有资源查找执行重写。
+        '''</summary>
+        <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)>  _
+        Friend Property Culture() As Global.System.Globalization.CultureInfo
+            Get
+                Return resourceCulture
+            End Get
+            Set
+                resourceCulture = value
+            End Set
+        End Property
+    End Module
+End Namespace

+ 117 - 0
Demo/Examples/Samples/EncryptTest/VB/My Project/Resources.resx

@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 73 - 0
Demo/Examples/Samples/EncryptTest/VB/My Project/Settings.Designer.vb

@@ -0,0 +1,73 @@
+'------------------------------------------------------------------------------
+' <auto-generated>
+'     此代码由工具生成。
+'     运行时版本:4.0.30319.42000
+'
+'     对此文件的更改可能会导致不正确的行为,并且如果
+'     重新生成代码,这些更改将会丢失。
+' </auto-generated>
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
+
+Namespace My
+    
+    <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(),  _
+     Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.6.0.0"),  _
+     Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)>  _
+    Partial Friend NotInheritable Class MySettings
+        Inherits Global.System.Configuration.ApplicationSettingsBase
+        
+        Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
+        
+#Region "My.Settings 自动保存功能"
+#If _MyType = "WindowsForms" Then
+    Private Shared addedHandler As Boolean
+
+    Private Shared addedHandlerLockObject As New Object
+
+    <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
+    Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
+        If My.Application.SaveMySettingsOnExit Then
+            My.Settings.Save()
+        End If
+    End Sub
+#End If
+#End Region
+        
+        Public Shared ReadOnly Property [Default]() As MySettings
+            Get
+                
+#If _MyType = "WindowsForms" Then
+               If Not addedHandler Then
+                    SyncLock addedHandlerLockObject
+                        If Not addedHandler Then
+                            AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
+                            addedHandler = True
+                        End If
+                    End SyncLock
+                End If
+#End If
+                Return defaultInstance
+            End Get
+        End Property
+    End Class
+End Namespace
+
+Namespace My
+    
+    <Global.Microsoft.VisualBasic.HideModuleNameAttribute(),  _
+     Global.System.Diagnostics.DebuggerNonUserCodeAttribute(),  _
+     Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()>  _
+    Friend Module MySettingsProperty
+        
+        <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")>  _
+        Friend ReadOnly Property Settings() As Global.EncryptTest.My.MySettings
+            Get
+                Return Global.EncryptTest.My.MySettings.Default
+            End Get
+        End Property
+    End Module
+End Namespace

+ 7 - 0
Demo/Examples/Samples/EncryptTest/VB/My Project/Settings.settings

@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
+  <Profiles>
+    <Profile Name="(Default)" />
+  </Profiles>
+  <Settings />
+</SettingsFile>

+ 4 - 0
Demo/Examples/Samples/EncryptTest/VB/packages.config

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="ComPDFKit.NetFramework" version="1.10.0" targetFramework="net461" />
+</packages>

+ 1 - 1
Demo/Examples/Samples/FlattenTest/CS/FlattenTest.cs

@@ -7,7 +7,7 @@ namespace FlattenTest
 {
     internal class FlattenTest
     {
-        static private string outputPath = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory()))) + "\\Output\\Flatten";
+        static private string outputPath = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory()))) + "\\Output\\CS";
         static void Main(string[] args)
         {
             #region Perparation work

+ 6 - 0
Demo/Examples/Samples/FlattenTest/VB/App.config

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+    <startup> 
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
+    </startup>
+</configuration>

BIN
Demo/Examples/Samples/FlattenTest/VB/ComPDFKit_Logo.ico


+ 65 - 0
Demo/Examples/Samples/FlattenTest/VB/FlattenTest.vb

@@ -0,0 +1,65 @@
+Imports ComPDFKit.PDFDocument
+Imports ComPDFKit.PDFPage
+Imports System
+Imports System.IO
+
+Module FlattenTest
+    Private outputPath As String = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory()))) & "\Output\VB"
+    Sub Main(args As String())
+        Console.WriteLine("Running Flatten test sample..." & vbCrLf)
+        SDKLicenseHelper.LicenseVerify()
+        If Not Directory.Exists(outputPath) Then
+            Directory.CreateDirectory(outputPath)
+        End If
+
+        ' Flatten
+        Dim document As CPDFDocument = CPDFDocument.InitWithFilePath("Annotations.pdf")
+
+        If Flatten(document) Then
+            Console.WriteLine("Flatten done.")
+        Else
+            Console.WriteLine("Flatten failed.")
+        End If
+
+        Console.WriteLine("--------------------")
+        document.Release()
+
+        Console.WriteLine("Done")
+        Console.WriteLine("--------------------")
+        Console.ReadLine()
+    End Sub
+
+    ' Flatten documentation with comments
+    Private Function Flatten(document As CPDFDocument) As Boolean
+        Dim annotationCount As Integer = 0
+        For i As Integer = 0 To document.PageCount - 1
+            Dim page As CPDFPage = document.PageAtIndex(i)
+            annotationCount += page.GetAnnotCount()
+        Next
+
+        Console.Write("{0} annotations in the file. ", annotationCount)
+        Dim flattenPath As String = outputPath & "\FlattenTest.pdf"
+
+        If Not document.WriteFlattenToFilePath(flattenPath) Then
+            Return False
+        End If
+
+        Console.WriteLine("Browse the changed file in " & flattenPath)
+
+        ' Verify: Check if the number of comments in the new document is 0
+        Dim flattenDocument As CPDFDocument = CPDFDocument.InitWithFilePath(flattenPath)
+        Dim newCount As Integer = 0
+        For i As Integer = 0 To flattenDocument.PageCount - 1
+            Dim page As CPDFPage = flattenDocument.PageAtIndex(i)
+            newCount += page.GetAnnotCount()
+        Next
+
+        Console.WriteLine("{0} annotations in the new file. ", newCount)
+
+        If Not (newCount = 0) Then
+            Return False
+        End If
+
+        Return True
+    End Function
+End Module

+ 141 - 0
Demo/Examples/Samples/FlattenTest/VB/FlattenTest.vbproj

@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{BB1E309D-A937-4E41-B8A3-C2F52AE509CD}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <StartupObject>VB.FlattenTest</StartupObject>
+    <RootNamespace>VB</RootNamespace>
+    <AssemblyName>Samples_ComPDFKit</AssemblyName>
+    <FileAlignment>512</FileAlignment>
+    <MyType>Console</MyType>
+    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <Deterministic>true</Deterministic>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <DefineDebug>true</DefineDebug>
+    <DefineTrace>true</DefineTrace>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DocumentationFile>Samples_ComPDFKit.xml</DocumentationFile>
+    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <DefineDebug>false</DefineDebug>
+    <DefineTrace>true</DefineTrace>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DocumentationFile>Samples_ComPDFKit.xml</DocumentationFile>
+    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
+  </PropertyGroup>
+  <PropertyGroup>
+    <OptionExplicit>On</OptionExplicit>
+  </PropertyGroup>
+  <PropertyGroup>
+    <OptionCompare>Binary</OptionCompare>
+  </PropertyGroup>
+  <PropertyGroup>
+    <OptionStrict>Off</OptionStrict>
+  </PropertyGroup>
+  <PropertyGroup>
+    <OptionInfer>On</OptionInfer>
+  </PropertyGroup>
+  <PropertyGroup>
+    <ApplicationIcon>ComPDFKit_Logo.ico</ApplicationIcon>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="ComPDFKit.Desk, Version=1.10.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\..\..\packages\ComPDFKit.NetFramework.1.10.0\lib\ComPDFKit.Desk.dll</HintPath>
+    </Reference>
+    <Reference Include="ComPDFKit.Viewer, Version=1.10.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\..\..\packages\ComPDFKit.NetFramework.1.10.0\lib\ComPDFKit.Viewer.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Deployment" />
+    <Reference Include="System.Xml" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="System.Net.Http" />
+  </ItemGroup>
+  <ItemGroup>
+    <Import Include="Microsoft.VisualBasic" />
+    <Import Include="System" />
+    <Import Include="System.Collections" />
+    <Import Include="System.Collections.Generic" />
+    <Import Include="System.Data" />
+    <Import Include="System.Diagnostics" />
+    <Import Include="System.Linq" />
+    <Import Include="System.Xml.Linq" />
+    <Import Include="System.Threading.Tasks" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="..\..\LicenseKey.vb">
+      <Link>LicenseKey.vb</Link>
+    </Compile>
+    <Compile Include="FlattenTest.vb" />
+    <Compile Include="My Project\AssemblyInfo.vb" />
+    <Compile Include="My Project\Application.Designer.vb">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Application.myapp</DependentUpon>
+    </Compile>
+    <Compile Include="My Project\Resources.Designer.vb">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <Compile Include="My Project\Settings.Designer.vb">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Settings.settings</DependentUpon>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="My Project\Resources.resx">
+      <Generator>VbMyResourcesResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.vb</LastGenOutput>
+      <CustomToolNamespace>My.Resources</CustomToolNamespace>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\..\TestFile\Annotations.pdf">
+      <Link>Annotations.pdf</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="My Project\Application.myapp">
+      <Generator>MyApplicationCodeGenerator</Generator>
+      <LastGenOutput>Application.Designer.vb</LastGenOutput>
+    </None>
+    <None Include="My Project\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <CustomToolNamespace>My</CustomToolNamespace>
+      <LastGenOutput>Settings.Designer.vb</LastGenOutput>
+    </None>
+    <None Include="App.config" />
+    <None Include="packages.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <Content Include="ComPDFKit_Logo.ico" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
+  <Import Project="..\..\..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets" Condition="Exists('..\..\..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets')" />
+  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+    <PropertyGroup>
+      <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.The missing file is {0}.</ErrorText>
+    </PropertyGroup>
+    <Error Condition="!Exists('..\..\..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets'))" />
+  </Target>
+</Project>

+ 13 - 0
Demo/Examples/Samples/FlattenTest/VB/My Project/Application.Designer.vb

@@ -0,0 +1,13 @@
+'------------------------------------------------------------------------------
+' <auto-generated>
+'     This code was generated by a tool.
+'     Runtime Version:4.0.30319.42000
+'
+'     Changes to this file may cause incorrect behavior and will be lost if
+'     the code is regenerated.
+' </auto-generated>
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+

+ 10 - 0
Demo/Examples/Samples/FlattenTest/VB/My Project/Application.myapp

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+  <MySubMain>false</MySubMain>
+  <SingleInstance>false</SingleInstance>
+  <ShutdownMode>0</ShutdownMode>
+  <EnableVisualStyles>true</EnableVisualStyles>
+  <AuthenticationMode>0</AuthenticationMode>
+  <ApplicationType>2</ApplicationType>
+  <SaveMySettingsOnExit>true</SaveMySettingsOnExit>
+</MyApplicationData>

+ 35 - 0
Demo/Examples/Samples/FlattenTest/VB/My Project/AssemblyInfo.vb

@@ -0,0 +1,35 @@
+Imports System
+Imports System.Reflection
+Imports System.Runtime.InteropServices
+
+' 有关程序集的一般信息由以下
+' 控制。更改这些特性值可修改
+' 与程序集关联的信息。
+
+'查看程序集特性的值
+
+<Assembly: AssemblyTitle("VB")>
+<Assembly: AssemblyDescription("")>
+<Assembly: AssemblyCompany("")>
+<Assembly: AssemblyProduct("VB")>
+<Assembly: AssemblyCopyright("Copyright ©  2023")>
+<Assembly: AssemblyTrademark("")>
+
+<Assembly: ComVisible(False)>
+
+'如果此项目向 COM 公开,则下列 GUID 用于 typelib 的 ID
+<Assembly: Guid("151c55d6-df63-4cec-86d0-9adcddeb73b7")>
+
+' 程序集的版本信息由下列四个值组成: 
+'
+'      主版本
+'      次版本
+'      生成号
+'      修订号
+'
+'可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
+'通过使用 "*",如下所示:
+' <Assembly: AssemblyVersion("1.0.*")>
+
+<Assembly: AssemblyVersion("1.0.0.0")>
+<Assembly: AssemblyFileVersion("1.0.0.0")>

+ 62 - 0
Demo/Examples/Samples/FlattenTest/VB/My Project/Resources.Designer.vb

@@ -0,0 +1,62 @@
+'------------------------------------------------------------------------------
+' <auto-generated>
+'     This code was generated by a tool.
+'     Runtime Version:4.0.30319.42000
+'
+'     Changes to this file may cause incorrect behavior and will be lost if
+'     the code is regenerated.
+' </auto-generated>
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
+
+Namespace My.Resources
+
+    'This class was auto-generated by the StronglyTypedResourceBuilder
+    'class via a tool like ResGen or Visual Studio.
+    'To add or remove a member, edit your .ResX file then rerun ResGen
+    'with the /str option, or rebuild your VS project.
+    '''<summary>
+    '''  A strongly-typed resource class, for looking up localized strings, etc.
+    '''</summary>
+    <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
+     Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
+     Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
+     Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
+    Friend Module Resources
+
+        Private resourceMan As Global.System.Resources.ResourceManager
+
+        Private resourceCulture As Global.System.Globalization.CultureInfo
+
+        '''<summary>
+        '''  Returns the cached ResourceManager instance used by this class.
+        '''</summary>
+        <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
+        Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
+            Get
+                If Object.ReferenceEquals(resourceMan, Nothing) Then
+                    Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("VB.Resources", GetType(Resources).Assembly)
+                    resourceMan = temp
+                End If
+                Return resourceMan
+            End Get
+        End Property
+
+        '''<summary>
+        '''  Overrides the current thread's CurrentUICulture property for all
+        '''  resource lookups using this strongly typed resource class.
+        '''</summary>
+        <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
+        Friend Property Culture() As Global.System.Globalization.CultureInfo
+            Get
+                Return resourceCulture
+            End Get
+            Set(ByVal value As Global.System.Globalization.CultureInfo)
+                resourceCulture = value
+            End Set
+        End Property
+    End Module
+End Namespace

+ 117 - 0
Demo/Examples/Samples/FlattenTest/VB/My Project/Resources.resx

@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 73 - 0
Demo/Examples/Samples/FlattenTest/VB/My Project/Settings.Designer.vb

@@ -0,0 +1,73 @@
+'------------------------------------------------------------------------------
+' <auto-generated>
+'     This code was generated by a tool.
+'     Runtime Version:4.0.30319.42000
+'
+'     Changes to this file may cause incorrect behavior and will be lost if
+'     the code is regenerated.
+' </auto-generated>
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
+
+Namespace My
+
+    <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
+     Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _
+     Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
+    Partial Friend NotInheritable Class MySettings
+        Inherits Global.System.Configuration.ApplicationSettingsBase
+
+        Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings)
+
+#Region "My.Settings Auto-Save Functionality"
+#If _MyType = "WindowsForms" Then
+        Private Shared addedHandler As Boolean
+
+        Private Shared addedHandlerLockObject As New Object
+
+        <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
+        Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
+            If My.Application.SaveMySettingsOnExit Then
+                My.Settings.Save()
+            End If
+        End Sub
+#End If
+#End Region
+
+        Public Shared ReadOnly Property [Default]() As MySettings
+            Get
+
+#If _MyType = "WindowsForms" Then
+                   If Not addedHandler Then
+                        SyncLock addedHandlerLockObject
+                            If Not addedHandler Then
+                                AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
+                                addedHandler = True
+                            End If
+                        End SyncLock
+                    End If
+#End If
+                Return defaultInstance
+            End Get
+        End Property
+    End Class
+End Namespace
+
+Namespace My
+
+    <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
+     Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
+     Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
+    Friend Module MySettingsProperty
+
+        <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
+        Friend ReadOnly Property Settings() As Global.VB.My.MySettings
+            Get
+                Return Global.VB.My.MySettings.Default
+            End Get
+        End Property
+    End Module
+End Namespace

+ 7 - 0
Demo/Examples/Samples/FlattenTest/VB/My Project/Settings.settings

@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
+  <Profiles>
+    <Profile Name="(Default)" />
+  </Profiles>
+  <Settings />
+</SettingsFile>

+ 4 - 0
Demo/Examples/Samples/FlattenTest/VB/packages.config

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="ComPDFKit.NetFramework" version="1.10.0" targetFramework="net461" />
+</packages>

+ 1 - 1
Demo/Examples/Samples/HeaderFooterTest/CS/HeaderFooterTest.cs

@@ -7,7 +7,7 @@ namespace HeaderFooterTest
 {
     internal class HeaderFooterTest
     {
-        private static string outputPath = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory()))) + "\\Output\\HeaderFooter";
+        private static string outputPath = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory()))) + "\\Output\\CS";
 
         private static Dictionary<int, string> IntToLocationDic = new Dictionary<int, string>()
         {

+ 6 - 0
Demo/Examples/Samples/HeaderFooterTest/VB/App.config

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+    <startup> 
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
+    </startup>
+</configuration>

BIN
Demo/Examples/Samples/HeaderFooterTest/VB/ComPDFKit_Logo.ico


+ 164 - 0
Demo/Examples/Samples/HeaderFooterTest/VB/HeaderFooterTest.vb

@@ -0,0 +1,164 @@
+Imports ComPDFKit.PDFDocument
+Imports System
+Imports System.IO
+Imports System.Collections.Generic
+
+Module HeaderFooterTest
+    Private outputPath As String = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory()))) & "\Output\VB"
+
+    Private IntToLocationDic As New Dictionary(Of Integer, String) From {
+        {0, "Top Left"},
+        {1, "Top Middle"},
+        {2, "Top Right"},
+        {3, "Bottom Left"},
+        {4, "Bottom Middle"},
+        {5, "Bottom Right"}
+    }
+
+    Sub Main(args As String())
+        Console.WriteLine("Running header and footer test sample..." & vbCrLf)
+        SDKLicenseHelper.LicenseVerify()
+
+        Dim document As CPDFDocument = CPDFDocument.InitWithFilePath("CommonFivePage.pdf")
+
+        If Not Directory.Exists(outputPath) Then
+            Directory.CreateDirectory(outputPath)
+        End If
+
+        ' Add common header and footer
+        If AddCommonHeaderFooter(document) Then
+            Console.WriteLine("Add common header and footer done.")
+        Else
+            Console.WriteLine("Add common header and footer failed.")
+        End If
+        Console.WriteLine("--------------------")
+
+        ' Add page header and footer
+        If AddPageHeaderFooter(document) Then
+            Console.WriteLine("Add page header and footer done.")
+        Else
+            Console.WriteLine("Add page header and footer failed.")
+        End If
+
+        Console.WriteLine("--------------------")
+
+        ' Edit header and footer
+        If EditHeaderFooter(document) Then
+            Console.WriteLine("Edit header and footer done.")
+        Else
+            Console.WriteLine("Edit header and footer failed.")
+        End If
+
+        Console.WriteLine("--------------------")
+
+        ' Delete header and footer
+        If ClearHeaderFooter(document) Then
+            Console.WriteLine("Delete header and footer done." & vbCrLf)
+        Else
+            Console.WriteLine("Delete header and footer failed" & vbCrLf)
+        End If
+
+        Console.WriteLine("--------------------")
+        Console.WriteLine("Done")
+        Console.WriteLine("--------------------")
+
+        Console.ReadLine()
+    End Sub
+
+    ' Add common header and footer
+    Private Function AddCommonHeaderFooter(document As CPDFDocument) As Boolean
+        Dim headerFooter As CPDFHeaderFooter = document.GetHeaderFooter()
+        Dim color As Byte() = {255, 0, 0}
+        headerFooter.SetPages("0-" & (document.PageCount - 1))
+
+        For i As Integer = 0 To 2
+            headerFooter.SetText(i, "ComPDFKit")
+            headerFooter.SetTextColor(i, color)
+            headerFooter.SetFontSize(i, 14)
+
+            Console.WriteLine("Text: {0}", headerFooter.GetText(i))
+            Console.WriteLine("Location: {0}" & vbCrLf, IntToLocationDic(i))
+        Next
+
+        headerFooter.Update()
+
+        Dim addHeaderFooterPath As String = outputPath & "\AddCommonHeaderFooterTest.pdf"
+
+        If Not document.WriteToFilePath(addHeaderFooterPath) Then
+            Return False
+        End If
+
+        Console.WriteLine("Browse the changed file in " & addHeaderFooterPath)
+        Return True
+    End Function
+
+    ' Add page header and footer
+    Private Function AddPageHeaderFooter(document As CPDFDocument) As Boolean
+        Dim headerFooter As CPDFHeaderFooter = document.GetHeaderFooter()
+        Dim color As Byte() = {255, 0, 0}
+        headerFooter.SetPages("0-" & (document.PageCount - 1))
+
+        For i As Integer = 3 To 5
+            headerFooter.SetText(i, "<<1,2>>")
+            headerFooter.SetTextColor(i, color)
+            headerFooter.SetFontSize(i, 14)
+
+            Console.WriteLine("Text: {0}", headerFooter.GetText(i))
+            Console.WriteLine("Location: {0}" & vbCrLf, IntToLocationDic(i))
+        Next
+
+        headerFooter.Update()
+
+        Dim addHeaderFooterPath As String = outputPath & "\AddPageHeaderFooterTest.pdf"
+
+        If document.WriteToFilePath(addHeaderFooterPath) Then
+            Console.WriteLine("Browse the changed file in " & addHeaderFooterPath)
+            Return True
+        Else
+            Return False
+        End If
+    End Function
+
+    ' Edit header and footer
+    Private Function EditHeaderFooter(document As CPDFDocument) As Boolean
+        Dim headerFooter As CPDFHeaderFooter = document.GetHeaderFooter()
+
+        If headerFooter.GetText(0) <> String.Empty Then
+            Console.WriteLine("Get old head and footer 0 succeeded, text is {0}", headerFooter.GetText(0))
+        Else
+            Console.WriteLine("Get head and footer 0 failed, or it does not exist")
+            Return False
+        End If
+
+        headerFooter.SetText(0, "ComPDFKit Samples")
+
+        headerFooter.Update()
+
+        Console.WriteLine("Change head and footer 0 succeeded, new text is {0}", headerFooter.GetText(0))
+
+        Dim editHeaderFooterPath As String = outputPath & "\EditHeaderFooterTest.pdf"
+
+        If document.WriteToFilePath(editHeaderFooterPath) Then
+            Console.WriteLine("Browse the changed file in " & editHeaderFooterPath)
+            Return True
+        Else
+            Return False
+        End If
+    End Function
+
+    ' Delete header and footer
+    Private Function ClearHeaderFooter(document As CPDFDocument) As Boolean
+        Dim headerFooter As CPDFHeaderFooter = document.GetHeaderFooter()
+
+        headerFooter.Clear()
+
+        Dim clearHeaderFooterPath As String = outputPath & "\ClearHeaderFooterTest.pdf"
+
+        If document.WriteToFilePath(clearHeaderFooterPath) Then
+            Console.WriteLine("Browse the changed file in " & clearHeaderFooterPath)
+            Return True
+        Else
+            Return False
+        End If
+    End Function
+End Module

+ 139 - 0
Demo/Examples/Samples/HeaderFooterTest/VB/HeaderFooterTest.vbproj

@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{BF771C7A-78C3-4775-963C-A5632426CA1A}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <StartupObject>HeaderFooterTest.HeaderFooterTest</StartupObject>
+    <RootNamespace>HeaderFooterTest</RootNamespace>
+    <AssemblyName>Samples_ComPDFKit</AssemblyName>
+    <FileAlignment>512</FileAlignment>
+    <MyType>Console</MyType>
+    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <Deterministic>true</Deterministic>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <DefineDebug>true</DefineDebug>
+    <DefineTrace>true</DefineTrace>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DocumentationFile>Samples_ComPDFKit.xml</DocumentationFile>
+    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <DefineDebug>false</DefineDebug>
+    <DefineTrace>true</DefineTrace>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DocumentationFile>Samples_ComPDFKit.xml</DocumentationFile>
+    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
+  </PropertyGroup>
+  <PropertyGroup>
+    <OptionExplicit>On</OptionExplicit>
+  </PropertyGroup>
+  <PropertyGroup>
+    <OptionCompare>Binary</OptionCompare>
+  </PropertyGroup>
+  <PropertyGroup>
+    <OptionStrict>Off</OptionStrict>
+  </PropertyGroup>
+  <PropertyGroup>
+    <OptionInfer>On</OptionInfer>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="ComPDFKit.Desk, Version=1.10.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\..\..\packages\ComPDFKit.NetFramework.1.10.0\lib\ComPDFKit.Desk.dll</HintPath>
+    </Reference>
+    <Reference Include="ComPDFKit.Viewer, Version=1.10.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\..\..\packages\ComPDFKit.NetFramework.1.10.0\lib\ComPDFKit.Viewer.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Deployment" />
+    <Reference Include="System.Xml" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="System.Net.Http" />
+  </ItemGroup>
+  <ItemGroup>
+    <Import Include="Microsoft.VisualBasic" />
+    <Import Include="System" />
+    <Import Include="System.Collections" />
+    <Import Include="System.Collections.Generic" />
+    <Import Include="System.Data" />
+    <Import Include="System.Diagnostics" />
+    <Import Include="System.Linq" />
+    <Import Include="System.Xml.Linq" />
+    <Import Include="System.Threading.Tasks" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="..\..\LicenseKey.vb">
+      <Link>LicenseKey.vb</Link>
+    </Compile>
+    <Compile Include="HeaderFooterTest.vb" />
+    <Compile Include="My Project\AssemblyInfo.vb" />
+    <Compile Include="My Project\Application.Designer.vb">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Application.myapp</DependentUpon>
+      <DesignTime>True</DesignTime>
+    </Compile>
+    <Compile Include="My Project\Resources.Designer.vb">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <Compile Include="My Project\Settings.Designer.vb">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Settings.settings</DependentUpon>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="My Project\Resources.resx">
+      <Generator>VbMyResourcesResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.vb</LastGenOutput>
+      <CustomToolNamespace>My.Resources</CustomToolNamespace>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\..\TestFile\CommonFivePage.pdf">
+      <Link>CommonFivePage.pdf</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="My Project\Application.myapp">
+      <Generator>MyApplicationCodeGenerator</Generator>
+      <LastGenOutput>Application.Designer.vb</LastGenOutput>
+    </None>
+    <None Include="My Project\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <CustomToolNamespace>My</CustomToolNamespace>
+      <LastGenOutput>Settings.Designer.vb</LastGenOutput>
+    </None>
+    <None Include="App.config" />
+    <None Include="packages.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <Content Include="ComPDFKit_Logo.ico" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
+  <Import Project="..\..\..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets" Condition="Exists('..\..\..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets')" />
+  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+    <PropertyGroup>
+      <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.The missing file is {0}.</ErrorText>
+    </PropertyGroup>
+    <Error Condition="!Exists('..\..\..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets'))" />
+  </Target>
+</Project>

+ 13 - 0
Demo/Examples/Samples/HeaderFooterTest/VB/My Project/Application.Designer.vb

@@ -0,0 +1,13 @@
+'------------------------------------------------------------------------------
+' <auto-generated>
+'     此代码由工具生成。
+'     运行时版本:4.0.30319.42000
+'
+'     对此文件的更改可能会导致不正确的行为,并且如果
+'     重新生成代码,这些更改将会丢失。
+' </auto-generated>
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+

+ 10 - 0
Demo/Examples/Samples/HeaderFooterTest/VB/My Project/Application.myapp

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+  <MySubMain>false</MySubMain>
+  <SingleInstance>false</SingleInstance>
+  <ShutdownMode>0</ShutdownMode>
+  <EnableVisualStyles>true</EnableVisualStyles>
+  <AuthenticationMode>0</AuthenticationMode>
+  <ApplicationType>2</ApplicationType>
+  <SaveMySettingsOnExit>true</SaveMySettingsOnExit>
+</MyApplicationData>

+ 35 - 0
Demo/Examples/Samples/HeaderFooterTest/VB/My Project/AssemblyInfo.vb

@@ -0,0 +1,35 @@
+Imports System
+Imports System.Reflection
+Imports System.Runtime.InteropServices
+
+' 有关程序集的一般信息由以下
+' 控制。更改这些特性值可修改
+' 与程序集关联的信息。
+
+'查看程序集特性的值
+
+<Assembly: AssemblyTitle("VB")>
+<Assembly: AssemblyDescription("")>
+<Assembly: AssemblyCompany("")>
+<Assembly: AssemblyProduct("VB")>
+<Assembly: AssemblyCopyright("Copyright ©  2023")>
+<Assembly: AssemblyTrademark("")>
+
+<Assembly: ComVisible(False)>
+
+'如果此项目向 COM 公开,则下列 GUID 用于 typelib 的 ID
+<Assembly: Guid("c1767fb3-c12c-4817-97ce-e31a8dd3dc94")>
+
+' 程序集的版本信息由下列四个值组成: 
+'
+'      主版本
+'      次版本
+'      生成号
+'      修订号
+'
+'可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
+'通过使用 "*",如下所示:
+' <Assembly: AssemblyVersion("1.0.*")>
+
+<Assembly: AssemblyVersion("1.0.0.0")>
+<Assembly: AssemblyFileVersion("1.0.0.0")>

+ 63 - 0
Demo/Examples/Samples/HeaderFooterTest/VB/My Project/Resources.Designer.vb

@@ -0,0 +1,63 @@
+'------------------------------------------------------------------------------
+' <auto-generated>
+'     此代码由工具生成。
+'     运行时版本:4.0.30319.42000
+'
+'     对此文件的更改可能会导致不正确的行为,并且如果
+'     重新生成代码,这些更改将会丢失。
+' </auto-generated>
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
+Imports System
+
+Namespace My.Resources
+    
+    '此类是由 StronglyTypedResourceBuilder
+    '类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
+    '若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
+    '(以 /str 作为命令选项),或重新生成 VS 项目。
+    '''<summary>
+    '''  一个强类型的资源类,用于查找本地化的字符串等。
+    '''</summary>
+    <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0"),  _
+     Global.System.Diagnostics.DebuggerNonUserCodeAttribute(),  _
+     Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(),  _
+     Global.Microsoft.VisualBasic.HideModuleNameAttribute()>  _
+    Friend Module Resources
+        
+        Private resourceMan As Global.System.Resources.ResourceManager
+        
+        Private resourceCulture As Global.System.Globalization.CultureInfo
+        
+        '''<summary>
+        '''  返回此类使用的缓存的 ResourceManager 实例。
+        '''</summary>
+        <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)>  _
+        Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
+            Get
+                If Object.ReferenceEquals(resourceMan, Nothing) Then
+                    Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("HeaderFooterTest.Resources", GetType(Resources).Assembly)
+                    resourceMan = temp
+                End If
+                Return resourceMan
+            End Get
+        End Property
+        
+        '''<summary>
+        '''  重写当前线程的 CurrentUICulture 属性,对
+        '''  使用此强类型资源类的所有资源查找执行重写。
+        '''</summary>
+        <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)>  _
+        Friend Property Culture() As Global.System.Globalization.CultureInfo
+            Get
+                Return resourceCulture
+            End Get
+            Set
+                resourceCulture = value
+            End Set
+        End Property
+    End Module
+End Namespace

+ 117 - 0
Demo/Examples/Samples/HeaderFooterTest/VB/My Project/Resources.resx

@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 73 - 0
Demo/Examples/Samples/HeaderFooterTest/VB/My Project/Settings.Designer.vb

@@ -0,0 +1,73 @@
+'------------------------------------------------------------------------------
+' <auto-generated>
+'     此代码由工具生成。
+'     运行时版本:4.0.30319.42000
+'
+'     对此文件的更改可能会导致不正确的行为,并且如果
+'     重新生成代码,这些更改将会丢失。
+' </auto-generated>
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
+
+Namespace My
+    
+    <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(),  _
+     Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.6.0.0"),  _
+     Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)>  _
+    Partial Friend NotInheritable Class MySettings
+        Inherits Global.System.Configuration.ApplicationSettingsBase
+        
+        Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
+        
+#Region "My.Settings 自动保存功能"
+#If _MyType = "WindowsForms" Then
+    Private Shared addedHandler As Boolean
+
+    Private Shared addedHandlerLockObject As New Object
+
+    <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
+    Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
+        If My.Application.SaveMySettingsOnExit Then
+            My.Settings.Save()
+        End If
+    End Sub
+#End If
+#End Region
+        
+        Public Shared ReadOnly Property [Default]() As MySettings
+            Get
+                
+#If _MyType = "WindowsForms" Then
+               If Not addedHandler Then
+                    SyncLock addedHandlerLockObject
+                        If Not addedHandler Then
+                            AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
+                            addedHandler = True
+                        End If
+                    End SyncLock
+                End If
+#End If
+                Return defaultInstance
+            End Get
+        End Property
+    End Class
+End Namespace
+
+Namespace My
+    
+    <Global.Microsoft.VisualBasic.HideModuleNameAttribute(),  _
+     Global.System.Diagnostics.DebuggerNonUserCodeAttribute(),  _
+     Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()>  _
+    Friend Module MySettingsProperty
+        
+        <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")>  _
+        Friend ReadOnly Property Settings() As Global.HeaderFooterTest.My.MySettings
+            Get
+                Return Global.HeaderFooterTest.My.MySettings.Default
+            End Get
+        End Property
+    End Module
+End Namespace

+ 7 - 0
Demo/Examples/Samples/HeaderFooterTest/VB/My Project/Settings.settings

@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
+  <Profiles>
+    <Profile Name="(Default)" />
+  </Profiles>
+  <Settings />
+</SettingsFile>

+ 4 - 0
Demo/Examples/Samples/HeaderFooterTest/VB/packages.config

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="ComPDFKit.NetFramework" version="1.10.0" targetFramework="net461" />
+</packages>

+ 1 - 1
Demo/Examples/Samples/ImageExtractTest/CS/ImageExtractTest.cs

@@ -6,7 +6,7 @@ namespace ImageExtractTest
 {
     internal class ImageExtractTest
     {
-        static private string outputPath = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory()))) + "\\Output\\ImageExtract";
+        static private string outputPath = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory()))) + "\\Output\\CS";
 
         static void Main(string[] args)
         {

+ 6 - 0
Demo/Examples/Samples/ImageExtractTest/VB/App.config

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+    <startup> 
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
+    </startup>
+</configuration>

BIN
Demo/Examples/Samples/ImageExtractTest/VB/ComPDFKit_Logo.ico


+ 34 - 0
Demo/Examples/Samples/ImageExtractTest/VB/ImageExtractTest.vb

@@ -0,0 +1,34 @@
+Imports ComPDFKit.PDFDocument
+Imports System
+Imports System.IO
+
+Module ImageExtractTest
+    Private outputPath As String = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory()))) & "\Output\VB"
+
+    Sub Main()
+        ' Perparation work
+        Console.WriteLine("Running Bookmark test sample..." & vbCrLf)
+
+        SDKLicenseHelper.LicenseVerify()
+
+        Dim document As CPDFDocument = CPDFDocument.InitWithFilePath("CommonFivePage.pdf")
+
+        If Not Directory.Exists(outputPath) Then
+            Directory.CreateDirectory(outputPath)
+        End If
+
+        ' Sample 1: Extract image
+        ExtractImage(document)
+        document.Release()
+        Console.WriteLine("--------------------")
+
+        Console.WriteLine("Done")
+        Console.WriteLine("--------------------")
+        Console.ReadLine()
+    End Sub
+
+    ' Extract all images from document
+    Private Sub ExtractImage(document As CPDFDocument)
+        document.ExtractImage("1-5", outputPath)
+    End Sub
+End Module

+ 142 - 0
Demo/Examples/Samples/ImageExtractTest/VB/ImageExtractTest.vbproj

@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{AE11BDA6-8A50-405C-A5F2-54EFCD3C76F9}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <StartupObject>ImageExtractTest.ImageExtractTest</StartupObject>
+    <RootNamespace>ImageExtractTest</RootNamespace>
+    <AssemblyName>Samples_ComPDFKit</AssemblyName>
+    <FileAlignment>512</FileAlignment>
+    <MyType>Console</MyType>
+    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <Deterministic>true</Deterministic>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <DefineDebug>true</DefineDebug>
+    <DefineTrace>true</DefineTrace>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DocumentationFile>Samples_ComPDFKit.xml</DocumentationFile>
+    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <DefineDebug>false</DefineDebug>
+    <DefineTrace>true</DefineTrace>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DocumentationFile>Samples_ComPDFKit.xml</DocumentationFile>
+    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
+  </PropertyGroup>
+  <PropertyGroup>
+    <OptionExplicit>On</OptionExplicit>
+  </PropertyGroup>
+  <PropertyGroup>
+    <OptionCompare>Binary</OptionCompare>
+  </PropertyGroup>
+  <PropertyGroup>
+    <OptionStrict>Off</OptionStrict>
+  </PropertyGroup>
+  <PropertyGroup>
+    <OptionInfer>On</OptionInfer>
+  </PropertyGroup>
+  <PropertyGroup>
+    <ApplicationIcon>ComPDFKit_Logo.ico</ApplicationIcon>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="ComPDFKit.Desk, Version=1.10.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\..\..\packages\ComPDFKit.NetFramework.1.10.0\lib\ComPDFKit.Desk.dll</HintPath>
+    </Reference>
+    <Reference Include="ComPDFKit.Viewer, Version=1.10.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\..\..\packages\ComPDFKit.NetFramework.1.10.0\lib\ComPDFKit.Viewer.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Deployment" />
+    <Reference Include="System.Xml" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="System.Net.Http" />
+  </ItemGroup>
+  <ItemGroup>
+    <Import Include="Microsoft.VisualBasic" />
+    <Import Include="System" />
+    <Import Include="System.Collections" />
+    <Import Include="System.Collections.Generic" />
+    <Import Include="System.Data" />
+    <Import Include="System.Diagnostics" />
+    <Import Include="System.Linq" />
+    <Import Include="System.Xml.Linq" />
+    <Import Include="System.Threading.Tasks" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="..\..\LicenseKey.vb">
+      <Link>LicenseKey.vb</Link>
+    </Compile>
+    <Compile Include="ImageExtractTest.vb" />
+    <Compile Include="My Project\AssemblyInfo.vb" />
+    <Compile Include="My Project\Application.Designer.vb">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Application.myapp</DependentUpon>
+      <DesignTime>True</DesignTime>
+    </Compile>
+    <Compile Include="My Project\Resources.Designer.vb">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <Compile Include="My Project\Settings.Designer.vb">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Settings.settings</DependentUpon>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="My Project\Resources.resx">
+      <Generator>VbMyResourcesResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.vb</LastGenOutput>
+      <CustomToolNamespace>My.Resources</CustomToolNamespace>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\..\TestFile\CommonFivePage.pdf">
+      <Link>CommonFivePage.pdf</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="My Project\Application.myapp">
+      <Generator>MyApplicationCodeGenerator</Generator>
+      <LastGenOutput>Application.Designer.vb</LastGenOutput>
+    </None>
+    <None Include="My Project\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <CustomToolNamespace>My</CustomToolNamespace>
+      <LastGenOutput>Settings.Designer.vb</LastGenOutput>
+    </None>
+    <None Include="App.config" />
+    <None Include="packages.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <Content Include="ComPDFKit_Logo.ico" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
+  <Import Project="..\..\..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets" Condition="Exists('..\..\..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets')" />
+  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+    <PropertyGroup>
+      <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.The missing file is {0}.</ErrorText>
+    </PropertyGroup>
+    <Error Condition="!Exists('..\..\..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets'))" />
+  </Target>
+</Project>

+ 13 - 0
Demo/Examples/Samples/ImageExtractTest/VB/My Project/Application.Designer.vb

@@ -0,0 +1,13 @@
+'------------------------------------------------------------------------------
+' <auto-generated>
+'     此代码由工具生成。
+'     运行时版本:4.0.30319.42000
+'
+'     对此文件的更改可能会导致不正确的行为,并且如果
+'     重新生成代码,这些更改将会丢失。
+' </auto-generated>
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+

+ 10 - 0
Demo/Examples/Samples/ImageExtractTest/VB/My Project/Application.myapp

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+  <MySubMain>false</MySubMain>
+  <SingleInstance>false</SingleInstance>
+  <ShutdownMode>0</ShutdownMode>
+  <EnableVisualStyles>true</EnableVisualStyles>
+  <AuthenticationMode>0</AuthenticationMode>
+  <ApplicationType>2</ApplicationType>
+  <SaveMySettingsOnExit>true</SaveMySettingsOnExit>
+</MyApplicationData>

+ 35 - 0
Demo/Examples/Samples/ImageExtractTest/VB/My Project/AssemblyInfo.vb

@@ -0,0 +1,35 @@
+Imports System
+Imports System.Reflection
+Imports System.Runtime.InteropServices
+
+' 有关程序集的一般信息由以下
+' 控制。更改这些特性值可修改
+' 与程序集关联的信息。
+
+'查看程序集特性的值
+
+<Assembly: AssemblyTitle("VB")>
+<Assembly: AssemblyDescription("")>
+<Assembly: AssemblyCompany("")>
+<Assembly: AssemblyProduct("VB")>
+<Assembly: AssemblyCopyright("Copyright ©  2023")>
+<Assembly: AssemblyTrademark("")>
+
+<Assembly: ComVisible(False)>
+
+'如果此项目向 COM 公开,则下列 GUID 用于 typelib 的 ID
+<Assembly: Guid("c92d9818-bb17-446c-b2f9-8384db270566")>
+
+' 程序集的版本信息由下列四个值组成: 
+'
+'      主版本
+'      次版本
+'      生成号
+'      修订号
+'
+'可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
+'通过使用 "*",如下所示:
+' <Assembly: AssemblyVersion("1.0.*")>
+
+<Assembly: AssemblyVersion("1.0.0.0")>
+<Assembly: AssemblyFileVersion("1.0.0.0")>

+ 63 - 0
Demo/Examples/Samples/ImageExtractTest/VB/My Project/Resources.Designer.vb

@@ -0,0 +1,63 @@
+'------------------------------------------------------------------------------
+' <auto-generated>
+'     此代码由工具生成。
+'     运行时版本:4.0.30319.42000
+'
+'     对此文件的更改可能会导致不正确的行为,并且如果
+'     重新生成代码,这些更改将会丢失。
+' </auto-generated>
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
+Imports System
+
+Namespace My.Resources
+    
+    '此类是由 StronglyTypedResourceBuilder
+    '类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
+    '若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
+    '(以 /str 作为命令选项),或重新生成 VS 项目。
+    '''<summary>
+    '''  一个强类型的资源类,用于查找本地化的字符串等。
+    '''</summary>
+    <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0"),  _
+     Global.System.Diagnostics.DebuggerNonUserCodeAttribute(),  _
+     Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(),  _
+     Global.Microsoft.VisualBasic.HideModuleNameAttribute()>  _
+    Friend Module Resources
+        
+        Private resourceMan As Global.System.Resources.ResourceManager
+        
+        Private resourceCulture As Global.System.Globalization.CultureInfo
+        
+        '''<summary>
+        '''  返回此类使用的缓存的 ResourceManager 实例。
+        '''</summary>
+        <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)>  _
+        Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
+            Get
+                If Object.ReferenceEquals(resourceMan, Nothing) Then
+                    Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("ImageExtractTest.Resources", GetType(Resources).Assembly)
+                    resourceMan = temp
+                End If
+                Return resourceMan
+            End Get
+        End Property
+        
+        '''<summary>
+        '''  重写当前线程的 CurrentUICulture 属性,对
+        '''  使用此强类型资源类的所有资源查找执行重写。
+        '''</summary>
+        <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)>  _
+        Friend Property Culture() As Global.System.Globalization.CultureInfo
+            Get
+                Return resourceCulture
+            End Get
+            Set
+                resourceCulture = value
+            End Set
+        End Property
+    End Module
+End Namespace

+ 117 - 0
Demo/Examples/Samples/ImageExtractTest/VB/My Project/Resources.resx

@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 73 - 0
Demo/Examples/Samples/ImageExtractTest/VB/My Project/Settings.Designer.vb

@@ -0,0 +1,73 @@
+'------------------------------------------------------------------------------
+' <auto-generated>
+'     此代码由工具生成。
+'     运行时版本:4.0.30319.42000
+'
+'     对此文件的更改可能会导致不正确的行为,并且如果
+'     重新生成代码,这些更改将会丢失。
+' </auto-generated>
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
+
+Namespace My
+    
+    <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(),  _
+     Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.6.0.0"),  _
+     Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)>  _
+    Partial Friend NotInheritable Class MySettings
+        Inherits Global.System.Configuration.ApplicationSettingsBase
+        
+        Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
+        
+#Region "My.Settings 自动保存功能"
+#If _MyType = "WindowsForms" Then
+    Private Shared addedHandler As Boolean
+
+    Private Shared addedHandlerLockObject As New Object
+
+    <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
+    Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
+        If My.Application.SaveMySettingsOnExit Then
+            My.Settings.Save()
+        End If
+    End Sub
+#End If
+#End Region
+        
+        Public Shared ReadOnly Property [Default]() As MySettings
+            Get
+                
+#If _MyType = "WindowsForms" Then
+               If Not addedHandler Then
+                    SyncLock addedHandlerLockObject
+                        If Not addedHandler Then
+                            AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
+                            addedHandler = True
+                        End If
+                    End SyncLock
+                End If
+#End If
+                Return defaultInstance
+            End Get
+        End Property
+    End Class
+End Namespace
+
+Namespace My
+    
+    <Global.Microsoft.VisualBasic.HideModuleNameAttribute(),  _
+     Global.System.Diagnostics.DebuggerNonUserCodeAttribute(),  _
+     Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()>  _
+    Friend Module MySettingsProperty
+        
+        <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")>  _
+        Friend ReadOnly Property Settings() As Global.ImageExtractTest.My.MySettings
+            Get
+                Return Global.ImageExtractTest.My.MySettings.Default
+            End Get
+        End Property
+    End Module
+End Namespace

+ 7 - 0
Demo/Examples/Samples/ImageExtractTest/VB/My Project/Settings.settings

@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
+  <Profiles>
+    <Profile Name="(Default)" />
+  </Profiles>
+  <Settings />
+</SettingsFile>

+ 4 - 0
Demo/Examples/Samples/ImageExtractTest/VB/packages.config

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="ComPDFKit.NetFramework" version="1.10.0" targetFramework="net461" />
+</packages>

+ 1 - 1
Demo/Examples/Samples/InteractiveFormsTest/CS/InteractiveFormsTest.cs

@@ -16,7 +16,7 @@ namespace InteractiveFormsTest
 {
     internal class InteractiveFormsTest
     {
-        static private string outputPath = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory()))) + "\\Output\\InteractiveForms";
+        static private string outputPath = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory()))) + "\\Output\\CS";
           
         static void Main(string[] args)
         {

+ 6 - 0
Demo/Examples/Samples/InteractiveFormsTest/VB/App.config

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+    <startup> 
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
+    </startup>
+</configuration>

BIN
Demo/Examples/Samples/InteractiveFormsTest/VB/ComPDFKit_Logo.ico


+ 162 - 0
Demo/Examples/Samples/InteractiveFormsTest/VB/InteractiveFormsTest.vb

@@ -0,0 +1,162 @@
+Imports ComPDFKit.Import
+Imports ComPDFKit.PDFAnnotation
+Imports ComPDFKit.PDFAnnotation.Form
+Imports ComPDFKit.PDFDocument
+Imports ComPDFKit.PDFDocument.Action
+Imports ComPDFKit.PDFPage
+Imports ComPDFKit.PDFPage.Edit
+Imports System
+Imports System.Collections.Generic
+Imports System.IO
+Imports System.Text
+
+Module InteractiveFormsTest
+    Private outputPath As String = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory()))) & "\Output\VB"
+
+    Sub Main()
+        Console.WriteLine("Running interactive forms test sample…" & vbCrLf)
+        SDKLicenseHelper.LicenseVerify()
+        If Not Directory.Exists(outputPath) Then
+            Directory.CreateDirectory(outputPath)
+        End If
+        Dim document As CPDFDocument = CPDFDocument.InitWithFilePath("CommonFivePage.pdf")
+        If CreateForms(document) Then
+            Console.WriteLine("Create forms done.")
+        Else
+            Console.WriteLine("Create forms failed.")
+        End If
+        Console.WriteLine("--------------------")
+        Console.WriteLine("Done")
+        Console.WriteLine("--------------------")
+        Console.ReadLine()
+    End Sub
+
+    ' Create text field.
+    ' Text field: used to input text
+    Private Sub CreateTextField(document As CPDFDocument)
+        Dim page As CPDFPage = document.PageAtIndex(0)
+        Dim textField As CPDFTextWidget = TryCast(page.CreateWidget(C_WIDGET_TYPE.WIDGET_TEXTFIELD), CPDFTextWidget)
+        textField.SetRect(New CRect(28, 32, 235, 75))
+        textField.SetWidgetBorderRGBColor(New Byte() {0, 0, 0})
+        textField.SetWidgetBgRGBColor(New Byte() {240, 255, 240})
+    End Sub
+
+    ' Create push button.
+    ' Push button: Click to perform some actions, such as jumping to a page or website.
+    Private Sub CreatePushButton(document As CPDFDocument)
+        Dim page As CPDFPage = document.PageAtIndex(0)
+        Dim pushButton1 As CPDFPushButtonWidget = TryCast(page.CreateWidget(C_WIDGET_TYPE.WIDGET_PUSHBUTTON), CPDFPushButtonWidget)
+        pushButton1.SetRect(New CRect(28, 150, 150, 100))
+        pushButton1.SetWidgetBorderRGBColor(New Byte() {0, 0, 0})
+        pushButton1.SetWidgetBgRGBColor(New Byte() {180, 180, 220})
+        pushButton1.SetButtonTitle("Go To Page 2")
+        Dim attribute As New CTextAttribute()
+        attribute.FontColor = New Byte() {0, 0, 0}
+        attribute.FontSize = 14
+        attribute.FontName = "Helvetica"
+        pushButton1.SetTextAttribute(attribute)
+        Dim gotoAction As New CPDFGoToAction()
+        Dim dest As New CPDFDestination()
+        dest.PageIndex = 1
+        gotoAction.SetDestination(document, dest)
+        pushButton1.SetButtonAction(gotoAction)
+        pushButton1.UpdateFormAp()
+
+        Dim pushButton2 As CPDFPushButtonWidget = TryCast(page.CreateWidget(C_WIDGET_TYPE.WIDGET_PUSHBUTTON), CPDFPushButtonWidget)
+        pushButton2.SetRect(New CRect(168, 150, 290, 100))
+        pushButton2.SetWidgetBorderRGBColor(New Byte() {0, 0, 0})
+        pushButton2.SetWidgetBgRGBColor(New Byte() {180, 180, 220})
+        pushButton2.SetButtonTitle("Go To ComPDFKit")
+        Dim attribute2 As New CTextAttribute()
+        attribute2.FontColor = New Byte() {0, 0, 0}
+        attribute2.FontSize = 14
+        attribute2.FontName = "Helvetica"
+        pushButton2.SetTextAttribute(attribute)
+        Dim uriAction As New CPDFUriAction()
+        uriAction.SetUri("https://www.compdf.com/")
+        pushButton2.SetButtonAction(uriAction)
+        pushButton2.UpdateFormAp()
+    End Sub
+
+    ' Create ListBox
+    Private Sub CreateListBox(document As CPDFDocument)
+        Dim page As CPDFPage = document.PageAtIndex(0)
+        Dim listbox As CPDFListBoxWidget = TryCast(page.CreateWidget(C_WIDGET_TYPE.WIDGET_LISTBOX), CPDFListBoxWidget)
+        listbox.SetRect(New CRect(28, 330, 150, 230))
+        listbox.AddOptionItem(0, "1", "ComPDFKit1")
+        listbox.AddOptionItem(1, "2", "ComPDFKit2")
+        listbox.SetWidgetBorderRGBColor(New Byte() {0, 0, 0})
+        listbox.SetWidgetBgRGBColor(New Byte() {200, 180, 180})
+    End Sub
+
+    ' Create SignatureField
+    ' Provide an area for electronic signatures.
+    Private Sub CreateSignatureField(document As CPDFDocument)
+        Dim page As CPDFPage = document.PageAtIndex(0)
+        Dim signatureField As CPDFSignatureWidget = TryCast(page.CreateWidget(C_WIDGET_TYPE.WIDGET_SIGNATUREFIELDS), CPDFSignatureWidget)
+        signatureField.SetRect(New CRect(28, 420, 150, 370))
+        signatureField.SetWidgetBorderRGBColor(New Byte() {0, 0, 0})
+        signatureField.SetWidgetBgRGBColor(New Byte() {150, 180, 210})
+    End Sub
+
+    ' Create CheckBox
+    Private Sub CreateCheckBox(document As CPDFDocument)
+        Dim page As CPDFPage = document.PageAtIndex(0)
+        Dim checkBox1 As CPDFCheckBoxWidget = TryCast(page.CreateWidget(C_WIDGET_TYPE.WIDGET_CHECKBOX), CPDFCheckBoxWidget)
+        checkBox1.SetRect(New CRect(28, 470, 48, 450))
+        checkBox1.SetWidgetBorderRGBColor(New Byte() {0, 0, 0})
+        checkBox1.SetWidgetBgRGBColor(New Byte() {150, 180, 210})
+
+        Dim checkBox2 As CPDFCheckBoxWidget = TryCast(page.CreateWidget(C_WIDGET_TYPE.WIDGET_CHECKBOX), CPDFCheckBoxWidget)
+        checkBox2.SetRect(New CRect(58, 470, 78, 450))
+        checkBox2.SetWidgetBorderRGBColor(New Byte() {0, 0, 0})
+        checkBox2.SetWidgetBgRGBColor(New Byte() {150, 180, 210})
+
+        Dim checkBox3 As CPDFCheckBoxWidget = TryCast(page.CreateWidget(C_WIDGET_TYPE.WIDGET_CHECKBOX), CPDFCheckBoxWidget)
+        checkBox3.SetRect(New CRect(88, 470, 108, 450))
+        checkBox3.SetWidgetBorderRGBColor(New Byte() {0, 0, 0})
+        checkBox3.SetWidgetBgRGBColor(New Byte() {150, 180, 210})
+    End Sub
+
+    ' Create RadioButton
+    Private Sub CreateRadioButton(document As CPDFDocument)
+        Dim page As CPDFPage = document.PageAtIndex(0)
+        Dim radioButton1 As CPDFRadioButtonWidget = TryCast(page.CreateWidget(C_WIDGET_TYPE.WIDGET_RADIOBUTTON), CPDFRadioButtonWidget)
+        radioButton1.SetRect(New CRect(28, 500, 48, 480))
+        radioButton1.SetWidgetBorderRGBColor(New Byte() {0, 0, 0})
+        radioButton1.SetWidgetBgRGBColor(New Byte() {210, 180, 150})
+        radioButton1.SetWidgetCheckStyle(C_CHECK_STYLE.CK_CIRCLE)
+
+        Dim radioButton2 As CPDFRadioButtonWidget = TryCast(page.CreateWidget(C_WIDGET_TYPE.WIDGET_RADIOBUTTON), CPDFRadioButtonWidget)
+        radioButton2.SetRect(New CRect(58, 500, 78, 480))
+        radioButton2.SetWidgetBorderRGBColor(New Byte() {0, 0, 0})
+        radioButton2.SetWidgetBgRGBColor(New Byte() {210, 180, 150})
+        radioButton2.SetWidgetCheckStyle(C_CHECK_STYLE.CK_CIRCLE)
+
+        Dim radioButton3 As CPDFRadioButtonWidget = TryCast(page.CreateWidget(C_WIDGET_TYPE.WIDGET_RADIOBUTTON), CPDFRadioButtonWidget)
+        radioButton3.SetRect(New CRect(88, 500, 108, 480))
+        radioButton3.SetWidgetBorderRGBColor(New Byte() {0, 0, 0})
+        radioButton3.SetWidgetBgRGBColor(New Byte() {210, 180, 150})
+        radioButton3.SetWidgetCheckStyle(C_CHECK_STYLE.CK_CIRCLE)
+    End Sub
+
+    ' Generate various signatures.
+    Private Function CreateForms(document As CPDFDocument) As Boolean
+        CreateTextField(document)
+        CreatePushButton(document)
+        CreateListBox(document)
+        CreateSignatureField(document)
+        CreateCheckBox(document)
+        CreateRadioButton(document)
+
+        ' Save to the specified path so you can observe the effect.
+        Dim path As String = outputPath & "\CreateFormsTest.pdf"
+
+        If Not document.WriteToFilePath(path) Then
+            Return False
+        End If
+        Console.WriteLine("Browse the changed file in " & path)
+
+        Return True
+    End Function
+End Module

+ 141 - 0
Demo/Examples/Samples/InteractiveFormsTest/VB/InteractiveFormsTest.vbproj

@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{805251B5-D40B-4920-B725-6C92B4C9DBE2}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <StartupObject>VB.InteractiveFormsTest</StartupObject>
+    <RootNamespace>VB</RootNamespace>
+    <AssemblyName>Samples_ComPDFKit</AssemblyName>
+    <FileAlignment>512</FileAlignment>
+    <MyType>Console</MyType>
+    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <Deterministic>true</Deterministic>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <DefineDebug>true</DefineDebug>
+    <DefineTrace>true</DefineTrace>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DocumentationFile>Samples_ComPDFKit.xml</DocumentationFile>
+    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <DefineDebug>false</DefineDebug>
+    <DefineTrace>true</DefineTrace>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DocumentationFile>Samples_ComPDFKit.xml</DocumentationFile>
+    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
+  </PropertyGroup>
+  <PropertyGroup>
+    <OptionExplicit>On</OptionExplicit>
+  </PropertyGroup>
+  <PropertyGroup>
+    <OptionCompare>Binary</OptionCompare>
+  </PropertyGroup>
+  <PropertyGroup>
+    <OptionStrict>Off</OptionStrict>
+  </PropertyGroup>
+  <PropertyGroup>
+    <OptionInfer>On</OptionInfer>
+  </PropertyGroup>
+  <PropertyGroup>
+    <ApplicationIcon>ComPDFKit_Logo.ico</ApplicationIcon>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="ComPDFKit.Desk, Version=1.10.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\..\..\packages\ComPDFKit.NetFramework.1.10.0\lib\ComPDFKit.Desk.dll</HintPath>
+    </Reference>
+    <Reference Include="ComPDFKit.Viewer, Version=1.10.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\..\..\packages\ComPDFKit.NetFramework.1.10.0\lib\ComPDFKit.Viewer.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Deployment" />
+    <Reference Include="System.Xml" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="System.Net.Http" />
+  </ItemGroup>
+  <ItemGroup>
+    <Import Include="Microsoft.VisualBasic" />
+    <Import Include="System" />
+    <Import Include="System.Collections" />
+    <Import Include="System.Collections.Generic" />
+    <Import Include="System.Data" />
+    <Import Include="System.Diagnostics" />
+    <Import Include="System.Linq" />
+    <Import Include="System.Xml.Linq" />
+    <Import Include="System.Threading.Tasks" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="..\..\LicenseKey.vb">
+      <Link>LicenseKey.vb</Link>
+    </Compile>
+    <Compile Include="InteractiveFormsTest.vb" />
+    <Compile Include="My Project\AssemblyInfo.vb" />
+    <Compile Include="My Project\Application.Designer.vb">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Application.myapp</DependentUpon>
+    </Compile>
+    <Compile Include="My Project\Resources.Designer.vb">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <Compile Include="My Project\Settings.Designer.vb">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Settings.settings</DependentUpon>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="My Project\Resources.resx">
+      <Generator>VbMyResourcesResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.vb</LastGenOutput>
+      <CustomToolNamespace>My.Resources</CustomToolNamespace>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\..\TestFile\CommonFivePage.pdf">
+      <Link>CommonFivePage.pdf</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="My Project\Application.myapp">
+      <Generator>MyApplicationCodeGenerator</Generator>
+      <LastGenOutput>Application.Designer.vb</LastGenOutput>
+    </None>
+    <None Include="My Project\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <CustomToolNamespace>My</CustomToolNamespace>
+      <LastGenOutput>Settings.Designer.vb</LastGenOutput>
+    </None>
+    <None Include="App.config" />
+    <None Include="packages.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\..\license_key_windows.xml">
+      <Link>license_key_windows.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <Content Include="ComPDFKit_Logo.ico" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
+  <Import Project="..\..\..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets" Condition="Exists('..\..\..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets')" />
+  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+    <PropertyGroup>
+      <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.The missing file is {0}.</ErrorText>
+    </PropertyGroup>
+    <Error Condition="!Exists('..\..\..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\ComPDFKit.NetFramework.1.10.0\build\ComPDFKit.NetFramework.targets'))" />
+  </Target>
+</Project>

+ 13 - 0
Demo/Examples/Samples/InteractiveFormsTest/VB/My Project/Application.Designer.vb

@@ -0,0 +1,13 @@
+'------------------------------------------------------------------------------
+' <auto-generated>
+'     This code was generated by a tool.
+'     Runtime Version:4.0.30319.42000
+'
+'     Changes to this file may cause incorrect behavior and will be lost if
+'     the code is regenerated.
+' </auto-generated>
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+

+ 10 - 0
Demo/Examples/Samples/InteractiveFormsTest/VB/My Project/Application.myapp

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+  <MySubMain>false</MySubMain>
+  <SingleInstance>false</SingleInstance>
+  <ShutdownMode>0</ShutdownMode>
+  <EnableVisualStyles>true</EnableVisualStyles>
+  <AuthenticationMode>0</AuthenticationMode>
+  <ApplicationType>2</ApplicationType>
+  <SaveMySettingsOnExit>true</SaveMySettingsOnExit>
+</MyApplicationData>

+ 35 - 0
Demo/Examples/Samples/InteractiveFormsTest/VB/My Project/AssemblyInfo.vb

@@ -0,0 +1,35 @@
+Imports System
+Imports System.Reflection
+Imports System.Runtime.InteropServices
+
+' 有关程序集的一般信息由以下
+' 控制。更改这些特性值可修改
+' 与程序集关联的信息。
+
+'查看程序集特性的值
+
+<Assembly: AssemblyTitle("VB")>
+<Assembly: AssemblyDescription("")>
+<Assembly: AssemblyCompany("")>
+<Assembly: AssemblyProduct("VB")>
+<Assembly: AssemblyCopyright("Copyright ©  2023")>
+<Assembly: AssemblyTrademark("")>
+
+<Assembly: ComVisible(False)>
+
+'如果此项目向 COM 公开,则下列 GUID 用于 typelib 的 ID
+<Assembly: Guid("3f007b7f-aaf6-4fab-9764-43aa3915be61")>
+
+' 程序集的版本信息由下列四个值组成: 
+'
+'      主版本
+'      次版本
+'      生成号
+'      修订号
+'
+'可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
+'通过使用 "*",如下所示:
+' <Assembly: AssemblyVersion("1.0.*")>
+
+<Assembly: AssemblyVersion("1.0.0.0")>
+<Assembly: AssemblyFileVersion("1.0.0.0")>

+ 62 - 0
Demo/Examples/Samples/InteractiveFormsTest/VB/My Project/Resources.Designer.vb

@@ -0,0 +1,62 @@
+'------------------------------------------------------------------------------
+' <auto-generated>
+'     This code was generated by a tool.
+'     Runtime Version:4.0.30319.42000
+'
+'     Changes to this file may cause incorrect behavior and will be lost if
+'     the code is regenerated.
+' </auto-generated>
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
+
+Namespace My.Resources
+
+    'This class was auto-generated by the StronglyTypedResourceBuilder
+    'class via a tool like ResGen or Visual Studio.
+    'To add or remove a member, edit your .ResX file then rerun ResGen
+    'with the /str option, or rebuild your VS project.
+    '''<summary>
+    '''  A strongly-typed resource class, for looking up localized strings, etc.
+    '''</summary>
+    <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
+     Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
+     Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
+     Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
+    Friend Module Resources
+
+        Private resourceMan As Global.System.Resources.ResourceManager
+
+        Private resourceCulture As Global.System.Globalization.CultureInfo
+
+        '''<summary>
+        '''  Returns the cached ResourceManager instance used by this class.
+        '''</summary>
+        <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
+        Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
+            Get
+                If Object.ReferenceEquals(resourceMan, Nothing) Then
+                    Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("VB.Resources", GetType(Resources).Assembly)
+                    resourceMan = temp
+                End If
+                Return resourceMan
+            End Get
+        End Property
+
+        '''<summary>
+        '''  Overrides the current thread's CurrentUICulture property for all
+        '''  resource lookups using this strongly typed resource class.
+        '''</summary>
+        <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
+        Friend Property Culture() As Global.System.Globalization.CultureInfo
+            Get
+                Return resourceCulture
+            End Get
+            Set(ByVal value As Global.System.Globalization.CultureInfo)
+                resourceCulture = value
+            End Set
+        End Property
+    End Module
+End Namespace

+ 117 - 0
Demo/Examples/Samples/InteractiveFormsTest/VB/My Project/Resources.resx

@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 73 - 0
Demo/Examples/Samples/InteractiveFormsTest/VB/My Project/Settings.Designer.vb

@@ -0,0 +1,73 @@
+'------------------------------------------------------------------------------
+' <auto-generated>
+'     This code was generated by a tool.
+'     Runtime Version:4.0.30319.42000
+'
+'     Changes to this file may cause incorrect behavior and will be lost if
+'     the code is regenerated.
+' </auto-generated>
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
+
+Namespace My
+
+    <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
+     Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _
+     Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
+    Partial Friend NotInheritable Class MySettings
+        Inherits Global.System.Configuration.ApplicationSettingsBase
+
+        Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings)
+
+#Region "My.Settings Auto-Save Functionality"
+#If _MyType = "WindowsForms" Then
+        Private Shared addedHandler As Boolean
+
+        Private Shared addedHandlerLockObject As New Object
+
+        <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
+        Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
+            If My.Application.SaveMySettingsOnExit Then
+                My.Settings.Save()
+            End If
+        End Sub
+#End If
+#End Region
+
+        Public Shared ReadOnly Property [Default]() As MySettings
+            Get
+
+#If _MyType = "WindowsForms" Then
+                   If Not addedHandler Then
+                        SyncLock addedHandlerLockObject
+                            If Not addedHandler Then
+                                AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
+                                addedHandler = True
+                            End If
+                        End SyncLock
+                    End If
+#End If
+                Return defaultInstance
+            End Get
+        End Property
+    End Class
+End Namespace
+
+Namespace My
+
+    <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
+     Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
+     Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
+    Friend Module MySettingsProperty
+
+        <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
+        Friend ReadOnly Property Settings() As Global.VB.My.MySettings
+            Get
+                Return Global.VB.My.MySettings.Default
+            End Get
+        End Property
+    End Module
+End Namespace

+ 7 - 0
Demo/Examples/Samples/InteractiveFormsTest/VB/My Project/Settings.settings

@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
+  <Profiles>
+    <Profile Name="(Default)" />
+  </Profiles>
+  <Settings />
+</SettingsFile>

+ 4 - 0
Demo/Examples/Samples/InteractiveFormsTest/VB/packages.config

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="ComPDFKit.NetFramework" version="1.10.0" targetFramework="net461" />
+</packages>

+ 1 - 1
Demo/Examples/Samples/OutlineTest/CS/OutlineTest.cs

@@ -7,7 +7,7 @@ namespace OutlineTest
 {
     internal class OutlineTest
     {
-        static private string outputPath = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory()))) + "\\Output\\Outline";
+        static private string outputPath = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory()))) + "\\Output\\CS";
         static private int outlineCounter = 0;
         static private int outlineNumber = 0;
 

+ 6 - 0
Demo/Examples/Samples/OutlineTest/VB/App.config

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+    <startup> 
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
+    </startup>
+</configuration>

BIN
Demo/Examples/Samples/OutlineTest/VB/ComPDFKit_Logo.ico


+ 0 - 0
Demo/Examples/Samples/OutlineTest/VB/My Project/Application.Designer.vb


Some files were not shown because too many files changed in this diff