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..dac3d4e4 --- /dev/null +++ b/Annotation/Setting-Annotation-Intent/.NET/Setting-Annotation-Intent/Program.cs @@ -0,0 +1,33 @@ +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")); +} \ 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..f69bf2ff --- /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 + + + + + + +