| layout | post |
|---|---|
| title | Change the Current user in PdfViewer | Syncfusion |
| description | Learn about how to Change the CurrentUser in Syncfusion<sup>®</sup>; WPF Pdf Viewer control using CurrentUser property. |
| platform | document-processing |
| control | PDF Viewer |
| documentation | ug |
The PDF Viewer allows you to change the CurrentUser. If the CurrentUser property is not set, it defaults to the system user name. When you set the CurrentUser, the changes will be reflected in the author property of newly added annotations. The following code example illustrates how to set the CurrentUser:
{% tabs %} {% highlight C# %}
//Initialize PDF Viewer. PdfViewerControl pdfViewer = new PdfViewerControl(); //Load the PDF. pdfViewer.Load("Sample.pdf");
//Changing the CurrentUser of document pdfViewer.CurrentUser = "set the name here"; {% endhighlight %}
{% highlight vbnet %}
'Initialize PDF Viewer. Private pdfViewer As New PdfViewerControl() 'Load the PDF. pdfViewer.Load("Sample.pdf")
'Changing the CurrentUser of document pdfViewer.CurrentUser = "set the name here";
{% endhighlight %} {% endtabs %}