How can I implement interactive form field editing using PDFNet viewer?


What I need in my software is to allow user to open PDF documents,
fill them and save. Currently when I double click on a field there is
an alert box with text "Coordinate conversation test. Ok.", but I
can't modify value in the field.
So, I want to know is it possible with the help of PDFNet to allow
user to modify values in the fields.

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

We intentionally decided to keep PDFView class slim and generic so
that SDK users are not 'locked-in' using a control that is not doing
exactly what they want. We will probably offer additional, pre-
packaged tool modes in a form of plug-in classes 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'
  This is very similar to code implementing link navigation in
- 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 (
- 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 filed.RefreshAppearance() and pdfview.Update().
- After the user completes editing the form field, make sure to call
filed.RefreshAppearance() and pdfview.Update().

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