Browse Source

Samples - 项目更新

weixiangjie 11 months ago
parent
commit
ea1e568f59
33 changed files with 208 additions and 49 deletions
  1. 15 3
      Demo/Examples/DigitalSignature/DigitalSignature.csproj
  2. 1 1
      Demo/Examples/PDFViewer/App.xaml.cs
  3. 2 0
      Demo/Examples/Samples/AnnotationImportExportTest/CS/AnnotationImportExportTest.csproj
  4. 38 0
      Demo/Examples/Samples/AnnotationImportExportTest/CS/Properties/AssemblyInfo.cs
  5. 2 3
      Demo/Examples/Samples/AnnotationTest/CS/AnnotationTest.cs
  6. 2 1
      Demo/Examples/Samples/AnnotationTest/CS/AnnotationTest.csproj
  7. 1 3
      Demo/Examples/Samples/AnnotationTest/CS/Properties/AssemblyInfo.cs
  8. 2 1
      Demo/Examples/Samples/BackgroundTest/CS/BackgroundTest.csproj
  9. 2 4
      Demo/Examples/Samples/BackgroundTest/CS/Properties/AssemblyInfo.cs
  10. 3 1
      Demo/Examples/Samples/BatesTest/CS/BatesTest.csproj
  11. 3 1
      Demo/Examples/Samples/BookmarkTest/CS/BookmarkTest.csproj
  12. 37 3
      Demo/Examples/Samples/DigitalSignatureTest/CS/DigitalSignatureTest.cs
  13. 17 1
      Demo/Examples/Samples/DigitalSignatureTest/CS/DigitalSignatureTest.csproj
  14. 2 1
      Demo/Examples/Samples/DocumentCompareTest/CS/DocumentCompareTest.csproj
  15. 3 1
      Demo/Examples/Samples/DocumentInfoTest/CS/DocumentInfoTest.csproj
  16. 3 1
      Demo/Examples/Samples/EncryptTest/CS/EncryptTest.csproj
  17. 3 1
      Demo/Examples/Samples/FlattenTest/CS/FlattenTest.csproj
  18. 3 1
      Demo/Examples/Samples/HeaderFooterTest/CS/HeaderFooterTest.csproj
  19. 3 1
      Demo/Examples/Samples/ImageExtractTest/CS/ImageExtractTest.csproj
  20. 3 1
      Demo/Examples/Samples/InteractiveFormsTest/CS/InteractiveFormsTest.csproj
  21. 3 1
      Demo/Examples/Samples/OutlineTest/CS/OutlineTest.csproj
  22. 3 1
      Demo/Examples/Samples/PDFATest/CS/PDFATest.csproj
  23. 3 1
      Demo/Examples/Samples/PDFPageTest/CS/PDFPageTest.csproj
  24. 1 3
      Demo/Examples/Samples/PDFRedactTest/CS/PDFRedactTest.cs
  25. 3 1
      Demo/Examples/Samples/PDFRedactTest/CS/PDFRedactTest.csproj
  26. 1 0
      Demo/Examples/Samples/PDFToImage/CS/PDFToImageTest.csproj
  27. 36 0
      Demo/Examples/Samples/PDFToImage/CS/Properties/AssemblyInfo.cs
  28. 2 1
      Demo/Examples/Samples/PDFToImageTest/CS/PDFToImageTest.csproj
  29. 3 1
      Demo/Examples/Samples/TextExtractTest/CS/TextExtractTest.csproj
  30. 1 4
      Demo/Examples/Samples/TextSearchTest/CS/Properties/AssemblyInfo.cs
  31. 3 1
      Demo/Examples/Samples/TextSearchTest/CS/TextSearchTest.csproj
  32. 2 5
      Demo/Examples/Samples/WatermarkTest/CS/Properties/AssemblyInfo.cs
  33. 2 1
      Demo/Examples/Samples/WatermarkTest/CS/WatermarkTest.csproj

+ 15 - 3
Demo/Examples/DigitalSignature/DigitalSignature.csproj

