addTextField

public final PdfTextField addTextField(String name, PdfPage page, float x, float y, float width, float height)

Adds a new text field to the document on the specified page. After creation, use the returned field's properties to set optional values: - The text content - The font size - The text color - The background color - The border color

Return

The newly created .

Parameters

name

The name of the text field. Must be unique within the document.

page

The page where the text field will be placed.

x

The x coordinate of the field's origin in points.

y

The y coordinate of the field's origin in points.

width

The width of the field in points.

height

The height of the field in points.

Throws

Thrown when no document is loaded.

Thrown when the field creation fails.