addCheckBoxField

public final PdfCheckBoxField addCheckBoxField(String name, PdfPage page, float x, float y, float width, float height)

Adds a new check box field to the document on the specified page. After creation, use the returned field's properties to set optional values: - The checked state - The background color - The border color

Return

The newly created .

Parameters

name

The name of the check box field. Must be unique within the document.

page

The page where the check box 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.