Parcourir la source

compdfkit(demo) - stash annotation

liuaoran il y a 1 an
Parent
commit
b710954500
43 fichiers modifiés avec 1929 ajouts et 27 suppressions
  1. 266 0
      Demo/Examples/Examlpes.sln
  2. 3 0
      Demo/Examples/PDFViewer/MainPage.xaml.cs
  3. 86 0
      Demo/Examples/Samples/AnnotationImportExportTest/AnnotationImportExportTest.cs
  4. 90 0
      Demo/Examples/Samples/AnnotationImportExportTest/AnnotationImportExportTest.csproj
  5. 6 0
      Demo/Examples/Samples/AnnotationImportExportTest/App.config
  6. 36 0
      Demo/Examples/Samples/AnnotationImportExportTest/Properties/AssemblyInfo.cs
  7. 4 0
      Demo/Examples/Samples/AnnotationImportExportTest/packages.config
  8. 67 0
      Demo/Examples/Samples/AnnotationTest/AnnotationTest.cs
  9. 82 0
      Demo/Examples/Samples/AnnotationTest/AnnotationTest.csproj
  10. 6 0
      Demo/Examples/Samples/AnnotationTest/App.config
  11. 36 0
      Demo/Examples/Samples/AnnotationTest/Properties/AssemblyInfo.cs
  12. 4 0
      Demo/Examples/Samples/AnnotationTest/packages.config
  13. 6 0
      Demo/Examples/Samples/BackgroundTest/App.config
  14. 173 0
      Demo/Examples/Samples/BackgroundTest/BackgroundTest.cs
  15. 95 0
      Demo/Examples/Samples/BackgroundTest/BackgroundTest.csproj
  16. 36 0
      Demo/Examples/Samples/BackgroundTest/Properties/AssemblyInfo.cs
  17. 4 0
      Demo/Examples/Samples/BackgroundTest/packages.config
  18. 6 0
      Demo/Examples/Samples/DocumentInfoTest/App.config
  19. 97 0
      Demo/Examples/Samples/DocumentInfoTest/DocumentInfoTest.cs
  20. 82 0
      Demo/Examples/Samples/DocumentInfoTest/DocumentInfoTest.csproj
  21. 36 0
      Demo/Examples/Samples/DocumentInfoTest/Properties/AssemblyInfo.cs
  22. 4 0
      Demo/Examples/Samples/DocumentInfoTest/packages.config
  23. 37 14
      Demo/Examples/Samples/OutlineTest/OutlineTest.cs
  24. 10 6
      Demo/Examples/Samples/OutlineTest/OutlineTest.csproj
  25. 4 4
      Demo/Examples/Samples/PDFRedactTest/PDFRedactTest.cs
  26. 34 3
      Demo/Examples/Samples/PDFToImage/PDFToImage.cs
  27. 2 0
      Demo/Examples/Samples/PDFToImage/PDFToImageTest.csproj
  28. 6 0
      Demo/Examples/Samples/TextSearchTest/App.config
  29. 36 0
      Demo/Examples/Samples/TextSearchTest/Properties/AssemblyInfo.cs
  30. 92 0
      Demo/Examples/Samples/TextSearchTest/TextSearch.cs
  31. 83 0
      Demo/Examples/Samples/TextSearchTest/TextSearchTest.csproj
  32. 4 0
      Demo/Examples/Samples/TextSearchTest/packages.config
  33. 6 0
      Demo/Examples/Samples/WatermarkTest/App.config
  34. 36 0
      Demo/Examples/Samples/WatermarkTest/Properties/AssemblyInfo.cs
  35. 158 0
      Demo/Examples/Samples/WatermarkTest/WatermarkTest.cs
  36. 93 0
      Demo/Examples/Samples/WatermarkTest/WatermarkTest.csproj
  37. 4 0
      Demo/Examples/Samples/WatermarkTest/packages.config
  38. 99 0
      Demo/Examples/TestFile/Annotations.xfdf
  39. BIN
      Demo/Examples/TestFile/ColorBackground.pdf
  40. BIN
      Demo/Examples/TestFile/FourOutline.pdf
  41. BIN
      Demo/Examples/TestFile/ImageBackground.pdf
  42. BIN
      Demo/Examples/TestFile/Watermark.pdf
  43. BIN
      Demo/Examples/TestFile/logo.png

+ 266 - 0
Demo/Examples/Examlpes.sln

@@ -46,84 +46,344 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PDFToImageTest", "Samples\P
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OutlineTest", "Samples\OutlineTest\OutlineTest.csproj", "{7323B63A-6073-4A22-82F5-29023702F2C1}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComPDFKit.Viewer", "..\..\..\compdfkit\ComPDFKit\ComPDFKitDesktop\ComPDFKit.Viewer\ComPDFKit.Viewer.csproj", "{18EC356D-8130-49D4-B4E6-AC290E1065B7}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComPDFKit.Desk", "..\..\..\compdfkit\ComPDFKit\ComPDFKitCSharp\ComPDFKit.Desk.csproj", "{56E518AD-C126-4B48-9A09-0A64C87020E4}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DocumentInfoTest", "Samples\DocumentInfoTest\DocumentInfoTest.csproj", "{274E1BD3-627D-46BC-8281-5440D7703EBF}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WatermarkTest", "Samples\WatermarkTest\WatermarkTest.csproj", "{8E440DCB-FCBC-4308-AB3D-50C38D017A40}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BackgroundTest", "Samples\BackgroundTest\BackgroundTest.csproj", "{0C6D494A-036A-4CB6-AB07-61D8AC8C70CB}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AnnotationTest", "Samples\AnnotationTest\AnnotationTest.csproj", "{ED8A0C73-FA4E-4FAC-93F7-27C67A940628}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TextSearchTest", "Samples\TextSearchTest\TextSearchTest.csproj", "{DD2E08EE-0E64-4AB9-B8DC-03DE7E8B4E04}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AnnotationImportExportTest", "Samples\AnnotationImportExportTest\AnnotationImportExportTest.csproj", "{E2693237-D8F2-4E1C-B3C3-0B3ACFB73728}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
+		Debug|x64 = Debug|x64
+		Debug|x86 = Debug|x86
 		Release|Any CPU = Release|Any CPU
