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
+135Lines changed: 135 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5068,6 +5068,141 @@ 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)
5186
+
freeText.TextMarkupColor = Color.Black
5187
+
freeText.BorderColor = Color.Gray
5188
+
freeText.Color = Color.LightYellow
5189
+
5190
+
' Add the annotation to the page
5191
+
page.Annotations.Add(freeText)
5192
+
5193
+
' Save the document
5194
+
document.Save("Output.pdf")
5195
+
5196
+
' Close the document
5197
+
document.Close(True)
5198
+
End Using
5199
+
5200
+
{% endhighlight %}
5201
+
5202
+
{% endtabs %}
5203
+
5204
+
You can download a complete working sample from GitHub.
5205
+
5071
5206
## Adding comments and review status to the PDF annotation
5072
5207
5073
5208
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