You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Document-Processing/PDF/PDF-Library/NET/Working-with-Annotations.md
+126Lines changed: 126 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5068,6 +5068,132 @@ document.Close(True)
5068
5068
5069
5069
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Annotation/Adding-transparency-for-annotations/.NET).
5070
5070
5071
+
## Setting Annotation Intent in PdfFreeTextAnnotation
5072
+
5073
+
The [PdfAnnotationIntent.FreeTextTypeWriter](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Interactive.PdfAnnotationIntent.html#fields) value specifies that a `free text annotation` in a PDF should behave like a `typewriter-style input field`. This intent is especially useful for simulating manual typing on forms or documents, enabling users to add clear, typed comments or responses.
5074
+
5075
+
{% tabs %}
5076
+
5077
+
{% highlight c# tabtitle="C# [Cross-platform]" %}
5078
+
5079
+
using Syncfusion.Drawing;
5080
+
using Syncfusion.Pdf;
5081
+
using Syncfusion.Pdf.Graphics;
5082
+
using Syncfusion.Pdf.Interactive;
5083
+
5084
+
// Create a new PDF document
5085
+
using (PdfDocument document = new PdfDocument())
5086
+
{
5087
+
// Add a page
5088
+
PdfPage page = document.Pages.Add();
5089
+
5090
+
// Define the bounds for the annotation
5091
+
RectangleF bounds = new RectangleF(100, 100, 200, 50);
5092
+
5093
+
// Create a FreeText annotation
5094
+
PdfFreeTextAnnotation freeText = new PdfFreeTextAnnotation(bounds);
5095
+
// Add content.
5096
+
freeText.Text = "Add Free Text Annotation with Intent";
freeText.Font = New PdfStandardFont(PdfFontFamily.Helvetica, 12)
5180
+
freeText.TextMarkupColor = Color.Black
5181
+
freeText.BorderColor = Color.Gray
5182
+
freeText.Color = Color.LightYellow
5183
+
5184
+
' Add the annotation to the page
5185
+
page.Annotations.Add(freeText)
5186
+
5187
+
' Save the document
5188
+
document.Save("Output.pdf")
5189
+
End Using
5190
+
5191
+
{% endhighlight %}
5192
+
5193
+
{% endtabs %}
5194
+
5195
+
You can download a complete working sample from GitHub.
5196
+
5071
5197
## Adding comments and review status to the PDF annotation
5072
5198
5073
5199
The PDF annotations may have an author-specific state associated with them. The state is not specified in the annotation itself, but it represents a separate text annotation ([Popup Annotation](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Interactive.PdfPopupAnnotation.html)).
0 commit comments