Click or drag to resize
Pdf Library for .NET

HtmlToPdfOptionsCreateFormFields Property

Converts the controls of the html forms into fillable PDF form fields.

Namespace: SelectPdf.Universal
Assembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.5
Syntax
public bool CreateFormFields { get; set; }

Property Value

Boolean
Remarks

The default value of this property is False: the controls are printed as they look on the page.

When True, every visible input (text, password, email, number, search, tel, url, date and time types, checkbox and radio), select and textarea becomes a field of the matching kind - a text box (multiline for a textarea, a password box for a password input), a check box, a radio button group (by input name), a combo box or a list box (for a select multiple) - placed over the control as it was printed, so the page's own border and background stay. The field takes the control's current value, checked state or selection, its name (or id), and its read-only, required and maximum length settings; the text the control painted is cleared first, so the value appears once. A password input's value is not carried. Hidden, file, image and button inputs are not converted, and neither are form actions or scripted validation.

The controls are read after the page's own scripts and PostLoadingScript have run, so this requires JavaScriptEnabled. In a tagged document every field joins the structure tree as a Form element; in a document that must embed its fonts (PDF/A, PDF/UA, PDF/X) the fields are drawn with an embedded font.

See Also