Skip to content

Commit 77a6402

Browse files
authored
Merge pull request #1539 from syncfusion-content/917118_hotfix
UG documentation about changing the Font Family of Free text annotation
2 parents 60f318f + f5e9bf6 commit 77a6402

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

wpf/Pdf-Viewer/Working-with-Annotations/Text-Annotation.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,32 @@ End Sub
132132
{% endhighlight %}
133133
{% endtabs %}
134134

135+
## Setting the font family of the text annotation
136+
137+
The font family of the text annotation can be customized either at the time of inclusion or after the inclusion. The following code shows how to set the font family of the text annotation at the time of inclusion.
138+
139+
{% tabs %}
140+
{% highlight C# %}
141+
142+
private void Window_Loaded(object sender, RoutedEventArgs e)
143+
{
144+
PdfLoadedDocument pdf = new PdfLoadedDocument("Input.pdf");
145+
pdfviewer.Load(pdf);
146+
pdfviewer.FreeTextAnnotationSettings.FontFamily = new System.Windows.Media.FontFamily("font family");
147+
}
148+
149+
{% endhighlight %}
150+
{% highlight vbnet %}
151+
152+
Private Sub Window_Loaded(sender As Object, e As RoutedEventArgs)
153+
Dim pdf As New PdfLoadedDocument(“Input.pdf”)
154+
pdfViewer.Load(pdf)
155+
pdfviewer.FreeTextAnnotationSettings.FontFamily = new System.Windows.Media.FontFamily("font family")
156+
End Sub
157+
158+
{% endhighlight %}
159+
{% endtabs %}
160+
135161
## Working with included/existing text annotations
136162

137163
The included/existing text annotations are moved, resized, edited, customized, and deleted. To perform these operations, select the included/existing text annotation and right-click over the selected annotation, a pop-up context menu will appear with the following options:

0 commit comments

Comments
 (0)