@@ -131,6 +131,18 @@
     <None Include="App.config" />
   </ItemGroup>
   <ItemGroup>
+    <ProjectReference Include="..\..\..\..\compdfkit_rebuild\ComPDFKit.Tool\ComPDFKit.Tool.csproj">
+      <Project>{a061ee7a-6704-4bd9-86ee-48ed5df75e2f}</Project>
+      <Name>ComPDFKit.Tool</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\..\compdfkit_rebuild\ComPDFKit.Viewer\ComPDFKit.Viewer.csproj">
+      <Project>{783263cf-0da3-4095-9df8-2c4a6b3ff908}</Project>
+      <Name>ComPDFKit.Viewer</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\..\compdfkit_windows\ComPDFKit\ComPDFKitCSharp\ComPDFKit.Desk.csproj">
+      <Project>{56e518ad-c126-4b48-9a09-0a64c87020e4}</Project>
+      <Name>ComPDFKit.Desk</Name>
+    </ProjectReference>
     <ProjectReference Include="..\Compdfkit_Tools\Compdfkit_Tools.csproj">
       <Project>{9363bcb1-3a67-446a-8093-5708b86bf418}</Project>
       <Name>Compdfkit_Tools</Name>
@@ -149,10 +161,10 @@
     </BootstrapperPackage>
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
+    <Content Include="..\..\..\..\x64\ComPDFKit.dll">
+      <Link>x64\ComPDFKit.dll</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
+    </Content>
     <Content Include="..\TestFile\ComPDFKit_Signatures_Sample_File.pdf">
       <Link>ComPDFKit_Signatures_Sample_File.pdf</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

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

@@ -62,7 +62,7 @@ namespace PDFViewer
             base.OnStartup(e);
              
             LicenseVerify();
-            CPDFSDKVerifier.PrintPermissions();
+            //CPDFSDKVerifier.PrintPermissions();
             //CPDFSDKVerifier.LicenseRefreshed -= CPDFSDKVerifier_LicenseRefreshed;
             //CPDFSDKVerifier.LicenseRefreshed += CPDFSDKVerifier_LicenseRefreshed;
             HistoryFile(@"TestFile\ComPDFKit_Sample_File_Windows.pdf");

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

@@ -5,6 +5,8 @@
         <LangVersion>7.3</LangVersion>
         <Configurations>Release;Debug</Configurations>
         <Platforms>AnyCPU;x64</Platforms>
+        <AssemblyName>Samples_ComPDFKit</AssemblyName>
+        <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
         <TargetFrameworks>net7.0;net461</TargetFrameworks>
     </PropertyGroup>
 

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

@@ -0,0 +1,38 @@
+#if NET451_OR_GREATER
+
+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("PDF Technologies, Inc.")]
+[assembly: AssemblyProduct("BatesTest")]
+[assembly: AssemblyCopyright("Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.")]
+[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("9A19103F-16F7-4668-BE54-9A1E7A4F7556")]
+
+// 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.13.0.0")]
+[assembly: AssemblyFileVersion("1.13.0.0")]
+#endif

+ 2 - 3
Demo/Examples/Samples/AnnotationTest/CS/AnnotationTest.cs

@@ -171,11 +171,10 @@ namespace AnnotationTest
         /// <param name="document"></param>
         static private void CreateSoundAnnotation(CPDFDocument document)
         {
-            CPDFPage page = document.PageAtIndex(0);
+            CPDFPage page = document.PageAtIndex(1);
             CPDFSoundAnnotation sound = page.CreateAnnot(C_ANNOTATION_TYPE.C_ANNOTATION_SOUND) as CPDFSoundAnnotation;
             sound.SetRect(new CRect(400, 700, 450, 750));
-            // Note: The iconPath parameter is null.
-            sound.SetSoundPath("","Bird.wav");
+            sound.SetSoundPath(null,"Bird.wav");
             sound.UpdateAp();
         }
 

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

