Interactive PDF form filling using PDF4NET.View viewer controls
In a previous article we have shown how to read and fill PDF forms using standard PDF4NET library. The PDF4NET.View suite of controls brings support for interactive PDF form filling.
When you load a PDF form into the PDFDocumentView control, the included form is ready to use immediately and the end user can interact with the controls: enter text in the form fields, check the checkboxes, etc.
The fields in the PDF form that are displayed in the PDFDocumentView control are represented by the PDFVisualField class and its descendants.
The value of each field filed in by the end user is available through the field's Value property or the field specific properties. For example, for text fields the value is also available through field's Text property.
If the value of a PDF field is updated from code, the corresponding field in the PDFDocumentView control is updated automatically. If a PDF form field has multiple widgets and the end user updates the value in one widget, the other widgets are updated automatically.
Read-only fields cannot be modified interactively in the PDFDocumentView control but they can be modified in code.
If you want to disable the interactive form filling capabilities in PDFDocumentView control but you do not want to modify the PDF form and make each form field read-only, you can set the EnableInteractivePDFFormFilling property to false.
The PDF form fields can be hidden in the PDFDocumentView control if the ShowFormFields property is set to false.