Class Form

Form class

Class representing form object.

public sealed class Form : ICollection<WidgetAnnotation>


AutoRecalculate { get; set; }If set, all form fields will be recalculated when any field is changed. Default value is true. Set to false in order to increase performance when filling form with large amount of calculated fields.
AutoRestoreForm { get; set; }If set, absent form fields will be automatically created if they present in annotations.
CalculatedFields { set; }Allows to set order of field calculation.
Count { get; }Gets number of the fields on this form.
DefaultAppearance { get; set; }Gets or sets default appearance of the form (object which describes default font, text size and color for fields on the form).
DefaultResources { get; }Gets default resources placed on this form.
EmulateRequierdGroups { get; set; }If this property is true then additional red boundary rectangles will be drawn for required Xfa exclGroup elements containers This property was introduced because absences of analogues for the exclGroup during conversion Xfa representation of forms to standard. It is false by default.
Fields { get; }Gets list of all fields in lowest level of hierarhical form.
IgnoreNeedsRendering { get; set; }If this property is true the value of NeedsRendering key will be ignored during conversion XFA form to Standard form. It is false by default.
IsSynchronized { get; }Returns true if object is thread-safe.
Item { get; }Gets field of the form by field name. Throws excpetion if the field was not found. (2 indexers)
RemovePermission { get; set; }If this property is true the “Perms” dictionary will be removed from the pdf document after conversion dynamic documents to standard. The “Perms” dictionary can contain a rules that disturb displaying selection of mandatory fields in Adobe Acrobat reader. It is false by default.
SignaturesAppendOnly { get; set; }If set, the document contains signatures that may be invalidated if the file is saved (written) in a way that alters its previous contents, as opposed to an incremental update.
SignaturesExist { get; set; }If set, the document contains at least one signature field.
SyncRoot { get; }Returns synchronization object.
Type { get; set; }Gets type of the form. Possible values are: Standard, Static, Dynamic.
XFA { get; }Gets XFA data of the form (if presents).


Add(Field)Adds field on the form.
Add(Field, int)Adds field on the form.
Add(Field, string, int)Adds new field to the form; If this field is already placed on other or this form, the copy of field is created.
AddFieldAppearance(Field, int, Rectangle)Adds additional appearance of the field to specified page of the document in the specified location.
AssignXfa(XmlDocument)Sets XFA of the form to specified value.
CopyTo(Field[], int)Copies fields placed on the form into array.
Delete(Field)Delete field from the form.
Delete(string)Deletes field from the form by its name.
Flatten()Removes all form fields and place their values directly on the page.
GetEnumerator()Gets enumeration of form fields.
GetFieldsInRect(Rectangle)Returns fields inside of specified rectangle.
HasField(Field)Check if the form already has specified field.
HasField(string)Determines if the field with specified name already added to the Form.
HasField(string, bool)Determines if the field with specified name already added to the Form, with ability to look into children hierarchy of fields.
RemoveFieldAppearance(Field, int)Removes appearance of the field at specified index. If only one child appearance left, method embeds it into the field.


SignDependentElementsRenderingModeWhenConvertedForms can contain signing information, i.e. can be signed or unsigned. And form’s view sometimes must depend on whether form is signed or not. This property tells to form’s converter (f.e. during conversion XFA form to Standard form) whether result form must be rendered as signed or as unsigned.

Other Members

class FlattenSettingsClass which describes settings for Form flattening procedure.
enum SignDependentElementsRenderingModesForms can contain signing information and can be signed or unsigned. Sometimes view of forms in viewer must depend on whether form is signed or not. This enum enumerates possible rendering modes during convertion of form type in regard to sign.

See Also