@@ -2,7 +2,8 @@
 
     <PropertyGroup>
         <OutputType>Exe</OutputType>
-        <TargetFramework>net7.0</TargetFramework>
+        <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
+        <TargetFrameworks>net7.0;net461</TargetFrameworks>
         <LangVersion>7.3</LangVersion>
         <Configurations>Release;Debug</Configurations>
         <Platforms>AnyCPU;x64</Platforms>

+ 1 - 3
Demo/Examples/Samples/AnnotationTest/CS/Properties/AssemblyInfo.cs

@@ -1,5 +1,4 @@
-/*
-using System.Reflection;
+using System.Reflection;
 using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
@@ -35,4 +34,3 @@ using System.Runtime.InteropServices;
 // [assembly: AssemblyVersion("1.0.*")]
 [assembly: AssemblyVersion("1.13.0.0")]
 [assembly: AssemblyFileVersion("1.13.0.0")]
-*/

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

@@ -2,7 +2,8 @@
 
     <PropertyGroup>
         <OutputType>Exe</OutputType>
-        <TargetFramework>net7.0</TargetFramework>
+        <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
+        <TargetFrameworks>net7.0;net461</TargetFrameworks>
         <LangVersion>7.3</LangVersion>
         <Configurations>Release;Debug</Configurations>
         <Platforms>AnyCPU;x64</Platforms>

+ 2 - 4
Demo/Examples/Samples/BackgroundTest/CS/Properties/AssemblyInfo.cs

@@ -1,5 +1,4 @@
-/*
-using System.Reflection;
+using System.Reflection;
 using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
@@ -34,5 +33,4 @@ using System.Runtime.InteropServices;
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
 [assembly: AssemblyVersion("1.13.0.0")]
-[assembly: AssemblyFileVersion("1.13.0.0")]
-*/
+[assembly: AssemblyFileVersion("1.13.0.0")]

+ 3 - 1
Demo/Examples/Samples/BatesTest/CS/BatesTest.csproj

@@ -1,10 +1,12 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
     <PropertyGroup>
-        <TargetFramework>net7.0</TargetFramework>
+        <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
+        <TargetFrameworks>net7.0;net461</TargetFrameworks>
         <LangVersion>7.3</LangVersion>
         <Configurations>Release;Debug</Configurations>
         <Platforms>AnyCPU;x64</Platforms>
+        <AssemblyName>Samples_ComPDFKit</AssemblyName>
     </PropertyGroup>
 
     <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">

+ 3 - 1
Demo/Examples/Samples/BookmarkTest/CS/BookmarkTest.csproj

@@ -2,10 +2,12 @@
 
     <PropertyGroup>
         <OutputType>Exe</OutputType>
-        <TargetFramework>net7.0</TargetFramework>
+        <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
+        <TargetFrameworks>net7.0;net461</TargetFrameworks>
         <LangVersion>7.3</LangVersion>
         <Configurations>Release;Debug</Configurations>
         <Platforms>AnyCPU;x64</Platforms>
+        <AssemblyName>Samples_ComPDFKit</AssemblyName>
     </PropertyGroup>
 
     <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">

+ 37 - 3
Demo/Examples/Samples/DigitalSignatureTest/CS/DigitalSignatureTest.cs

@@ -5,7 +5,13 @@ using ComPDFKit.PDFDocument;
 using ComPDFKit.PDFPage;
 using System;
 using System.Collections.Generic;
+using System.Diagnostics;
+using System.Drawing;
 using System.IO;
+using System.Runtime.InteropServices;
+using System.Security.AccessControl;
+using System.Xml.Linq;
+using ImageMagick;
 
 namespace DigitalSignatureTest
 {
@@ -34,6 +40,29 @@ namespace DigitalSignatureTest
                 Directory.CreateDirectory(trustedFolder);
             }
             CPDFSignature.SignCertTrustedFolder = trustedFolder;
