How do I implement interactive form filling using PDFView control?


I have fillable PDF documents that i would like to show in the PDFView
control, but the fillable fields do not seem to work. Is there
something i can do to enable fillable fields? or is this feature not
supported yet?

You can use PDFNet SDK ( to implement PDF viewing
and PDF forms processing (for a high-level overview of available
functionality, please see

As a starting point you may want to take a look at the following two


PDFView class is a generic class for viewing PDF documents. It only
implements basic page scrolling and navigation (i.e. a 'pan' and 'text
select' tool). Additional tool modes (such as form field editing,
annotation and markup editing, etc) can be implemented by deriving
from PDFView class as illustrated in MyPDFView (

We intentionally decided to keep the PDFView class relatively generic
so that SDK users are not 'locked-in' to using a control that is not
doing exactly what they want. We are planning to offer additional, pre-
packaged tool modes in form of built-in utility classes and/or free
source code.

In the meantime, there are several ways you could implement form field
editing. The simplest approach is as follows:

- When MyPDFView.OnMouseDown event find the corresponding 'widget'
annotation. This is very similar to code implementing link navigation
in MyPDFView.cs.
- Once you identify widget annotation, you can obtain its PDF.Field
using annot.GetWidgetField(). You can use read, write, or edit widget
fields as illustrated in 'InteractiveForms' sample project (http://
- You can then modify Form field:
   a) pop-up a dialog-box asking the user to fill-out or modify the
   b) (a bit more complicated) start editing the form-filed in-place
calling periodically field.RefreshAppearance() and pdfview.Update().
- After the user completes editing the form field, make sure to call
field.RefreshAppearance() and pdfview.Update().

Another (more complicated) approach is to disable annotation drawing
in the PDFView class (i.e pdfview.SetDrawAnnotations(false)), and then
use the
GDI+/.NET API to draw widget text in OnPaint(). Then, when you are
save the document, you should call doc.RefreshFieldAppearances

Again, we are planning to offer built-im form field editing as a built-
in option (similar to existing text selection) in one of the upcoming