+		Release|x64 = Release|x64
+		Release|x86 = Release|x86
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 		{A25DD47F-1FDF-48A1-8D0E-8CFF2C066A74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{A25DD47F-1FDF-48A1-8D0E-8CFF2C066A74}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{A25DD47F-1FDF-48A1-8D0E-8CFF2C066A74}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{A25DD47F-1FDF-48A1-8D0E-8CFF2C066A74}.Debug|x64.Build.0 = Debug|Any CPU
+		{A25DD47F-1FDF-48A1-8D0E-8CFF2C066A74}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{A25DD47F-1FDF-48A1-8D0E-8CFF2C066A74}.Debug|x86.Build.0 = Debug|Any CPU
 		{A25DD47F-1FDF-48A1-8D0E-8CFF2C066A74}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{A25DD47F-1FDF-48A1-8D0E-8CFF2C066A74}.Release|Any CPU.Build.0 = Release|Any CPU
+		{A25DD47F-1FDF-48A1-8D0E-8CFF2C066A74}.Release|x64.ActiveCfg = Release|Any CPU
+		{A25DD47F-1FDF-48A1-8D0E-8CFF2C066A74}.Release|x64.Build.0 = Release|Any CPU
+		{A25DD47F-1FDF-48A1-8D0E-8CFF2C066A74}.Release|x86.ActiveCfg = Release|Any CPU
+		{A25DD47F-1FDF-48A1-8D0E-8CFF2C066A74}.Release|x86.Build.0 = Release|Any CPU
 		{03BC0C60-9D99-41D5-8116-F2516CBFCE54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{03BC0C60-9D99-41D5-8116-F2516CBFCE54}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{03BC0C60-9D99-41D5-8116-F2516CBFCE54}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{03BC0C60-9D99-41D5-8116-F2516CBFCE54}.Debug|x64.Build.0 = Debug|Any CPU
+		{03BC0C60-9D99-41D5-8116-F2516CBFCE54}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{03BC0C60-9D99-41D5-8116-F2516CBFCE54}.Debug|x86.Build.0 = Debug|Any CPU
 		{03BC0C60-9D99-41D5-8116-F2516CBFCE54}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{03BC0C60-9D99-41D5-8116-F2516CBFCE54}.Release|Any CPU.Build.0 = Release|Any CPU
+		{03BC0C60-9D99-41D5-8116-F2516CBFCE54}.Release|x64.ActiveCfg = Release|Any CPU
+		{03BC0C60-9D99-41D5-8116-F2516CBFCE54}.Release|x64.Build.0 = Release|Any CPU
+		{03BC0C60-9D99-41D5-8116-F2516CBFCE54}.Release|x86.ActiveCfg = Release|Any CPU
+		{03BC0C60-9D99-41D5-8116-F2516CBFCE54}.Release|x86.Build.0 = Release|Any CPU
 		{0F35ACB7-E10B-4AAE-AA77-88E4602C3EFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{0F35ACB7-E10B-4AAE-AA77-88E4602C3EFB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{0F35ACB7-E10B-4AAE-AA77-88E4602C3EFB}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{0F35ACB7-E10B-4AAE-AA77-88E4602C3EFB}.Debug|x64.Build.0 = Debug|Any CPU
+		{0F35ACB7-E10B-4AAE-AA77-88E4602C3EFB}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{0F35ACB7-E10B-4AAE-AA77-88E4602C3EFB}.Debug|x86.Build.0 = Debug|Any CPU
 		{0F35ACB7-E10B-4AAE-AA77-88E4602C3EFB}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{0F35ACB7-E10B-4AAE-AA77-88E4602C3EFB}.Release|Any CPU.Build.0 = Release|Any CPU
+		{0F35ACB7-E10B-4AAE-AA77-88E4602C3EFB}.Release|x64.ActiveCfg = Release|Any CPU
+		{0F35ACB7-E10B-4AAE-AA77-88E4602C3EFB}.Release|x64.Build.0 = Release|Any CPU
+		{0F35ACB7-E10B-4AAE-AA77-88E4602C3EFB}.Release|x86.ActiveCfg = Release|Any CPU
+		{0F35ACB7-E10B-4AAE-AA77-88E4602C3EFB}.Release|x86.Build.0 = Release|Any CPU
 		{018AF31A-EDFB-42B1-A9DF-ECF950CA62B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{018AF31A-EDFB-42B1-A9DF-ECF950CA62B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{018AF31A-EDFB-42B1-A9DF-ECF950CA62B1}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{018AF31A-EDFB-42B1-A9DF-ECF950CA62B1}.Debug|x64.Build.0 = Debug|Any CPU
+		{018AF31A-EDFB-42B1-A9DF-ECF950CA62B1}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{018AF31A-EDFB-42B1-A9DF-ECF950CA62B1}.Debug|x86.Build.0 = Debug|Any CPU
 		{018AF31A-EDFB-42B1-A9DF-ECF950CA62B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{018AF31A-EDFB-42B1-A9DF-ECF950CA62B1}.Release|Any CPU.Build.0 = Release|Any CPU
+		{018AF31A-EDFB-42B1-A9DF-ECF950CA62B1}.Release|x64.ActiveCfg = Release|Any CPU
+		{018AF31A-EDFB-42B1-A9DF-ECF950CA62B1}.Release|x64.Build.0 = Release|Any CPU
+		{018AF31A-EDFB-42B1-A9DF-ECF950CA62B1}.Release|x86.ActiveCfg = Release|Any CPU
+		{018AF31A-EDFB-42B1-A9DF-ECF950CA62B1}.Release|x86.Build.0 = Release|Any CPU
 		{F7A2B42C-55CC-4E48-A4DC-5E3239F23203}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{F7A2B42C-55CC-4E48-A4DC-5E3239F23203}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{F7A2B42C-55CC-4E48-A4DC-5E3239F23203}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{F7A2B42C-55CC-4E48-A4DC-5E3239F23203}.Debug|x64.Build.0 = Debug|Any CPU
+		{F7A2B42C-55CC-4E48-A4DC-5E3239F23203}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{F7A2B42C-55CC-4E48-A4DC-5E3239F23203}.Debug|x86.Build.0 = Debug|Any CPU
 		{F7A2B42C-55CC-4E48-A4DC-5E3239F23203}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{F7A2B42C-55CC-4E48-A4DC-5E3239F23203}.Release|Any CPU.Build.0 = Release|Any CPU
+		{F7A2B42C-55CC-4E48-A4DC-5E3239F23203}.Release|x64.ActiveCfg = Release|Any CPU
+		{F7A2B42C-55CC-4E48-A4DC-5E3239F23203}.Release|x64.Build.0 = Release|Any CPU
+		{F7A2B42C-55CC-4E48-A4DC-5E3239F23203}.Release|x86.ActiveCfg = Release|Any CPU
+		{F7A2B42C-55CC-4E48-A4DC-5E3239F23203}.Release|x86.Build.0 = Release|Any CPU
 		{9363BCB1-3A67-446A-8093-5708B86BF418}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{9363BCB1-3A67-446A-8093-5708B86BF418}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{9363BCB1-3A67-446A-8093-5708B86BF418}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{9363BCB1-3A67-446A-8093-5708B86BF418}.Debug|x64.Build.0 = Debug|Any CPU
+		{9363BCB1-3A67-446A-8093-5708B86BF418}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{9363BCB1-3A67-446A-8093-5708B86BF418}.Debug|x86.Build.0 = Debug|Any CPU
 		{9363BCB1-3A67-446A-8093-5708B86BF418}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{9363BCB1-3A67-446A-8093-5708B86BF418}.Release|Any CPU.Build.0 = Release|Any CPU
+		{9363BCB1-3A67-446A-8093-5708B86BF418}.Release|x64.ActiveCfg = Release|Any CPU
+		{9363BCB1-3A67-446A-8093-5708B86BF418}.Release|x64.Build.0 = Release|Any CPU
+		{9363BCB1-3A67-446A-8093-5708B86BF418}.Release|x86.ActiveCfg = Release|Any CPU
+		{9363BCB1-3A67-446A-8093-5708B86BF418}.Release|x86.Build.0 = Release|Any CPU
 		{807EE747-34A1-4E03-8B72-9E9F6C3BB002}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{807EE747-34A1-4E03-8B72-9E9F6C3BB002}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{807EE747-34A1-4E03-8B72-9E9F6C3BB002}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{807EE747-34A1-4E03-8B72-9E9F6C3BB002}.Debug|x64.Build.0 = Debug|Any CPU
+		{807EE747-34A1-4E03-8B72-9E9F6C3BB002}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{807EE747-34A1-4E03-8B72-9E9F6C3BB002}.Debug|x86.Build.0 = Debug|Any CPU
 		{807EE747-34A1-4E03-8B72-9E9F6C3BB002}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{807EE747-34A1-4E03-8B72-9E9F6C3BB002}.Release|Any CPU.Build.0 = Release|Any CPU
+		{807EE747-34A1-4E03-8B72-9E9F6C3BB002}.Release|x64.ActiveCfg = Release|Any CPU
+		{807EE747-34A1-4E03-8B72-9E9F6C3BB002}.Release|x64.Build.0 = Release|Any CPU
+		{807EE747-34A1-4E03-8B72-9E9F6C3BB002}.Release|x86.ActiveCfg = Release|Any CPU
+		{807EE747-34A1-4E03-8B72-9E9F6C3BB002}.Release|x86.Build.0 = Release|Any CPU
 		{5AF53BD9-A085-4550-8F78-98CCFFFDCDA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{5AF53BD9-A085-4550-8F78-98CCFFFDCDA9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{5AF53BD9-A085-4550-8F78-98CCFFFDCDA9}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{5AF53BD9-A085-4550-8F78-98CCFFFDCDA9}.Debug|x64.Build.0 = Debug|Any CPU
+		{5AF53BD9-A085-4550-8F78-98CCFFFDCDA9}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{5AF53BD9-A085-4550-8F78-98CCFFFDCDA9}.Debug|x86.Build.0 = Debug|Any CPU
 		{5AF53BD9-A085-4550-8F78-98CCFFFDCDA9}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{5AF53BD9-A085-4550-8F78-98CCFFFDCDA9}.Release|Any CPU.Build.0 = Release|Any CPU
+		{5AF53BD9-A085-4550-8F78-98CCFFFDCDA9}.Release|x64.ActiveCfg = Release|Any CPU
+		{5AF53BD9-A085-4550-8F78-98CCFFFDCDA9}.Release|x64.Build.0 = Release|Any CPU
+		{5AF53BD9-A085-4550-8F78-98CCFFFDCDA9}.Release|x86.ActiveCfg = Release|Any CPU
+		{5AF53BD9-A085-4550-8F78-98CCFFFDCDA9}.Release|x86.Build.0 = Release|Any CPU
 		{5CE5B624-B2B8-479C-8842-B70591B01124}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{5CE5B624-B2B8-479C-8842-B70591B01124}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{5CE5B624-B2B8-479C-8842-B70591B01124}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{5CE5B624-B2B8-479C-8842-B70591B01124}.Debug|x64.Build.0 = Debug|Any CPU
+		{5CE5B624-B2B8-479C-8842-B70591B01124}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{5CE5B624-B2B8-479C-8842-B70591B01124}.Debug|x86.Build.0 = Debug|Any CPU
 		{5CE5B624-B2B8-479C-8842-B70591B01124}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{5CE5B624-B2B8-479C-8842-B70591B01124}.Release|Any CPU.Build.0 = Release|Any CPU
+		{5CE5B624-B2B8-479C-8842-B70591B01124}.Release|x64.ActiveCfg = Release|Any CPU
+		{5CE5B624-B2B8-479C-8842-B70591B01124}.Release|x64.Build.0 = Release|Any CPU
+		{5CE5B624-B2B8-479C-8842-B70591B01124}.Release|x86.ActiveCfg = Release|Any CPU
+		{5CE5B624-B2B8-479C-8842-B70591B01124}.Release|x86.Build.0 = Release|Any CPU
 		{B18AD53B-9550-489B-A814-E2783D865D9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{B18AD53B-9550-489B-A814-E2783D865D9C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{B18AD53B-9550-489B-A814-E2783D865D9C}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{B18AD53B-9550-489B-A814-E2783D865D9C}.Debug|x64.Build.0 = Debug|Any CPU
+		{B18AD53B-9550-489B-A814-E2783D865D9C}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{B18AD53B-9550-489B-A814-E2783D865D9C}.Debug|x86.Build.0 = Debug|Any CPU
 		{B18AD53B-9550-489B-A814-E2783D865D9C}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{B18AD53B-9550-489B-A814-E2783D865D9C}.Release|Any CPU.Build.0 = Release|Any CPU
+		{B18AD53B-9550-489B-A814-E2783D865D9C}.Release|x64.ActiveCfg = Release|Any CPU
+		{B18AD53B-9550-489B-A814-E2783D865D9C}.Release|x64.Build.0 = Release|Any CPU
+		{B18AD53B-9550-489B-A814-E2783D865D9C}.Release|x86.ActiveCfg = Release|Any CPU
+		{B18AD53B-9550-489B-A814-E2783D865D9C}.Release|x86.Build.0 = Release|Any CPU
 		{463C349B-D895-4191-B1FD-C507B16B6A8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{463C349B-D895-4191-B1FD-C507B16B6A8C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{463C349B-D895-4191-B1FD-C507B16B6A8C}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{463C349B-D895-4191-B1FD-C507B16B6A8C}.Debug|x64.Build.0 = Debug|Any CPU
+		{463C349B-D895-4191-B1FD-C507B16B6A8C}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{463C349B-D895-4191-B1FD-C507B16B6A8C}.Debug|x86.Build.0 = Debug|Any CPU
 		{463C349B-D895-4191-B1FD-C507B16B6A8C}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{463C349B-D895-4191-B1FD-C507B16B6A8C}.Release|Any CPU.Build.0 = Release|Any CPU
+		{463C349B-D895-4191-B1FD-C507B16B6A8C}.Release|x64.ActiveCfg = Release|Any CPU
+		{463C349B-D895-4191-B1FD-C507B16B6A8C}.Release|x64.Build.0 = Release|Any CPU
+		{463C349B-D895-4191-B1FD-C507B16B6A8C}.Release|x86.ActiveCfg = Release|Any CPU
+		{463C349B-D895-4191-B1FD-C507B16B6A8C}.Release|x86.Build.0 = Release|Any CPU
 		{34BE4547-F57E-473C-A4D9-2EFEDAC6B87E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{34BE4547-F57E-473C-A4D9-2EFEDAC6B87E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{34BE4547-F57E-473C-A4D9-2EFEDAC6B87E}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{34BE4547-F57E-473C-A4D9-2EFEDAC6B87E}.Debug|x64.Build.0 = Debug|Any CPU
+		{34BE4547-F57E-473C-A4D9-2EFEDAC6B87E}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{34BE4547-F57E-473C-A4D9-2EFEDAC6B87E}.Debug|x86.Build.0 = Debug|Any CPU
 		{34BE4547-F57E-473C-A4D9-2EFEDAC6B87E}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{34BE4547-F57E-473C-A4D9-2EFEDAC6B87E}.Release|Any CPU.Build.0 = Release|Any CPU
+		{34BE4547-F57E-473C-A4D9-2EFEDAC6B87E}.Release|x64.ActiveCfg = Release|Any CPU
+		{34BE4547-F57E-473C-A4D9-2EFEDAC6B87E}.Release|x64.Build.0 = Release|Any CPU
+		{34BE4547-F57E-473C-A4D9-2EFEDAC6B87E}.Release|x86.ActiveCfg = Release|Any CPU
+		{34BE4547-F57E-473C-A4D9-2EFEDAC6B87E}.Release|x86.Build.0 = Release|Any CPU
 		{D225EA72-F34A-4AC6-9016-91F99D30DB81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{D225EA72-F34A-4AC6-9016-91F99D30DB81}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{D225EA72-F34A-4AC6-9016-91F99D30DB81}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{D225EA72-F34A-4AC6-9016-91F99D30DB81}.Debug|x64.Build.0 = Debug|Any CPU
+		{D225EA72-F34A-4AC6-9016-91F99D30DB81}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{D225EA72-F34A-4AC6-9016-91F99D30DB81}.Debug|x86.Build.0 = Debug|Any CPU
 		{D225EA72-F34A-4AC6-9016-91F99D30DB81}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{D225EA72-F34A-4AC6-9016-91F99D30DB81}.Release|Any CPU.Build.0 = Release|Any CPU
+		{D225EA72-F34A-4AC6-9016-91F99D30DB81}.Release|x64.ActiveCfg = Release|Any CPU
+		{D225EA72-F34A-4AC6-9016-91F99D30DB81}.Release|x64.Build.0 = Release|Any CPU
+		{D225EA72-F34A-4AC6-9016-91F99D30DB81}.Release|x86.ActiveCfg = Release|Any CPU
+		{D225EA72-F34A-4AC6-9016-91F99D30DB81}.Release|x86.Build.0 = Release|Any CPU
 		{26E617CD-C1D7-4EC2-AC9F-E3F4546B2202}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{26E617CD-C1D7-4EC2-AC9F-E3F4546B2202}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{26E617CD-C1D7-4EC2-AC9F-E3F4546B2202}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{26E617CD-C1D7-4EC2-AC9F-E3F4546B2202}.Debug|x64.Build.0 = Debug|Any CPU
+		{26E617CD-C1D7-4EC2-AC9F-E3F4546B2202}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{26E617CD-C1D7-4EC2-AC9F-E3F4546B2202}.Debug|x86.Build.0 = Debug|Any CPU
 		{26E617CD-C1D7-4EC2-AC9F-E3F4546B2202}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{26E617CD-C1D7-4EC2-AC9F-E3F4546B2202}.Release|Any CPU.Build.0 = Release|Any CPU
+		{26E617CD-C1D7-4EC2-AC9F-E3F4546B2202}.Release|x64.ActiveCfg = Release|Any CPU
+		{26E617CD-C1D7-4EC2-AC9F-E3F4546B2202}.Release|x64.Build.0 = Release|Any CPU
+		{26E617CD-C1D7-4EC2-AC9F-E3F4546B2202}.Release|x86.ActiveCfg = Release|Any CPU
+		{26E617CD-C1D7-4EC2-AC9F-E3F4546B2202}.Release|x86.Build.0 = Release|Any CPU
 		{DEAF0496-2E3D-4A76-B24E-0E672B21ED3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{DEAF0496-2E3D-4A76-B24E-0E672B21ED3F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{DEAF0496-2E3D-4A76-B24E-0E672B21ED3F}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{DEAF0496-2E3D-4A76-B24E-0E672B21ED3F}.Debug|x64.Build.0 = Debug|Any CPU
+		{DEAF0496-2E3D-4A76-B24E-0E672B21ED3F}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{DEAF0496-2E3D-4A76-B24E-0E672B21ED3F}.Debug|x86.Build.0 = Debug|Any CPU
 		{DEAF0496-2E3D-4A76-B24E-0E672B21ED3F}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{DEAF0496-2E3D-4A76-B24E-0E672B21ED3F}.Release|Any CPU.Build.0 = Release|Any CPU
+		{DEAF0496-2E3D-4A76-B24E-0E672B21ED3F}.Release|x64.ActiveCfg = Release|Any CPU
+		{DEAF0496-2E3D-4A76-B24E-0E672B21ED3F}.Release|x64.Build.0 = Release|Any CPU
+		{DEAF0496-2E3D-4A76-B24E-0E672B21ED3F}.Release|x86.ActiveCfg = Release|Any CPU
+		{DEAF0496-2E3D-4A76-B24E-0E672B21ED3F}.Release|x86.Build.0 = Release|Any CPU
 		{B776A04B-C674-4A8B-88FC-2431034E8F78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{B776A04B-C674-4A8B-88FC-2431034E8F78}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{B776A04B-C674-4A8B-88FC-2431034E8F78}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{B776A04B-C674-4A8B-88FC-2431034E8F78}.Debug|x64.Build.0 = Debug|Any CPU
+		{B776A04B-C674-4A8B-88FC-2431034E8F78}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{B776A04B-C674-4A8B-88FC-2431034E8F78}.Debug|x86.Build.0 = Debug|Any CPU
 		{B776A04B-C674-4A8B-88FC-2431034E8F78}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{B776A04B-C674-4A8B-88FC-2431034E8F78}.Release|Any CPU.Build.0 = Release|Any CPU
+		{B776A04B-C674-4A8B-88FC-2431034E8F78}.Release|x64.ActiveCfg = Release|Any CPU
+		{B776A04B-C674-4A8B-88FC-2431034E8F78}.Release|x64.Build.0 = Release|Any CPU
+		{B776A04B-C674-4A8B-88FC-2431034E8F78}.Release|x86.ActiveCfg = Release|Any CPU
+		{B776A04B-C674-4A8B-88FC-2431034E8F78}.Release|x86.Build.0 = Release|Any CPU
 		{82A11207-3CA9-47D2-9F1C-94FE057DABFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{82A11207-3CA9-47D2-9F1C-94FE057DABFE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{82A11207-3CA9-47D2-9F1C-94FE057DABFE}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{82A11207-3CA9-47D2-9F1C-94FE057DABFE}.Debug|x64.Build.0 = Debug|Any CPU
+		{82A11207-3CA9-47D2-9F1C-94FE057DABFE}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{82A11207-3CA9-47D2-9F1C-94FE057DABFE}.Debug|x86.Build.0 = Debug|Any CPU
 		{82A11207-3CA9-47D2-9F1C-94FE057DABFE}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{82A11207-3CA9-47D2-9F1C-94FE057DABFE}.Release|Any CPU.Build.0 = Release|Any CPU
+		{82A11207-3CA9-47D2-9F1C-94FE057DABFE}.Release|x64.ActiveCfg = Release|Any CPU
+		{82A11207-3CA9-47D2-9F1C-94FE057DABFE}.Release|x64.Build.0 = Release|Any CPU
+		{82A11207-3CA9-47D2-9F1C-94FE057DABFE}.Release|x86.ActiveCfg = Release|Any CPU
+		{82A11207-3CA9-47D2-9F1C-94FE057DABFE}.Release|x86.Build.0 = Release|Any CPU
 		{7323B63A-6073-4A22-82F5-29023702F2C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{7323B63A-6073-4A22-82F5-29023702F2C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{7323B63A-6073-4A22-82F5-29023702F2C1}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{7323B63A-6073-4A22-82F5-29023702F2C1}.Debug|x64.Build.0 = Debug|Any CPU
+		{7323B63A-6073-4A22-82F5-29023702F2C1}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{7323B63A-6073-4A22-82F5-29023702F2C1}.Debug|x86.Build.0 = Debug|Any CPU
 		{7323B63A-6073-4A22-82F5-29023702F2C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{7323B63A-6073-4A22-82F5-29023702F2C1}.Release|Any CPU.Build.0 = Release|Any CPU
+		{7323B63A-6073-4A22-82F5-29023702F2C1}.Release|x64.ActiveCfg = Release|Any CPU
+		{7323B63A-6073-4A22-82F5-29023702F2C1}.Release|x64.Build.0 = Release|Any CPU
+		{7323B63A-6073-4A22-82F5-29023702F2C1}.Release|x86.ActiveCfg = Release|Any CPU
+		{7323B63A-6073-4A22-82F5-29023702F2C1}.Release|x86.Build.0 = Release|Any CPU
+		{18EC356D-8130-49D4-B4E6-AC290E1065B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{18EC356D-8130-49D4-B4E6-AC290E1065B7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{18EC356D-8130-49D4-B4E6-AC290E1065B7}.Debug|x64.ActiveCfg = Debug|x64
+		{18EC356D-8130-49D4-B4E6-AC290E1065B7}.Debug|x64.Build.0 = Debug|x64
+		{18EC356D-8130-49D4-B4E6-AC290E1065B7}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{18EC356D-8130-49D4-B4E6-AC290E1065B7}.Debug|x86.Build.0 = Debug|Any CPU
+		{18EC356D-8130-49D4-B4E6-AC290E1065B7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{18EC356D-8130-49D4-B4E6-AC290E1065B7}.Release|Any CPU.Build.0 = Release|Any CPU
+		{18EC356D-8130-49D4-B4E6-AC290E1065B7}.Release|x64.ActiveCfg = Release|x64
+		{18EC356D-8130-49D4-B4E6-AC290E1065B7}.Release|x64.Build.0 = Release|x64
+		{18EC356D-8130-49D4-B4E6-AC290E1065B7}.Release|x86.ActiveCfg = Release|Any CPU
+		{18EC356D-8130-49D4-B4E6-AC290E1065B7}.Release|x86.Build.0 = Release|Any CPU
+		{56E518AD-C126-4B48-9A09-0A64C87020E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{56E518AD-C126-4B48-9A09-0A64C87020E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{56E518AD-C126-4B48-9A09-0A64C87020E4}.Debug|x64.ActiveCfg = Debug|x64
+		{56E518AD-C126-4B48-9A09-0A64C87020E4}.Debug|x64.Build.0 = Debug|x64
+		{56E518AD-C126-4B48-9A09-0A64C87020E4}.Debug|x86.ActiveCfg = Debug|x86
+		{56E518AD-C126-4B48-9A09-0A64C87020E4}.Debug|x86.Build.0 = Debug|x86
+		{56E518AD-C126-4B48-9A09-0A64C87020E4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{56E518AD-C126-4B48-9A09-0A64C87020E4}.Release|Any CPU.Build.0 = Release|Any CPU
+		{56E518AD-C126-4B48-9A09-0A64C87020E4}.Release|x64.ActiveCfg = Release|x64
+		{56E518AD-C126-4B48-9A09-0A64C87020E4}.Release|x64.Build.0 = Release|x64
+		{56E518AD-C126-4B48-9A09-0A64C87020E4}.Release|x86.ActiveCfg = Release|x86
+		{56E518AD-C126-4B48-9A09-0A64C87020E4}.Release|x86.Build.0 = Release|x86
+		{274E1BD3-627D-46BC-8281-5440D7703EBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{274E1BD3-627D-46BC-8281-5440D7703EBF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{274E1BD3-627D-46BC-8281-5440D7703EBF}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{274E1BD3-627D-46BC-8281-5440D7703EBF}.Debug|x64.Build.0 = Debug|Any CPU
+		{274E1BD3-627D-46BC-8281-5440D7703EBF}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{274E1BD3-627D-46BC-8281-5440D7703EBF}.Debug|x86.Build.0 = Debug|Any CPU
+		{274E1BD3-627D-46BC-8281-5440D7703EBF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{274E1BD3-627D-46BC-8281-5440D7703EBF}.Release|Any CPU.Build.0 = Release|Any CPU
+		{274E1BD3-627D-46BC-8281-5440D7703EBF}.Release|x64.ActiveCfg = Release|Any CPU
+		{274E1BD3-627D-46BC-8281-5440D7703EBF}.Release|x64.Build.0 = Release|Any CPU
+		{274E1BD3-627D-46BC-8281-5440D7703EBF}.Release|x86.ActiveCfg = Release|Any CPU
+		{274E1BD3-627D-46BC-8281-5440D7703EBF}.Release|x86.Build.0 = Release|Any CPU
+		{8E440DCB-FCBC-4308-AB3D-50C38D017A40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{8E440DCB-FCBC-4308-AB3D-50C38D017A40}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{8E440DCB-FCBC-4308-AB3D-50C38D017A40}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{8E440DCB-FCBC-4308-AB3D-50C38D017A40}.Debug|x64.Build.0 = Debug|Any CPU
+		{8E440DCB-FCBC-4308-AB3D-50C38D017A40}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{8E440DCB-FCBC-4308-AB3D-50C38D017A40}.Debug|x86.Build.0 = Debug|Any CPU
+		{8E440DCB-FCBC-4308-AB3D-50C38D017A40}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{8E440DCB-FCBC-4308-AB3D-50C38D017A40}.Release|Any CPU.Build.0 = Release|Any CPU
+		{8E440DCB-FCBC-4308-AB3D-50C38D017A40}.Release|x64.ActiveCfg = Release|Any CPU
+		{8E440DCB-FCBC-4308-AB3D-50C38D017A40}.Release|x64.Build.0 = Release|Any CPU
+		{8E440DCB-FCBC-4308-AB3D-50C38D017A40}.Release|x86.ActiveCfg = Release|Any CPU
+		{8E440DCB-FCBC-4308-AB3D-50C38D017A40}.Release|x86.Build.0 = Release|Any CPU
+		{0C6D494A-036A-4CB6-AB07-61D8AC8C70CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{0C6D494A-036A-4CB6-AB07-61D8AC8C70CB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{0C6D494A-036A-4CB6-AB07-61D8AC8C70CB}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{0C6D494A-036A-4CB6-AB07-61D8AC8C70CB}.Debug|x64.Build.0 = Debug|Any CPU
+		{0C6D494A-036A-4CB6-AB07-61D8AC8C70CB}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{0C6D494A-036A-4CB6-AB07-61D8AC8C70CB}.Debug|x86.Build.0 = Debug|Any CPU
+		{0C6D494A-036A-4CB6-AB07-61D8AC8C70CB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{0C6D494A-036A-4CB6-AB07-61D8AC8C70CB}.Release|Any CPU.Build.0 = Release|Any CPU
+		{0C6D494A-036A-4CB6-AB07-61D8AC8C70CB}.Release|x64.ActiveCfg = Release|Any CPU
+		{0C6D494A-036A-4CB6-AB07-61D8AC8C70CB}.Release|x64.Build.0 = Release|Any CPU
+		{0C6D494A-036A-4CB6-AB07-61D8AC8C70CB}.Release|x86.ActiveCfg = Release|Any CPU
+		{0C6D494A-036A-4CB6-AB07-61D8AC8C70CB}.Release|x86.Build.0 = Release|Any CPU
+		{ED8A0C73-FA4E-4FAC-93F7-27C67A940628}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{ED8A0C73-FA4E-4FAC-93F7-27C67A940628}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{ED8A0C73-FA4E-4FAC-93F7-27C67A940628}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{ED8A0C73-FA4E-4FAC-93F7-27C67A940628}.Debug|x64.Build.0 = Debug|Any CPU
+		{ED8A0C73-FA4E-4FAC-93F7-27C67A940628}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{ED8A0C73-FA4E-4FAC-93F7-27C67A940628}.Debug|x86.Build.0 = Debug|Any CPU
+		{ED8A0C73-FA4E-4FAC-93F7-27C67A940628}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{ED8A0C73-FA4E-4FAC-93F7-27C67A940628}.Release|Any CPU.Build.0 = Release|Any CPU
+		{ED8A0C73-FA4E-4FAC-93F7-27C67A940628}.Release|x64.ActiveCfg = Release|Any CPU
+		{ED8A0C73-FA4E-4FAC-93F7-27C67A940628}.Release|x64.Build.0 = Release|Any CPU
+		{ED8A0C73-FA4E-4FAC-93F7-27C67A940628}.Release|x86.ActiveCfg = Release|Any CPU
+		{ED8A0C73-FA4E-4FAC-93F7-27C67A940628}.Release|x86.Build.0 = Release|Any CPU
+		{DD2E08EE-0E64-4AB9-B8DC-03DE7E8B4E04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{DD2E08EE-0E64-4AB9-B8DC-03DE7E8B4E04}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{DD2E08EE-0E64-4AB9-B8DC-03DE7E8B4E04}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{DD2E08EE-0E64-4AB9-B8DC-03DE7E8B4E04}.Debug|x64.Build.0 = Debug|Any CPU
+		{DD2E08EE-0E64-4AB9-B8DC-03DE7E8B4E04}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{DD2E08EE-0E64-4AB9-B8DC-03DE7E8B4E04}.Debug|x86.Build.0 = Debug|Any CPU
+		{DD2E08EE-0E64-4AB9-B8DC-03DE7E8B4E04}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{DD2E08EE-0E64-4AB9-B8DC-03DE7E8B4E04}.Release|Any CPU.Build.0 = Release|Any CPU
+		{DD2E08EE-0E64-4AB9-B8DC-03DE7E8B4E04}.Release|x64.ActiveCfg = Release|Any CPU
+		{DD2E08EE-0E64-4AB9-B8DC-03DE7E8B4E04}.Release|x64.Build.0 = Release|Any CPU
+		{DD2E08EE-0E64-4AB9-B8DC-03DE7E8B4E04}.Release|x86.ActiveCfg = Release|Any CPU
+		{DD2E08EE-0E64-4AB9-B8DC-03DE7E8B4E04}.Release|x86.Build.0 = Release|Any CPU
+		{E2693237-D8F2-4E1C-B3C3-0B3ACFB73728}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{E2693237-D8F2-4E1C-B3C3-0B3ACFB73728}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{E2693237-D8F2-4E1C-B3C3-0B3ACFB73728}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{E2693237-D8F2-4E1C-B3C3-0B3ACFB73728}.Debug|x64.Build.0 = Debug|Any CPU
+		{E2693237-D8F2-4E1C-B3C3-0B3ACFB73728}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{E2693237-D8F2-4E1C-B3C3-0B3ACFB73728}.Debug|x86.Build.0 = Debug|Any CPU
+		{E2693237-D8F2-4E1C-B3C3-0B3ACFB73728}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{E2693237-D8F2-4E1C-B3C3-0B3ACFB73728}.Release|Any CPU.Build.0 = Release|Any CPU
+		{E2693237-D8F2-4E1C-B3C3-0B3ACFB73728}.Release|x64.ActiveCfg = Release|Any CPU
+		{E2693237-D8F2-4E1C-B3C3-0B3ACFB73728}.Release|x64.Build.0 = Release|Any CPU
+		{E2693237-D8F2-4E1C-B3C3-0B3ACFB73728}.Release|x86.ActiveCfg = Release|Any CPU
+		{E2693237-D8F2-4E1C-B3C3-0B3ACFB73728}.Release|x86.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -140,6 +400,12 @@ Global
 		{B776A04B-C674-4A8B-88FC-2431034E8F78} = {812D8275-2791-4CEF-A4E8-39A78E49D8FB}
 		{82A11207-3CA9-47D2-9F1C-94FE057DABFE} = {812D8275-2791-4CEF-A4E8-39A78E49D8FB}
 		{7323B63A-6073-4A22-82F5-29023702F2C1} = {812D8275-2791-4CEF-A4E8-39A78E49D8FB}
+		{274E1BD3-627D-46BC-8281-5440D7703EBF} = {812D8275-2791-4CEF-A4E8-39A78E49D8FB}
+		{8E440DCB-FCBC-4308-AB3D-50C38D017A40} = {812D8275-2791-4CEF-A4E8-39A78E49D8FB}
+		{0C6D494A-036A-4CB6-AB07-61D8AC8C70CB} = {812D8275-2791-4CEF-A4E8-39A78E49D8FB}
+		{ED8A0C73-FA4E-4FAC-93F7-27C67A940628} = {812D8275-2791-4CEF-A4E8-39A78E49D8FB}
+		{DD2E08EE-0E64-4AB9-B8DC-03DE7E8B4E04} = {812D8275-2791-4CEF-A4E8-39A78E49D8FB}
+		{E2693237-D8F2-4E1C-B3C3-0B3ACFB73728} = {812D8275-2791-4CEF-A4E8-39A78E49D8FB}
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
 		SolutionGuid = {8EE774F1-5FBF-482A-9A31-5ABDEC216DEF}

+ 3 - 0
Demo/Examples/PDFViewer/MainPage.xaml.cs

@@ -877,6 +877,9 @@ namespace PDFViewer
             ViewSettingBtn.IsChecked = false;
             PropertyContainer.Child = null;
             PropertyContainer.Visibility = Visibility.Collapsed;
+
+            ModeComboBox.SelectedIndex = 0;
+
         }
 
         /// <summary>

+ 86 - 0
Demo/Examples/Samples/AnnotationImportExportTest/AnnotationImportExportTest.cs

@@ -0,0 +1,86 @@
+using ComPDFKit.PDFDocument;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AnnotationImportExportTest
+{
+    internal class AnnotationImportExportTest
+    {
+        private static string outputPath = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory()))) + "\\Output\\AnnotationImportExportTest";
+        private static string tempPath = outputPath + "//temp";
+
+        static void Main(string[] args)
+        {
+            Console.WriteLine("Running header and footer test sample…\r\n");
+            SDKLicenseHelper.LicenseVerify();
+
+
+            if (!Directory.Exists(outputPath))
+            {
+                Directory.CreateDirectory(outputPath);
+            }
+            if (!Directory.Exists(tempPath))
+            {
+                Directory.CreateDirectory(tempPath);
+            }
+
+            CPDFDocument annotationsDocument = CPDFDocument.InitWithFilePath("Annotations.pdf"); 
+            if (ExportAnnotaiton(annotationsDocument))
+            {
+                Console.WriteLine("Export annotaiton done.");
+            }
+            else
+            {
+                Console.WriteLine("Export annotaiton failed.");
+            } 
+            Console.WriteLine("--------------------");
+
+            CPDFDocument document = CPDFDocument.InitWithFilePath("CommonFivePage.pdf");
+
+            if (ImportAnnotaiton(document))
+            {
+                Console.WriteLine("Import annotaiton done.");
+            }
+            else
+            {
+                Console.WriteLine("Import annotaiton failed.");
+            }
+            Console.WriteLine("--------------------");
+            Console.WriteLine("Done");
+            Console.WriteLine("--------------------");
+            Console.ReadLine();
+        }
+
+        static private bool ImportAnnotaiton(CPDFDocument document)
+        {
+            var path = outputPath + "//ImportAnnotationTest.pdf";
+
+            if (!document.ImportAnnotationFromXFDFPath("Annotations.xfdf", tempPath))
+            {
+                return false;
+            }
+            if (!document.WriteToFilePath(path))
+            {
+                return false;
+            }
+            Console.WriteLine("Browse the changed file in " + path); 
+            return true;
+        }
+
+        static private bool ExportAnnotaiton(CPDFDocument document)
+        {
+            var path = outputPath+ "//ExportAnnotationTest.xfdf";
+            if (document.ExportAnnotationToXFDFPath(path, tempPath)) 
+            {
+                return false;
+            }
+            Console.WriteLine("Xfdf file in " + path);
+
+            return true;
+        }
+    }
+}

+ 90 - 0
Demo/Examples/Samples/AnnotationImportExportTest/AnnotationImportExportTest.csproj

@@ -0,0 +1,90 @@
+<?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>{E2693237-D8F2-4E1C-B3C3-0B3ACFB73728}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>AnnotationImportExportTest</RootNamespace>
+    <AssemblyName>Viewer_ComPDFKit</AssemblyName>
+    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <Deterministic>true</Deterministic>
+    <NuGetPackageImportStamp>
+    </NuGetPackageImportStamp>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="ComPDFKit.Desk, Version=1.8.1.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\..\packages\ComPDFKit.NetFramework.1.9.0\lib\ComPDFKit.Desk.dll</HintPath>
+    </Reference>
+    <Reference Include="ComPDFKit.Viewer, Version=1.8.1.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\..\packages\ComPDFKit.NetFramework.1.9.0\lib\ComPDFKit.Viewer.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Net.Http" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="..\LicenseKey.cs">
+      <Link>LicenseKey.cs</Link>
+    </Compile>
+    <Compile Include="AnnotationImportExportTest.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\TestFile\Annotations.pdf">
+      <Link>Annotations.pdf</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="..\..\TestFile\Annotations.xfdf">
+      <Link>Annotations.xfdf</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="..\..\TestFile\CommonFivePage.pdf">
+      <Link>CommonFivePage.pdf</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="App.config" />
+    <None Include="packages.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\license_key_win.xml">
+      <Link>license_key_win.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <Import Project="..\..\packages\ComPDFKit.NetFramework.1.9.0\build\ComPDFKit.NetFramework.targets" Condition="Exists('..\..\packages\ComPDFKit.NetFramework.1.9.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>
+    </PropertyGroup>
+    <Error Condition="!Exists('..\..\packages\ComPDFKit.NetFramework.1.9.0\build\ComPDFKit.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\ComPDFKit.NetFramework.1.9.0\build\ComPDFKit.NetFramework.targets'))" />
+  </Target>
+</Project>

+ 6 - 0
Demo/Examples/Samples/AnnotationImportExportTest/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>

+ 36 - 0
Demo/Examples/Samples/AnnotationImportExportTest/Properties/AssemblyInfo.cs

@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("AnnotationImportExportTest")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("AnnotationImportExportTest")]
+[assembly: AssemblyCopyright("Copyright ©  2023")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components.  If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("e2693237-d8f2-4e1c-b3c3-0b3acfb73728")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 4 - 0
Demo/Examples/Samples/AnnotationImportExportTest/packages.config

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

+ 67 - 0
Demo/Examples/Samples/AnnotationTest/AnnotationTest.cs

@@ -0,0 +1,67 @@
+using ComPDFKit.Import;
+using ComPDFKit.PDFAnnotation;
+using ComPDFKit.PDFDocument;
+using ComPDFKit.PDFPage;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Xml.Linq;
+
+namespace AnnotationTest
+{
+    internal class AnnotationTest
+    {
+        static private string outputPath = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory()))) + "\\Output\\Background";
+
+        static void Main(string[] args)
+        {
+            Console.WriteLine("Running Watermark test sample…\r\n");
+            SDKLicenseHelper.LicenseVerify();
+            CPDFDocument document = CPDFDocument.InitWithFilePath("CommonFivePage.pdf");
+            if (!Directory.Exists(outputPath))
+            {
+                Directory.CreateDirectory(outputPath);
+            }
+
+            CreateTestAnnots(document);
+
+        }
+
+        static private void CreateFreetextAnnotation(CPDFDocument document)
+        {
+            CPDFPage page = document.PageAtIndex(0);
+
+            CPDFFreeTextAnnotation freeText = page.CreateAnnot(C_ANNOTATION_TYPE.C_ANNOTATION_FREETEXT) as CPDFFreeTextAnnotation;
+            freeText.SetContent("ComPDFKit");
+            freeText.SetRect(new CRect(0, 50, 50, 0));
+        }
+
+        static private void CreateFreehandAnnotation(CPDFDocument document)
+        {
+
+        }
+
+        static private void CreateShapeAnnotation(CPDFDocument document)
+        {
+
+        }
+
+        static private void CreateNoteAnnotation(CPDFDocument document)
+        {
+
+        }
+         
+        static private bool CreateTestAnnots(CPDFDocument document)
+        {
+            CreateFreetextAnnotation(document);
+            CreateFreehandAnnotation(document);
+            CreateShapeAnnotation(document);
+            CreateNoteAnnotation(document); 
+
+            return true;
+        }
+    }
+}

+ 82 - 0
Demo/Examples/Samples/AnnotationTest/AnnotationTest.csproj

@@ -0,0 +1,82 @@
+<?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>{ED8A0C73-FA4E-4FAC-93F7-27C67A940628}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>AnnotationTest</RootNamespace>
+    <AssemblyName>Viewer_ComPDFKit</AssemblyName>
+    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <Deterministic>true</Deterministic>
+    <NuGetPackageImportStamp>
+    </NuGetPackageImportStamp>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="ComPDFKit.Desk, Version=1.8.1.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\..\packages\ComPDFKit.NetFramework.1.9.0\lib\ComPDFKit.Desk.dll</HintPath>
+    </Reference>
+    <Reference Include="ComPDFKit.Viewer, Version=1.8.1.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\..\packages\ComPDFKit.NetFramework.1.9.0\lib\ComPDFKit.Viewer.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Net.Http" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="..\LicenseKey.cs">
+      <Link>LicenseKey.cs</Link>
+    </Compile>
+    <Compile Include="AnnotationTest.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\TestFile\CommonFivePage.pdf">
+      <Link>CommonFivePage.pdf</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="App.config" />
+    <None Include="packages.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\license_key_win.xml">
+      <Link>license_key_win.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <Import Project="..\..\packages\ComPDFKit.NetFramework.1.9.0\build\ComPDFKit.NetFramework.targets" Condition="Exists('..\..\packages\ComPDFKit.NetFramework.1.9.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>
+    </PropertyGroup>
+    <Error Condition="!Exists('..\..\packages\ComPDFKit.NetFramework.1.9.0\build\ComPDFKit.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\ComPDFKit.NetFramework.1.9.0\build\ComPDFKit.NetFramework.targets'))" />
+  </Target>
+</Project>

+ 6 - 0
Demo/Examples/Samples/AnnotationTest/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>

+ 36 - 0
Demo/Examples/Samples/AnnotationTest/Properties/AssemblyInfo.cs

@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("AnnotationTest")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("AnnotationTest")]
+[assembly: AssemblyCopyright("Copyright ©  2023")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components.  If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("ed8a0c73-fa4e-4fac-93f7-27c67a940628")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 4 - 0
Demo/Examples/Samples/AnnotationTest/packages.config

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

+ 6 - 0
Demo/Examples/Samples/BackgroundTest/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>

+ 173 - 0
Demo/Examples/Samples/BackgroundTest/BackgroundTest.cs

@@ -0,0 +1,173 @@
+using ComPDFKit.PDFDocument;
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Threading.Tasks;
+using System.Xml.Linq;
+
+namespace BackgroundTest
+{
+    internal class BackgroundTest
+    {
+        static private string outputPath = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory()))) + "\\Output\\Background";
+        static void Main(string[] args)
+        {
+            Console.WriteLine("Running Watermark test sample…\r\n");
+            SDKLicenseHelper.LicenseVerify();
+            CPDFDocument document = CPDFDocument.InitWithFilePath("CommonFivePage.pdf");
+            if (!Directory.Exists(outputPath))
+            {
+                Directory.CreateDirectory(outputPath);
+            }
+            if (AddColorBackground(document))
+            {
+                Console.WriteLine("Add color background done.");
+            }
+            else
+            {
+                Console.WriteLine("Add color background  failed.");
+            }
+
+            Console.WriteLine("--------------------");
+            document.Release();
+            document = CPDFDocument.InitWithFilePath("CommonFivePage.pdf");
+            if (AddImageBackground(document))
+            {
+                Console.WriteLine("Add image background done.");
+            }
+            else
+            {
+                Console.WriteLine("Add image background failed.");
+            }
+
+            Console.WriteLine("--------------------");
+
+            CPDFDocument colorBgDocument = CPDFDocument.InitWithFilePath("ColorBackground.pdf");
+            CPDFDocument imageBgDocument = CPDFDocument.InitWithFilePath("ImageBackground.pdf");
+
+            if (RemoveBackground(colorBgDocument, imageBgDocument))
+            {
+                Console.WriteLine("Remove background done.");
+            }
+            else
+            {
+                Console.WriteLine("Remove background failed.");
+            }
+            Console.WriteLine("--------------------");
+            Console.WriteLine("Done!");
+            Console.WriteLine("--------------------");
+            Console.ReadLine();
+        }
+
+        static private bool AddColorBackground(CPDFDocument document)
+        {
+            CPDFBackground background = document.GetBackground();
+            background.SetBackgroundType(C_Background_Type.BG_TYPE_COLOR);
+            background.SetColor(new byte[] { 255, 0, 0 });
+            background.SetOpacity(255);
+            background.SetScale(1);
+            background.SetRotation(0);
+            background.SetHorizalign(C_Background_Horizalign.BG_HORIZALIGN_CENTER);
+            background.SetVertalign(C_Background_Vertalign.BG_VERTALIGN_CENTER);
+            background.SetXOffset(0);
+            background.SetYOffset(0);
+            background.SetPages("0-2");
+            background.Update();
+            string path = outputPath + "\\AddColorBackgroundTest.pdf";
+            if (!document.WriteToFilePath(path))
+            {
+                return false;
+            }
+            Console.WriteLine("Browse the changed file in " + path);
+
+            return true;
+        }
+
+        public static byte[] BitmapToByteArray(Bitmap bitmap)
+        {
+
+            BitmapData bmpdata = null;
+
+            try
+            {
+                bmpdata = bitmap.LockBits(new Rectangle(0, 0, bitmap.Width, bitmap.Height), ImageLockMode.ReadOnly, bitmap.PixelFormat);
+                int numbytes = bmpdata.Stride * bitmap.Height;
+                byte[] bytedata = new byte[numbytes];
+                IntPtr ptr = bmpdata.Scan0;
+
+                Marshal.Copy(ptr, bytedata, 0, numbytes);
+
+                return bytedata;
+            }
+            finally
+            {
+                if (bmpdata != null)
+                    bitmap.UnlockBits(bmpdata);
+            }
+
+        }
+
+        static private bool AddImageBackground(CPDFDocument document)
+        {
+            CPDFBackground background = document.GetBackground();
+            background.SetBackgroundType(C_Background_Type.BG_TYPE_IMAGE);
+            Bitmap bitmap = new Bitmap("logo.png");
+            background.SetImage(BitmapToByteArray(bitmap), bitmap.Width, bitmap.Height, ComPDFKit.Import.C_Scale_Type.fitCenter);
+            background.SetOpacity(128);
+            background.SetScale(1);
+            background.SetRotation(1f);
+            background.SetHorizalign(C_Background_Horizalign.BG_HORIZALIGN_CENTER);
+            background.SetVertalign(C_Background_Vertalign.BG_VERTALIGN_CENTER);
+            background.SetXOffset(0);
+            background.SetYOffset(0);
+            background.SetPages("0-2");
+            background.Update();
+            string path = outputPath + "\\AddImageBackgroundTest.pdf";
+            if (!document.WriteToFilePath(path))
+            {
+                return false;
+            }
+            Console.WriteLine("Browse the changed file in " + path);
+
+            return true;
+        }
+
+        static private bool RemoveBackground(CPDFDocument colorBgDocument, CPDFDocument imageBgDocument)
+        {
+            CPDFBackground colorBackground = colorBgDocument.GetBackground();
+            if(colorBackground.GetBackgroundType() != C_Background_Type.BG_TYPE_COLOR)
+            {
+                return false;
+            } 
+
+            colorBackground.Clear();
+            string path1 = outputPath + "\\ClearColorBgTest.pdf";
+            if (!colorBgDocument.WriteToFilePath(path1))
+            {
+                return false;
+            }
+            Console.WriteLine("Browse the changed file in " + path1);
+
+            CPDFBackground imageBackground = imageBgDocument.GetBackground();
+            if(imageBackground.GetBackgroundType()!= C_Background_Type.BG_TYPE_IMAGE)
+            {
+                return false;
+            }
+
+            imageBackground.Clear();
+            string path2 = outputPath + "\\ClearImageBgTest.pdf";
+            if (!imageBgDocument.WriteToFilePath(path2))
+            {
+                return false;
+            }
+            Console.WriteLine("Browse the changed file in " + path2);
+
+            return true;
+        }
+    }
+}

+ 95 - 0
Demo/Examples/Samples/BackgroundTest/BackgroundTest.csproj

@@ -0,0 +1,95 @@
+<?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>{0C6D494A-036A-4CB6-AB07-61D8AC8C70CB}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>BackgroundTest</RootNamespace>
+    <AssemblyName>Viewer_ComPDFKit</AssemblyName>
+    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <Deterministic>true</Deterministic>
+    <NuGetPackageImportStamp>
+    </NuGetPackageImportStamp>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="ComPDFKit.Desk, Version=1.8.1.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\..\packages\ComPDFKit.NetFramework.1.9.0\lib\ComPDFKit.Desk.dll</HintPath>
+    </Reference>
+    <Reference Include="ComPDFKit.Viewer, Version=1.8.1.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\..\packages\ComPDFKit.NetFramework.1.9.0\lib\ComPDFKit.Viewer.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Net.Http" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="..\LicenseKey.cs">
+      <Link>LicenseKey.cs</Link>
+    </Compile>
+    <Compile Include="BackgroundTest.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\TestFile\ColorBackground.pdf">
+      <Link>ColorBackground.pdf</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="..\..\TestFile\ImageBackground.pdf">
+      <Link>ImageBackground.pdf</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="..\..\TestFile\CommonFivePage.pdf">
+      <Link>CommonFivePage.pdf</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="..\..\TestFile\logo.png">
+      <Link>logo.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="App.config" />
+    <None Include="packages.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\license_key_win.xml">
+      <Link>license_key_win.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <Import Project="..\..\packages\ComPDFKit.NetFramework.1.9.0\build\ComPDFKit.NetFramework.targets" Condition="Exists('..\..\packages\ComPDFKit.NetFramework.1.9.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>
+    </PropertyGroup>
+    <Error Condition="!Exists('..\..\packages\ComPDFKit.NetFramework.1.9.0\build\ComPDFKit.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\ComPDFKit.NetFramework.1.9.0\build\ComPDFKit.NetFramework.targets'))" />
+  </Target>
+</Project>

+ 36 - 0
Demo/Examples/Samples/BackgroundTest/Properties/AssemblyInfo.cs

@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("BackgroundTest")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("BackgroundTest")]
+[assembly: AssemblyCopyright("Copyright ©  2023")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components.  If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("0c6d494a-036a-4cb6-ab07-61d8ac8c70cb")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 4 - 0
Demo/Examples/Samples/BackgroundTest/packages.config

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

+ 6 - 0
Demo/Examples/Samples/DocumentInfoTest/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>

+ 97 - 0
Demo/Examples/Samples/DocumentInfoTest/DocumentInfoTest.cs

@@ -0,0 +1,97 @@
+using ComPDFKit.PDFDocument;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace DocumentInfoTest
+{
+    internal class DocumentInfoTest
+    {
+        static void Main(string[] args)
+        { 
+            Console.WriteLine("Running DocumentInfo test sample…\r\n");
+            SDKLicenseHelper.LicenseVerify();
+            CPDFDocument document = CPDFDocument.InitWithFilePath("CommonFivePage.pdf");
+            PrintDocumentInfo(document);
+
+            Console.WriteLine("--------------------");
+            Console.WriteLine("Done.");
+            Console.WriteLine("--------------------");
+
+            Console.ReadLine();
+        }
+
+        /// <summary>
+        /// Returns the file size based on the specified file path, with the smallest unit being bytes (B).
+        /// </summary>
+        /// <param name="filePath">The path to the file.</param>
+        /// <returns>
+        /// The calculated file size, with units in bytes (B), kilobytes (KB), megabytes (MB), or gigabytes (GB).
+        /// </returns>
+        public static string GetFileSize(string filePath)
+        {
+            FileInfo fileInfo = null;
+            try
+            {
+                fileInfo = new FileInfo(filePath);
+            }
+            catch
+            {
+                return "0B";
+            }
+            if (fileInfo != null && fileInfo.Exists)
+            {
+                double fileSize = fileInfo.Length;
+                if (fileSize > 1024)
+                {
+                    fileSize = Math.Round(fileSize / 1024, 2);
+                    if (fileSize > 1024)
+                    {
+                        fileSize = Math.Round(fileSize / 1024, 2);
+                        if (fileSize > 1024)
+                        {
+                            fileSize = Math.Round(fileSize / 1024, 2);
+                            return fileSize + " GB";
+                        }
+                        else
+                        {
+                            return fileSize + " MB";
+                        }
+                    }
+                    else
+                    {
+                        return fileSize + " KB";
+                    }
+                }
+                else
+                {
+                    return fileSize + " B";
+                }
+            }
+            return "0B";
+        }
+
+        static private void PrintDocumentInfo(CPDFDocument document)
+        {
+            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);
+        }
+    }
+}

+ 82 - 0
Demo/Examples/Samples/DocumentInfoTest/DocumentInfoTest.csproj

@@ -0,0 +1,82 @@
+<?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>{274E1BD3-627D-46BC-8281-5440D7703EBF}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>DocumentInfoTest</RootNamespace>
+    <AssemblyName>Viewer_ComPDFKit</AssemblyName>
+    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <Deterministic>true</Deterministic>
+    <NuGetPackageImportStamp>
+    </NuGetPackageImportStamp>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="ComPDFKit.Desk, Version=1.8.1.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\..\packages\ComPDFKit.NetFramework.1.9.0\lib\ComPDFKit.Desk.dll</HintPath>
+    </Reference>
+    <Reference Include="ComPDFKit.Viewer, Version=1.8.1.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\..\packages\ComPDFKit.NetFramework.1.9.0\lib\ComPDFKit.Viewer.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Net.Http" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="..\LicenseKey.cs">
+      <Link>LicenseKey.cs</Link>
+    </Compile>
+    <Compile Include="DocumentInfoTest.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\TestFile\CommonFivePage.pdf">
+      <Link>CommonFivePage.pdf</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="App.config" />
+    <None Include="packages.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\license_key_win.xml">
+      <Link>license_key_win.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <Import Project="..\..\packages\ComPDFKit.NetFramework.1.9.0\build\ComPDFKit.NetFramework.targets" Condition="Exists('..\..\packages\ComPDFKit.NetFramework.1.9.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>
+    </PropertyGroup>
+    <Error Condition="!Exists('..\..\packages\ComPDFKit.NetFramework.1.9.0\build\ComPDFKit.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\ComPDFKit.NetFramework.1.9.0\build\ComPDFKit.NetFramework.targets'))" />
+  </Target>
+</Project>

+ 36 - 0
Demo/Examples/Samples/DocumentInfoTest/Properties/AssemblyInfo.cs

@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("DocumentInfoTest")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("DocumentInfoTest")]
+[assembly: AssemblyCopyright("Copyright ©  2023")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components.  If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("274e1bd3-627d-46bc-8281-5440d7703ebf")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

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

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

+ 37 - 14
Demo/Examples/Samples/OutlineTest/OutlineTest.cs

@@ -10,16 +10,20 @@ namespace OutlineTest
 {
     internal class OutlineTest
     {
-        static private string outputPath = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory()))) + "\\Output\\OutlineTest";
+        static private string outputPath = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory()))) + "\\Output\\Outline";
         static private int outlineCounter = 0;
         static private int outlineNumber = 0;
+
         static void Main(string[] args)
         {
             Console.WriteLine("Running Outline test sample…\r\n");
 
             SDKLicenseHelper.LicenseVerify();
             CPDFDocument document = CPDFDocument.InitWithFilePath("FourOutline.pdf");
-
+            if (!Directory.Exists(outputPath))
+            {
+                Directory.CreateDirectory(outputPath);
+            }
             if (PrintOutline(document))
             {
                 Console.WriteLine("Print outline done.");
@@ -60,11 +64,11 @@ namespace OutlineTest
             document = CPDFDocument.InitWithFilePath("FourOutline.pdf");
             if (RemoveOutline(document))
             {
-                Console.WriteLine("Move outline done.");
+                Console.WriteLine("Remove outline done.");
             }
             else
             {
-                Console.WriteLine("Move outline failed.");
+                Console.WriteLine("Remove outline failed.");
             }
             Console.WriteLine("--------------------");
             Console.WriteLine("Done.");
@@ -91,7 +95,11 @@ namespace OutlineTest
                 }
                 else
                 {
-                    outlineCounter--;
+                    var i = outlineList.IndexOf(outline);
+                    if (outlineList.IndexOf(outline)+1 == outlineList.Count)
+                    {
+                        outlineCounter--;
+                    }
                 }
             }
         }
@@ -110,8 +118,9 @@ namespace OutlineTest
         {
             CPDFOutline outline = document.GetOutlineRoot();
             CPDFOutline childOutline = null;
-            outline.InsertChildAtIndex(document, 1, ref childOutline); 
-            childOutline.SetTitle("Title");
+            outline.InsertChildAtIndex(document, 0, ref childOutline); 
+            childOutline.SetTitle("New outline");
+
             PrintOutline(document);
             return true;
         }
@@ -119,18 +128,32 @@ namespace OutlineTest
         static private bool MoveOutline(CPDFDocument document)
         {
             CPDFOutline outline = document.GetOutlineRoot();
+            outline.InsertChildAtIndex(document, outline.ChildList.Count, ref outline);
             outline.SetTitle("new outline");
-            outline.InsertChildAtIndex(document, 1, ref outline);
-            PrintOutline(document);
+            CPDFOutline targetOutline = document.GetOutlineList()[1];
+            targetOutline.MoveChildAtIndex(document, outline, targetOutline.ChildList.Count);
+
+            string path = outputPath + "\\MoveOutlineTest.pdf";
+            if (!document.WriteToFilePath(path))
+            {
+                return false;
+            }
+            CPDFDocument newDocument = CPDFDocument.InitWithFilePath(path);
+            PrintOutline(newDocument);
             return true;
         }
 
         static private bool RemoveOutline(CPDFDocument document)
-        {
-            CPDFOutline outline = document.GetOutlineRoot();
-            outline.SetTitle("new outline");
-            outline.InsertChildAtIndex(document, 1, ref outline);
-            PrintOutline(document);
+        { 
+            document.GetOutlineList()[0].RemoveFromParent(document);
+
+            string path = outputPath + "\\RemoveOutlineTest.pdf";
+            if (!document.WriteToFilePath(path))
+            {
+                return false;
+            }
+            CPDFDocument newDocument = CPDFDocument.InitWithFilePath(path);
+            PrintOutline(newDocument);
             return true;
         }
     }

+ 10 - 6
Demo/Examples/Samples/OutlineTest/OutlineTest.csproj

@@ -35,12 +35,6 @@
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="ComPDFKit.Desk, Version=1.8.1.0, Culture=neutral, processorArchitecture=MSIL">
-      <HintPath>..\..\packages\ComPDFKit.NetFramework.1.9.0\lib\ComPDFKit.Desk.dll</HintPath>
-    </Reference>
-    <Reference Include="ComPDFKit.Viewer, Version=1.8.1.0, Culture=neutral, processorArchitecture=MSIL">
-      <HintPath>..\..\packages\ComPDFKit.NetFramework.1.9.0\lib\ComPDFKit.Viewer.dll</HintPath>
-    </Reference>
     <Reference Include="System" />
     <Reference Include="System.Core" />
     <Reference Include="System.Xml.Linq" />
@@ -71,6 +65,16 @@
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
   </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.9.0\build\ComPDFKit.NetFramework.targets" Condition="Exists('..\..\packages\ComPDFKit.NetFramework.1.9.0\build\ComPDFKit.NetFramework.targets')" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">

+ 4 - 4
Demo/Examples/Samples/PDFRedactTest/PDFRedactTest.cs

@@ -77,13 +77,13 @@ namespace PDFRedactTest
             redact.UpdateAp();
             document.ApplyRedaction();
             // Save to pointed path so you can observe the effect.
-            string addHeaderFooterPath = outputPath + "\\RedactTest.pdf";
-            if (!document.WriteToFilePath(addHeaderFooterPath))
+            string path = outputPath + "\\RedactTest.pdf";
+            if (!document.WriteToFilePath(path))
             {
                 return false;
             }
-
-            CPDFDocument newDocument = CPDFDocument.InitWithFilePath(addHeaderFooterPath);
+            Console.WriteLine("Browse the changed file in " + path);
+            CPDFDocument newDocument = CPDFDocument.InitWithFilePath(path);
             string str = newDocument.PageAtIndex(0).GetTextPage().GetSelectText(new Point(60, 200), new Point(560, 250), new Point(0, 0));
             Console.WriteLine("Text in the redacted area is: {0}", str); 
             return true;

+ 34 - 3
Demo/Examples/Samples/PDFToImage/PDFToImage.cs

@@ -1,16 +1,20 @@
 using ComPDFKit.PDFDocument;
+using ComPDFKit.PDFPage;
 using System;
 using System.Collections.Generic;
 using System.IO;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
 
 namespace PDFToImageTest
 {
     internal class PDFToImage
     {
-        static private string outputPath = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory()))) + "\\Output\\PDFToImageTest";
+        static private string outputPath = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory()))) + "\\Output\\PDFToImage";
         static void Main(string[] args)
         {
             Console.WriteLine("Running PDFToImage test sample…\r\n");
@@ -21,12 +25,39 @@ namespace PDFToImageTest
             if (!Directory.Exists(outputPath))
             {
                 Directory.CreateDirectory(outputPath);
-            }  
+            }
+
+            PDFPageToImage(document);
+            Console.ReadLine();
         }
-        static private bool PDFPageToImage()
+
+        static private void SaveWriteableBitmapAsPng(WriteableBitmap writeableBitmap, string fileName)
         {
+            using (FileStream stream = new FileStream(fileName, FileMode.Create))
+            {
+                PngBitmapEncoder encoder = new PngBitmapEncoder();
+                encoder.Frames.Add(BitmapFrame.Create(writeableBitmap));
+                encoder.Save(stream);
+            } 
+        }
 
+        static private bool PDFPageToImage(CPDFDocument document)
+        {
+            for (int i = 0; i < document.PageCount; i++)
+            {
+                CPDFPage pdfPage = document.PageAtIndex(i, true);
+                Size pageSize = document.GetPageSize(0);
+                Rect pageRect = new Rect(0, 0, (int)(pageSize.Width / 72.0 * 96), (int)(pageSize.Height / 72.0 * 96));
+                byte[] bmpData = new byte[(int)(pageRect.Width * pageRect.Height * (96 / 72.0)  * (96 / 72.0) * 4)];
+                pdfPage.RenderPageBitmapWithMatrix((float)(96/72.0), pageRect, 0xFFFFFFFF, bmpData, 0, true);
 
+                WriteableBitmap writeableBitmap = new WriteableBitmap((int)pageRect.Width, (int)pageRect.Height, 96, 96, PixelFormats.Bgra32, null);
+    
+                writeableBitmap.WritePixels(new Int32Rect(0, 0, (int)pageRect.Width, (int)pageRect.Height), bmpData, writeableBitmap.BackBufferStride, 0);
+                var path = outputPath + "//PDFToImageTest" + i + ".png";
+                SaveWriteableBitmapAsPng(writeableBitmap, path);
+                Console.WriteLine("Png image saved in {0}", path);
+            }
             return false;
         }
     }

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

@@ -41,6 +41,7 @@
     <Reference Include="ComPDFKit.Viewer, Version=1.8.1.0, Culture=neutral, processorArchitecture=MSIL">
       <HintPath>..\..\packages\ComPDFKit.NetFramework.1.9.0\lib\ComPDFKit.Viewer.dll</HintPath>
     </Reference>
+    <Reference Include="PresentationCore" />
     <Reference Include="System" />
     <Reference Include="System.Core" />
     <Reference Include="System.Xml.Linq" />
@@ -49,6 +50,7 @@
     <Reference Include="System.Data" />
     <Reference Include="System.Net.Http" />
     <Reference Include="System.Xml" />
+    <Reference Include="WindowsBase" />
   </ItemGroup>
   <ItemGroup>
     <Compile Include="..\LicenseKey.cs">

+ 6 - 0
Demo/Examples/Samples/TextSearchTest/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>

+ 36 - 0
Demo/Examples/Samples/TextSearchTest/Properties/AssemblyInfo.cs

@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("TextSearchTest")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("TextSearchTest")]
+[assembly: AssemblyCopyright("Copyright ©  2023")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components.  If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("dd2e08ee-0e64-4ab9-b8dc-03de7e8b4e04")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 92 - 0
Demo/Examples/Samples/TextSearchTest/TextSearch.cs

@@ -0,0 +1,92 @@
+using ComPDFKit.Import;
+using ComPDFKit.PDFAnnotation;
+using ComPDFKit.PDFDocument;
+using ComPDFKit.PDFPage;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace TextSearchTest
+{
+    internal class TextSearch
+    {
+        static private string outputPath = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory()))) + "\\Output\\TextSearch";
+        static void Main(string[] args)
+        {
+            Console.WriteLine("Running text search test sample…\r\n");
+                        if (!Directory.Exists(outputPath))
+            {
+                Directory.CreateDirectory(outputPath);
+            }
+            SDKLicenseHelper.LicenseVerify();
+            CPDFDocument document = CPDFDocument.InitWithFilePath("Text.pdf");
+
+            SearchText(document);
+
+            Console.WriteLine("--------------------");
+            Console.WriteLine("Done");
+            Console.WriteLine("--------------------");
+
+            Console.ReadLine();
+        }
+
+        static void SearchForPage(CPDFPage page, string searchKeywords, C_Search_Options option, ref List<Rect> rects, ref List<string> strings)
+        {
+            rects = new List<Rect>();
+            strings = new List<string>();
+            int findIndex = 0;
+
+            CPDFTextPage textPage = page.GetTextPage();
+            CPDFTextSearcher searcher = new CPDFTextSearcher();
+
+            if (searcher.FindStart(textPage, searchKeywords, option, 0))
+            {
+                CRect textRect = new CRect();
+                string textContent = "";
+                while (searcher.FindNext(page, textPage, ref textRect, ref textContent, ref findIndex))
+                {
+                    strings.Add(textContent);
+                    rects.Add(new Rect(textRect.left, textRect.top, textRect.width(), textRect.height()));
+                }
+            }
+        }
+
+        static private bool HighlightTheFirstResult(CPDFPage page, Rect rect)
+        {
+            List<CRect> cRectList = new List<CRect>();
+            cRectList.Add(new CRect((float)rect.Left, (float)rect.Top, (float)rect.Right, (float)rect.Bottom));
+
+            CPDFHighlightAnnotation annotation = page.CreateAnnot(C_ANNOTATION_TYPE.C_ANNOTATION_HIGHLIGHT) as CPDFHighlightAnnotation;
+            byte[] color = { 0, 255, 0 };
+            annotation.SetColor(color);
+            annotation.SetTransparency(120);
+            annotation.SetQuardRects(cRectList);
+            annotation.UpdateAp();
+            return true;
+        }
+
+        static private bool SearchText(CPDFDocument document)
+        {
+            CPDFPage page = document.PageAtIndex(0);
+            List<Rect> rects = new List<Rect>();
+            List<string> strings = new List<string>();
+            SearchForPage(page, "PDF", C_Search_Options.Search_Case_Insensitive, ref rects, ref strings);
+            Console.WriteLine("the key PDF have {0} results", rects.Count);
+
+            Console.WriteLine("Search finished, now highlight the first result. ");
+            HighlightTheFirstResult(page, rects[0]);
+            string path = outputPath + "\\HighlightFirstTest.pdf";
+            if (!document.WriteToFilePath(path))
+            {
+                return false;
+            }
+            Console.WriteLine("Browse the changed file in " + path);
+            return true;
+        }
+
+    }
+}

+ 83 - 0
Demo/Examples/Samples/TextSearchTest/TextSearchTest.csproj

@@ -0,0 +1,83 @@
+<?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>{DD2E08EE-0E64-4AB9-B8DC-03DE7E8B4E04}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>TextSearchTest</RootNamespace>
+    <AssemblyName>Viewer_ComPDFKit</AssemblyName>
+    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <Deterministic>true</Deterministic>
+    <NuGetPackageImportStamp>
+    </NuGetPackageImportStamp>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="ComPDFKit.Desk, Version=1.8.1.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\..\packages\ComPDFKit.NetFramework.1.9.0\lib\ComPDFKit.Desk.dll</HintPath>
+    </Reference>
+    <Reference Include="ComPDFKit.Viewer, Version=1.8.1.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\..\packages\ComPDFKit.NetFramework.1.9.0\lib\ComPDFKit.Viewer.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Net.Http" />
+    <Reference Include="System.Xml" />
+    <Reference Include="WindowsBase" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="..\LicenseKey.cs">
+      <Link>LicenseKey.cs</Link>
+    </Compile>
+    <Compile Include="TextSearch.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\TestFile\Text.pdf">
+      <Link>Text.pdf</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="App.config" />
+    <None Include="packages.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\license_key_win.xml">
+      <Link>license_key_win.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <Import Project="..\..\packages\ComPDFKit.NetFramework.1.9.0\build\ComPDFKit.NetFramework.targets" Condition="Exists('..\..\packages\ComPDFKit.NetFramework.1.9.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>
+    </PropertyGroup>
+    <Error Condition="!Exists('..\..\packages\ComPDFKit.NetFramework.1.9.0\build\ComPDFKit.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\ComPDFKit.NetFramework.1.9.0\build\ComPDFKit.NetFramework.targets'))" />
+  </Target>
+</Project>

+ 4 - 0
Demo/Examples/Samples/TextSearchTest/packages.config

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

+ 6 - 0
Demo/Examples/Samples/WatermarkTest/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>

+ 36 - 0
Demo/Examples/Samples/WatermarkTest/Properties/AssemblyInfo.cs

@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("WatermarkTest")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("WatermarkTest")]
+[assembly: AssemblyCopyright("Copyright ©  2023")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components.  If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("8e440dcb-fcbc-4308-ab3d-50c38d017a40")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 158 - 0
Demo/Examples/Samples/WatermarkTest/WatermarkTest.cs

@@ -0,0 +1,158 @@
+using ComPDFKit.PDFDocument;
+using ComPDFKit.PDFWatermark;
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Threading.Tasks;
+using System.Xml.Linq;
+
+namespace WatermarkTest
+{
+    internal class WatermarkTest
+    {
+        static private string outputPath = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory()))) + "\\Output\\Watermark";
+        static void Main(string[] args)
+        {
+            Console.WriteLine("Running Watermark test sample…\r\n");
+            SDKLicenseHelper.LicenseVerify();
+            CPDFDocument document = CPDFDocument.InitWithFilePath("CommonFivePage.pdf");
+             
+            if (!Directory.Exists(outputPath))
+            {
+                Directory.CreateDirectory(outputPath);
+            }
+
+            if (AddTextWatermark(document))
+            {
+                Console.WriteLine("Add text watermark done.");
+            }
+            else
+            {
+                Console.WriteLine("Add text watermark failed.");
+            }
+
+            Console.WriteLine("--------------------"); 
+            document.Release();
+            document = CPDFDocument.InitWithFilePath("CommonFivePage.pdf");
+            if (AddImageWatermark(document))
+            {
+                Console.WriteLine("Add image watermark done.");
+            }
+            else
+            {
+                Console.WriteLine("Add image watermark failed.");
+            }
+            Console.WriteLine("--------------------");
+            CPDFDocument textWatermarkDocument = CPDFDocument.InitWithFilePath("Watermark.pdf");
+
+            if (DeleteWatermark(textWatermarkDocument))
+            {
+                Console.WriteLine("Delete watermark done.");
+            }
+            else
+            {
+                Console.WriteLine("Delete watermark failed.");
+            }
+            Console.WriteLine("--------------------");
+            Console.WriteLine("Done!");
+            Console.WriteLine("--------------------");
+            Console.ReadLine();
+        }
+        static private bool AddTextWatermark(CPDFDocument document)
+        {
+            CPDFWatermark watermark = document.InitWatermark(C_Watermark_Type.WATERMARK_TYPE_TEXT);
+            watermark.SetText("test");
+            watermark.SetFontName("Helvetica");
+            watermark.SetPages("0-3");
+            byte[] color = { 255, 0, 0 };
+            watermark.SetTextRGBColor(color);
+            watermark.SetScale(2);
+            watermark.SetRotation(0);
+            watermark.SetOpacity(120);
+            watermark.SetVertalign(C_Watermark_Vertalign.WATERMARK_VERTALIGN_CENTER);
+            watermark.SetHorizalign(C_Watermark_Horizalign.WATERMARK_HORIZALIGN_CENTER);
+            watermark.SetVertOffset(0);
+            watermark.SetHorizOffset(0);
+            watermark.SetFront(true);
+            watermark.SetFullScreen(true);
+            watermark.SetVerticalSpacing(10);
+            watermark.SetHorizontalSpacing(10);
+            watermark.CreateWatermark();
+            string path = outputPath + "\\AddTextWatermarkTest.pdf";
+            if (!document.WriteToFilePath(path))
+            {
+                return false;
+            }
+            Console.WriteLine("Browse the changed file in " + path);
+
+            return true;
+        }
+
+        public static byte[] BitmapToByteArray(Bitmap bitmap)
+        {
+
+            BitmapData bmpdata = null;
+
+            try
+            {
+                bmpdata = bitmap.LockBits(new Rectangle(0, 0, bitmap.Width, bitmap.Height), ImageLockMode.ReadOnly, bitmap.PixelFormat);
+                int numbytes = bmpdata.Stride * bitmap.Height;
+                byte[] bytedata = new byte[numbytes];
+                IntPtr ptr = bmpdata.Scan0;
+
+                Marshal.Copy(ptr, bytedata, 0, numbytes);
+
+                return bytedata;
+            }
+            finally
+            {
+                if (bmpdata != null)
+                    bitmap.UnlockBits(bmpdata);
+            }
+
+        }
+        static private bool AddImageWatermark(CPDFDocument document)
+        {
+            CPDFWatermark watermark = document.InitWatermark(C_Watermark_Type.WATERMARK_TYPE_IMG);
+            Bitmap bitmap = new Bitmap("logo.png");
+            watermark.SetImage(BitmapToByteArray(bitmap), bitmap.Width, bitmap.Height);
+            watermark.SetPages("0-3");
+            watermark.SetScale(2);
+            watermark.SetRotation(1);
+            watermark.SetOpacity(128);
+            watermark.SetVertalign(C_Watermark_Vertalign.WATERMARK_VERTALIGN_CENTER);
+            watermark.SetHorizalign(C_Watermark_Horizalign.WATERMARK_HORIZALIGN_CENTER);
+            watermark.SetVertOffset(0);
+            watermark.SetHorizOffset(0);
+            watermark.SetFront(false);
+            watermark.SetFullScreen(true);
+            watermark.SetVerticalSpacing(10);
+            watermark.SetHorizontalSpacing(10);
+            watermark.CreateWatermark();
+            watermark.UpdateWatermark();
+
+            string path = outputPath + "\\AddImageWatermarkTest.pdf";
+            if (!document.WriteToFilePath(path))
+            {
+                return false;
+            } 
+            return true; 
+        }
+
+        static private bool DeleteWatermark(CPDFDocument watermarkDocument)
+        {
+            watermarkDocument.DeleteWatermarks();
+            string path = outputPath + "\\DeleteWatermarkTest.pdf";
+            if (!watermarkDocument.WriteToFilePath(path))
+            {
+                return false;
+            }
+            return true;
+        }
+    }
+}

+ 93 - 0
Demo/Examples/Samples/WatermarkTest/WatermarkTest.csproj

@@ -0,0 +1,93 @@
+<?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>{8E440DCB-FCBC-4308-AB3D-50C38D017A40}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>WatermarkTest</RootNamespace>
+    <AssemblyName>Viewer_ComPDFKit</AssemblyName>
+    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <Deterministic>true</Deterministic>
+    <NuGetPackageImportStamp>
+    </NuGetPackageImportStamp>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="ComPDFKit.Desk, Version=1.8.1.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\..\packages\ComPDFKit.NetFramework.1.9.0\lib\ComPDFKit.Desk.dll</HintPath>
+    </Reference>
+    <Reference Include="ComPDFKit.Viewer, Version=1.8.1.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\..\packages\ComPDFKit.NetFramework.1.9.0\lib\ComPDFKit.Viewer.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Net.Http" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="..\LicenseKey.cs">
+      <Link>LicenseKey.cs</Link>
+    </Compile>
+    <Compile Include="WatermarkTest.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\TestFile\Watermark.pdf">
+      <Link>Watermark.pdf</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="..\..\TestFile\CommonFivePage.pdf">
+      <Link>CommonFivePage.pdf</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="App.config" />
+    <None Include="packages.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\license_key_win.xml">
+      <Link>license_key_win.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\TestFile\logo.png">
+      <Link>logo.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <Import Project="..\..\packages\ComPDFKit.NetFramework.1.9.0\build\ComPDFKit.NetFramework.targets" Condition="Exists('..\..\packages\ComPDFKit.NetFramework.1.9.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>
+    </PropertyGroup>
+    <Error Condition="!Exists('..\..\packages\ComPDFKit.NetFramework.1.9.0\build\ComPDFKit.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\ComPDFKit.NetFramework.1.9.0\build\ComPDFKit.NetFramework.targets'))" />
+  </Target>
+</Project>

+ 4 - 0
Demo/Examples/Samples/WatermarkTest/packages.config

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

Fichier diff supprimé car celui-ci est trop grand
+ 99 - 0
Demo/Examples/TestFile/Annotations.xfdf


BIN
Demo/Examples/TestFile/ColorBackground.pdf


BIN
Demo/Examples/TestFile/FourOutline.pdf


BIN
Demo/Examples/TestFile/ImageBackground.pdf


BIN
Demo/Examples/TestFile/Watermark.pdf


BIN
Demo/Examples/TestFile/logo.png