From e53d9e67bddfe8712c6851ff3476802fa96b5b36 Mon Sep 17 00:00:00 2001 From: sameerkhan001 Date: Fri, 24 Oct 2025 16:45:45 +0530 Subject: [PATCH 1/3] 260184: Added code example for setting annotation intent. --- .../.NET/Setting-Annotation-Intent.sln | 25 +++++++++++++ .../Output/gitkeep.txt | 0 .../.NET/Setting-Annotation-Intent/Program.cs | 36 +++++++++++++++++++ .../Setting-Annotation-Intent.csproj | 15 ++++++++ 4 files changed, 76 insertions(+) create mode 100644 Annotation/Setting-Annotation-Intent/.NET/Setting-Annotation-Intent.sln create mode 100644 Annotation/Setting-Annotation-Intent/.NET/Setting-Annotation-Intent/Output/gitkeep.txt create mode 100644 Annotation/Setting-Annotation-Intent/.NET/Setting-Annotation-Intent/Program.cs create mode 100644 Annotation/Setting-Annotation-Intent/.NET/Setting-Annotation-Intent/Setting-Annotation-Intent.csproj diff --git a/Annotation/Setting-Annotation-Intent/.NET/Setting-Annotation-Intent.sln b/Annotation/Setting-Annotation-Intent/.NET/Setting-Annotation-Intent.sln new file mode 100644 index 00000000..f026b5f6 --- /dev/null +++ b/Annotation/Setting-Annotation-Intent/.NET/Setting-Annotation-Intent.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.14.36616.10 d17.14 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Setting-Annotation-Intent", "Setting-Annotation-Intent\Setting-Annotation-Intent.csproj", "{496FAA15-3DB2-40D7-8A99-5800A2457E19}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {496FAA15-3DB2-40D7-8A99-5800A2457E19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {496FAA15-3DB2-40D7-8A99-5800A2457E19}.Debug|Any CPU.Build.0 = Debug|Any CPU + {496FAA15-3DB2-40D7-8A99-5800A2457E19}.Release|Any CPU.ActiveCfg = Release|Any CPU + {496FAA15-3DB2-40D7-8A99-5800A2457E19}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {6881FD4D-ED63-4653-BD6A-98DBA5EF6D52} + EndGlobalSection +EndGlobal diff --git a/Annotation/Setting-Annotation-Intent/.NET/Setting-Annotation-Intent/Output/gitkeep.txt b/Annotation/Setting-Annotation-Intent/.NET/Setting-Annotation-Intent/Output/gitkeep.txt new file mode 100644 index 00000000..e69de29b diff --git a/Annotation/Setting-Annotation-Intent/.NET/Setting-Annotation-Intent/Program.cs b/Annotation/Setting-Annotation-Intent/.NET/Setting-Annotation-Intent/Program.cs new file mode 100644 index 00000000..0e998e1f --- /dev/null +++ b/Annotation/Setting-Annotation-Intent/.NET/Setting-Annotation-Intent/Program.cs @@ -0,0 +1,36 @@ +using Syncfusion.Drawing; +using Syncfusion.Pdf; +using Syncfusion.Pdf.Graphics; +using Syncfusion.Pdf.Interactive; + +// Create a new PDF document +using (PdfDocument document = new PdfDocument()) +{ + // Add a page + PdfPage page = document.Pages.Add(); + + // Define the bounds for the annotation + RectangleF bounds = new RectangleF(100, 100, 200, 50); + + // Create a FreeText annotation + PdfFreeTextAnnotation freeText = new PdfFreeTextAnnotation(bounds); + // Add content. + freeText.Text = "Add Free Text Annotation with Intent"; + // Set the annotation intent to TypeWriter + freeText.AnnotationIntent = PdfAnnotationIntent.FreeTextTypeWriter; + + // Customize appearance + freeText.Font = new PdfStandardFont(PdfFontFamily.Helvetica, 12); + freeText.TextMarkupColor = Color.Black; + freeText.BorderColor = Color.Gray; + freeText.Color = Color.LightYellow; + + // Add the annotation to the page + page.Annotations.Add(freeText); + + // Save the document + document.Save(Path.GetFullPath(@"Output/Output.pdf")); + + // Close the document + document.Close(true); +} \ No newline at end of file diff --git a/Annotation/Setting-Annotation-Intent/.NET/Setting-Annotation-Intent/Setting-Annotation-Intent.csproj b/Annotation/Setting-Annotation-Intent/.NET/Setting-Annotation-Intent/Setting-Annotation-Intent.csproj new file mode 100644 index 00000000..9e9e132a --- /dev/null +++ b/Annotation/Setting-Annotation-Intent/.NET/Setting-Annotation-Intent/Setting-Annotation-Intent.csproj @@ -0,0 +1,15 @@ + + + + Exe + net8.0 + Setting_Annotation_Intent + enable + enable + + + + + + + From 07203b6f32b26c90ab69d421d51ae24c8f3bfe6a Mon Sep 17 00:00:00 2001 From: sameerkhan001 Date: Fri, 24 Oct 2025 16:47:26 +0530 Subject: [PATCH 2/3] 260184: Updated the version changes. --- .../Setting-Annotation-Intent/Setting-Annotation-Intent.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Annotation/Setting-Annotation-Intent/.NET/Setting-Annotation-Intent/Setting-Annotation-Intent.csproj b/Annotation/Setting-Annotation-Intent/.NET/Setting-Annotation-Intent/Setting-Annotation-Intent.csproj index 9e9e132a..f69bf2ff 100644 --- a/Annotation/Setting-Annotation-Intent/.NET/Setting-Annotation-Intent/Setting-Annotation-Intent.csproj +++ b/Annotation/Setting-Annotation-Intent/.NET/Setting-Annotation-Intent/Setting-Annotation-Intent.csproj @@ -9,7 +9,7 @@ - + From f13090fd1547525c1cca293e3b7089b2959d6b33 Mon Sep 17 00:00:00 2001 From: sameerkhan001 Date: Fri, 24 Oct 2025 17:56:55 +0530 Subject: [PATCH 3/3] 260184: Removed unwanted changes. --- .../.NET/Setting-Annotation-Intent/Program.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/Annotation/Setting-Annotation-Intent/.NET/Setting-Annotation-Intent/Program.cs b/Annotation/Setting-Annotation-Intent/.NET/Setting-Annotation-Intent/Program.cs index 0e998e1f..dac3d4e4 100644 --- a/Annotation/Setting-Annotation-Intent/.NET/Setting-Annotation-Intent/Program.cs +++ b/Annotation/Setting-Annotation-Intent/.NET/Setting-Annotation-Intent/Program.cs @@ -30,7 +30,4 @@ // Save the document document.Save(Path.GetFullPath(@"Output/Output.pdf")); - - // Close the document - document.Close(true); } \ No newline at end of file