+
+
+            // Get the access control of the directory
+            if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+            {
+                DirectoryInfo directoryInfo = new DirectoryInfo(outputPath);
+                DirectorySecurity directorySecurity = directoryInfo.GetAccessControl();
+                directorySecurity.AddAccessRule(new FileSystemAccessRule("Everyone", FileSystemRights.FullControl, AccessControlType.Allow));
+                directoryInfo.SetAccessControl(directorySecurity);
+            }
+            else if(RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
+            {
+                // Set the access control of the directory
+                string[] args = { "chmod", "-R", "777", outputPath };
+                Process process = new Process();
+                process.StartInfo.FileName = "/bin/chmod";
+                process.StartInfo.Arguments = string.Join(" ", args);
+                process.StartInfo.UseShellExecute = false;
+                process.StartInfo.RedirectStandardOutput = true;   
+                process.Start();
+                process.WaitForExit();
+            }
+            
             #endregion
 
             #region Sample 0: Create certificate 
@@ -100,7 +129,7 @@ namespace DigitalSignatureTest
 
             string info = "/C=SG/O=ComPDFKit/D=R&D Department/CN=Alan/emailAddress=xxxx@example.com";
             string password = "ComPDFKit";
-            string filePath = outputPath + "\\Certificate.pfx";
+            string filePath = "Certificate.pfx";
             if (CPDFPKCS12CertHelper.GeneratePKCS12Cert(info, password, filePath, CPDFCertUsage.CPDFCertUsageAll, true))
             {
                 Console.WriteLine("File saved in " + filePath);
@@ -168,11 +197,16 @@ namespace DigitalSignatureTest
                 "DN: " + DN + "\n",
                 IsContentAlignLeft = false,
                 IsDrawLogo = true,
-                // Note: No logo bitmap
-                //LogoBitmap = new Bitmap("Logo.png"),
                 TextColor = new float[] { 0, 0, 0 },
                 ContentColor = new float[] { 0, 0, 0 }
             };
+            using (var image = new MagickImage("Logo.png"))
+            {
+                byte[] byteArray = image.ToByteArray(MagickFormat.Bgra);
+                signatureConfig.LogoData = byteArray;
+                signatureConfig.LogoHeight = image.Height;
+                signatureConfig.LogoWidth = image.Width;
+            }
             string filePath = outputPath + "\\" + document.FileName + "_Signed.pdf";
             signatureField.UpdataApWithSignature(signatureConfig);
             if (document.WriteSignatureToFilePath(signatureField,

+ 17 - 1
Demo/Examples/Samples/DigitalSignatureTest/CS/DigitalSignatureTest.csproj

@@ -2,10 +2,12 @@
 
     <PropertyGroup>
         <OutputType>Exe</OutputType>
-        <TargetFramework>net7.0</TargetFramework>
+        <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
+        <TargetFrameworks>net7.0;net461</TargetFrameworks>
         <LangVersion>7.3</LangVersion>
         <Configurations>Release;Debug</Configurations>
         <Platforms>AnyCPU;x64</Platforms>
+        <AssemblyName>Samples_ComPDFKit</AssemblyName>
     </PropertyGroup>
 
     <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
@@ -33,6 +35,7 @@
       </Content>
       <Content Include="..\..\..\TestFile\Signed.pdf">
         <Link>Signed.pdf</Link>
+        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       </Content>
       <Content Include="..\..\ComPDFKit_Logo.ico">
         <Link>ComPDFKit_Logo.ico</Link>
@@ -51,4 +54,17 @@
     </ProjectReference>
   </ItemGroup>
 
+    <ItemGroup>
+      <PackageReference Include="Magick.NET-Q8-x64" Version="13.6.0" />
+    </ItemGroup>
+
+    <ItemGroup>
+      <None Update="Certificate.pfx">
+        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+      </None>
+      <None Update="Logo.png">
+        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+      </None>
+    </ItemGroup>
+
 </Project>

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

@@ -2,7 +2,8 @@
 
     <PropertyGroup>
         <OutputType>Exe</OutputType>
-        <TargetFramework>net7.0</TargetFramework>
+        <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
+        <TargetFrameworks>net7.0;net461</TargetFrameworks>
         <LangVersion>7.3</LangVersion>
         <Configurations>Release;Debug</Configurations>
         <Platforms>AnyCPU;x64</Platforms>

+ 3 - 1
Demo/Examples/Samples/DocumentInfoTest/CS/DocumentInfoTest.csproj

@@ -2,10 +2,12 @@
 
     <PropertyGroup>
         <OutputType>Exe</OutputType>
-        <TargetFramework>net7.0</TargetFramework>
+        <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
+        <TargetFrameworks>net7.0;net461</TargetFrameworks>
         <LangVersion>7.3</LangVersion>
         <Configurations>Release;Debug</Configurations>
         <Platforms>AnyCPU;x64</Platforms>
+        <AssemblyName>Samples_ComPDFKit</AssemblyName>
     </PropertyGroup>
 
     <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">

+ 3 - 1
Demo/Examples/Samples/EncryptTest/CS/EncryptTest.csproj

@@ -2,10 +2,12 @@
 
     <PropertyGroup>
         <OutputType>Exe</OutputType>
-        <TargetFramework>net7.0</TargetFramework>
+        <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
+        <TargetFrameworks>net7.0;net461</TargetFrameworks>
         <LangVersion>7.3</LangVersion>
         <Configurations>Release;Debug</Configurations>
         <Platforms>AnyCPU;x64</Platforms>
+        <AssemblyName>Samples_ComPDFKit</AssemblyName>
     </PropertyGroup>
 
     <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">

+ 3 - 1
Demo/Examples/Samples/FlattenTest/CS/FlattenTest.csproj

@@ -2,10 +2,12 @@
 
     <PropertyGroup>
         <OutputType>Exe</OutputType>
-        <TargetFramework>net7.0</TargetFramework>
+        <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
+        <TargetFrameworks>net7.0;net461</TargetFrameworks>
         <LangVersion>7.3</LangVersion>
         <Configurations>Release;Debug</Configurations>
         <Platforms>AnyCPU;x64</Platforms>
+        <AssemblyName>Samples_ComPDFKit</AssemblyName>
     </PropertyGroup>
 
     <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">

+ 3 - 1
Demo/Examples/Samples/HeaderFooterTest/CS/HeaderFooterTest.csproj

@@ -2,10 +2,12 @@
 
     <PropertyGroup>
         <OutputType>Exe</OutputType>
-        <TargetFramework>net7.0</TargetFramework>
+        <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
+        <TargetFrameworks>net7.0;net461</TargetFrameworks>
         <LangVersion>7.3</LangVersion>
         <Configurations>Release;Debug</Configurations>
         <Platforms>AnyCPU;x64</Platforms>
+        <AssemblyName>Samples_ComPDFKit</AssemblyName>
     </PropertyGroup>
 
     <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">

+ 3 - 1
Demo/Examples/Samples/ImageExtractTest/CS/ImageExtractTest.csproj

@@ -2,10 +2,12 @@
 
     <PropertyGroup>
         <OutputType>Exe</OutputType>
-        <TargetFramework>net7.0</TargetFramework>
+        <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
+        <TargetFrameworks>net7.0;net461</TargetFrameworks>
         <LangVersion>7.3</LangVersion>
         <Configurations>Release;Debug</Configurations>
         <Platforms>AnyCPU;x64</Platforms>
+        <AssemblyName>Samples_ComPDFKit</AssemblyName>
     </PropertyGroup>
 
     <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">

+ 3 - 1
Demo/Examples/Samples/InteractiveFormsTest/CS/InteractiveFormsTest.csproj

@@ -2,10 +2,12 @@
 
     <PropertyGroup>
         <OutputType>Exe</OutputType>
-        <TargetFramework>net7.0</TargetFramework>
+        <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
+        <TargetFrameworks>net7.0;net461</TargetFrameworks>
         <LangVersion>7.3</LangVersion>
         <Configurations>Release;Debug</Configurations>
         <Platforms>AnyCPU;x64</Platforms>
+        <AssemblyName>Samples_ComPDFKit</AssemblyName>
     </PropertyGroup>
 
     <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">

+ 3 - 1
Demo/Examples/Samples/OutlineTest/CS/OutlineTest.csproj

@@ -2,10 +2,12 @@
 
     <PropertyGroup>
         <OutputType>Exe</OutputType>
-        <TargetFramework>net7.0</TargetFramework>
+        <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
+        <TargetFrameworks>net7.0;net461</TargetFrameworks>
         <LangVersion>7.3</LangVersion>
         <Configurations>Release;Debug</Configurations>
         <Platforms>AnyCPU;x64</Platforms>
+        <AssemblyName>Samples_ComPDFKit</AssemblyName>
     </PropertyGroup>
 
     <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">

+ 3 - 1
Demo/Examples/Samples/PDFATest/CS/PDFATest.csproj

@@ -2,10 +2,12 @@
 
     <PropertyGroup>
         <OutputType>Exe</OutputType>
-        <TargetFramework>net7.0</TargetFramework>
+        <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
+        <TargetFrameworks>net7.0;net461</TargetFrameworks>
         <LangVersion>7.3</LangVersion>
         <Configurations>Release;Debug</Configurations>
         <Platforms>AnyCPU;x64</Platforms>
+        <AssemblyName>Samples_ComPDFKit</AssemblyName>
     </PropertyGroup>
 
     <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">

+ 3 - 1
Demo/Examples/Samples/PDFPageTest/CS/PDFPageTest.csproj

@@ -2,10 +2,12 @@
 
     <PropertyGroup>
         <OutputType>Exe</OutputType>
-        <TargetFramework>net7.0</TargetFramework>
+        <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
+        <TargetFrameworks>net7.0;net461</TargetFrameworks>
         <LangVersion>7.3</LangVersion>
         <Configurations>Release;Debug</Configurations>
         <Platforms>AnyCPU;x64</Platforms>
+        <AssemblyName>Samples_ComPDFKit</AssemblyName>
     </PropertyGroup>
 
     <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">

+ 1 - 3
Demo/Examples/Samples/PDFRedactTest/CS/PDFRedactTest.cs

@@ -18,8 +18,7 @@ namespace PDFRedactTest
             SDKLicenseHelper.LicenseVerify();
 
             CPDFDocument document = CPDFDocument.InitWithFilePath("CommonFivePage.pdf");
-
-            // Note: replace Point to CPoint
+            
             string str = document.PageAtIndex(0).GetTextPage().GetSelectText(new CPoint(300, 240), new CPoint(400, 300), new CPoint(0, 0));
             Console.WriteLine("The text need to be redact is: {0}", str);
 
@@ -89,7 +88,6 @@ namespace PDFRedactTest
             CPDFDocument newDocument = CPDFDocument.InitWithFilePath(path);
 
             //Validation: try to get the text of the covered area
-            // Note: replace Point to CPoint
             string str = newDocument.PageAtIndex(0).GetTextPage().GetSelectText(new CPoint(60, 200), new CPoint(560, 250), new CPoint(0, 0));
             Console.WriteLine("Text in the redacted area is: {0}", str); 
             return true;

+ 3 - 1
Demo/Examples/Samples/PDFRedactTest/CS/PDFRedactTest.csproj

@@ -2,10 +2,12 @@
 
     <PropertyGroup>
         <OutputType>Exe</OutputType>
-        <TargetFramework>net7.0</TargetFramework>
+        <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
+        <TargetFrameworks>net7.0;net461</TargetFrameworks>
         <LangVersion>7.3</LangVersion>
         <Configurations>Release;Debug</Configurations>
         <Platforms>AnyCPU;x64</Platforms>
+        <AssemblyName>Samples_ComPDFKit</AssemblyName>
     </PropertyGroup>
 
     <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">

+ 1 - 0
Demo/Examples/Samples/PDFToImage/CS/PDFToImageTest.csproj

@@ -59,6 +59,7 @@
       <Link>LicenseKey.cs</Link>
     </Compile>
     <Compile Include="PDFToImage.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
   <ItemGroup>
     <None Include="..\..\..\TestFile\CommonFivePage.pdf">

+ 36 - 0
Demo/Examples/Samples/PDFToImage/CS/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("TextToImageTest")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("PDF Technologies, Inc.")]
+[assembly: AssemblyProduct("TextExtractTest")]
+[assembly: AssemblyCopyright("Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.")]
+[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("7d255150-76cb-4a65-afea-f88778abf03b")]
+
+// 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.13.0.0")]
+[assembly: AssemblyFileVersion("1.13.0.0")]

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

@@ -2,7 +2,8 @@
 
     <PropertyGroup>
         <OutputType>Exe</OutputType>
-        <TargetFramework>net7.0</TargetFramework>
+        <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
+        <TargetFrameworks>net7.0;net461</TargetFrameworks>
         <LangVersion>7.3</LangVersion>
         <Configurations>Release;Debug</Configurations>
         <Platforms>AnyCPU;x64</Platforms>

+ 3 - 1
Demo/Examples/Samples/TextExtractTest/CS/TextExtractTest.csproj

@@ -2,10 +2,12 @@
 
     <PropertyGroup>
         <OutputType>Exe</OutputType>
-        <TargetFramework>net7.0</TargetFramework>
+        <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
+        <TargetFrameworks>net7.0;net461</TargetFrameworks>
         <LangVersion>7.3</LangVersion>
         <Configurations>Release;Debug</Configurations>
         <Platforms>AnyCPU;x64</Platforms>
+        <AssemblyName>Samples_ComPDFKit</AssemblyName>
     </PropertyGroup>
 
     <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">

+ 1 - 4
Demo/Examples/Samples/TextSearchTest/CS/Properties/AssemblyInfo.cs

@@ -1,6 +1,4 @@
-#if NET7_0
-#else
-using System.Reflection;
+using System.Reflection;
 using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
@@ -36,4 +34,3 @@ using System.Runtime.InteropServices;
 // [assembly: AssemblyVersion("1.0.*")]
 [assembly: AssemblyVersion("1.13.0.0")]
 [assembly: AssemblyFileVersion("1.13.0.0")]
-#endif

+ 3 - 1
Demo/Examples/Samples/TextSearchTest/CS/TextSearchTest.csproj

@@ -2,10 +2,12 @@
 
     <PropertyGroup>
         <OutputType>Exe</OutputType>
-        <TargetFramework>net7.0</TargetFramework>
+        <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
+        <TargetFrameworks>net7.0;net461</TargetFrameworks>
         <LangVersion>7.3</LangVersion>
         <Configurations>Release;Debug</Configurations>
         <Platforms>AnyCPU;x64</Platforms>
+        <AssemblyName>Samples_ComPDFKit</AssemblyName>
     </PropertyGroup>
 
     <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">

+ 2 - 5
Demo/Examples/Samples/WatermarkTest/CS/Properties/AssemblyInfo.cs

@@ -1,6 +1,4 @@
-#if NET7_0
-#else
-using System.Reflection;
+using System.Reflection;
 using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
@@ -35,5 +33,4 @@ using System.Runtime.InteropServices;
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
 [assembly: AssemblyVersion("1.13.0.0")]
-[assembly: AssemblyFileVersion("1.13.0.0")]
-#endif
+[assembly: AssemblyFileVersion("1.13.0.0")]

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

@@ -2,7 +2,8 @@
 
     <PropertyGroup>
         <OutputType>Exe</OutputType>
-        <TargetFramework>net7.0</TargetFramework>
+        <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
+        <TargetFrameworks>net7.0;net461</TargetFrameworks>
         <LangVersion>7.3</LangVersion>
         <Configurations>Release;Debug</Configurations>
         <Platforms>AnyCPU;x64</Platforms>