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

name string

A unique field name, without dots.

x double

Left edge of the field, in points.

y double

Bottom edge of the field, in points.

width double

Field width, in points.

height double

Field height, in points.

value string

The 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.