Method AddTextField
- Namespace
- SoftZenPdf
- Assembly
- SoftZenPdf.dll
AddTextField(string, double, double, double, double, string)
Adds a single-line text field; set Multiline for a text area.
public PdfTextField AddTextField(string name, double x, double y, double width, double height, string value = "")
Parameters
namestringA unique field name, without dots.
xdoubleLeft edge of the field, in points.
ydoubleBottom edge of the field, in points.
widthdoubleField width, in points.
heightdoubleField height, in points.
valuestringThe initial value.
Returns
- PdfTextField
The field, for further settings such as font size or maximum length.
Exceptions
- ArgumentException
The name is empty, contains a dot, or is already used.
- InvalidOperationException
The document was created for PDF/A, where form fields are not supported yet.