Click or drag to resize
Pdf Library for .NET

PdfFormManagerXfaMode Property

Gets or sets how a form defined in XFA is filled: as XFA, or through its AcroForm fields. Default is Auto. It applies to the documents loaded after it is set.

Namespace: SelectPdf.Universal
Assembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.6
Syntax
public PdfFormXfaMode XfaMode { get; set; }

Property Value

PdfFormXfaMode
Remarks

A form that lays itself out (a dynamic XFA form) has its fields only in its XFA template. Filled as XFA, its fields are in Fields as the classic field types (a text, numeric, date or password field as PdfFormFieldTextBox, a check box as PdfFormFieldCheckBox, a drop-down list as PdfFormFieldComboBox, a list as PdfFormFieldListBox, a group of radio buttons as PdfFormFieldRadioButtonList, any other field as PdfFormField), with the pages and rectangles of the form as laid out. Setting a value runs the form's own scripts, as in Acrobat. The form is saved as the same dynamic form, or with Flatten as the pages it lays out.

A hybrid form has AcroForm fields beside its XFA. They are what Fields holds in every mode; with Xfa the XFA is kept and given the same values on save, so a viewer that shows the XFA shows them too.

Example
PdfFormManager manager = new PdfFormManager();
manager.XfaMode = PdfFormXfaMode.Xfa;
manager.Load("form.pdf");
if (manager.IsXfaForm)
    System.Console.WriteLine(manager.Fields.Count + " fields");
See Also