addPushButtonField

public final PdfPushButtonField addPushButtonField(String name, PdfPage page, float x, float y, float width, float height)

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

Return

The newly created .

Parameters

name

The name of the push button field. Must be unique within the document.

page

The page where the push button 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.