We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to do Form Filling in WPF PDFViewer control?

Platform: WPF |
Control: PdfViewer |
Published Date: July 16, 2015 |
Last Revised Date: July 28, 2021
Tags: forms, wpf, pdfviewer

At Present, WPF PdfViewer control does not have Form Filling support. However, the below workaround can be used to perform the same action in WPF.

The following code snippet from the attached sample is an example to add a Field at particular location.


/// <summary>
/// Adds the Fields for particular page
/// </summary>
/// <param name="index">Index of the page</param>     
public void AddFields(int index)
  //FormFilesDictionary contains all the fields of particular PDF page
  foreach (var currentField in FormFilesDictionary[index])
     PdfPageBase page = ((PdfField)currentField).Page;
     //Adds a textbox if the current Field is Textbox
     if (currentField is PdfLoadedTextBoxField)
       PdfLoadedTextBoxField txtField = currentField as PdfLoadedTextBoxField;
       TextBox txtBlock = new TextBox();                    
       txtBlock.Text = txtField.Text;                  
       // Textbox will get added to the Page


2X faster development

The ultimate WPF UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile