PdfFormField

public class PdfFormField

Represents a form field in a PDF document. Form fields can be terminal (with widget annotations) or non-terminal (with child fields). This is the base class for all form field types. Use the specific subclasses (, , , etc.) for type-specific functionality.

Inheritors

Constructors

Link copied to clipboard
public void PdfFormField()

Functions

Link copied to clipboard
public PdfFormField getChild(int index)
Gets a child field by index.
Link copied to clipboard
public int getChildCount()
The number of child fields.
Link copied to clipboard
The default value of the field.
Link copied to clipboard
public PdfFormFieldType getFieldType()
The type of this form field.
Link copied to clipboard
The fully qualified name of this field (dot-separated path from root).
Link copied to clipboard
public boolean getIsReadOnly()
Whether the field is read-only.
Link copied to clipboard
public boolean getIsRequired()
Whether the field is required.
Link copied to clipboard
public boolean getIsTerminal()
Whether this is a terminal field (has widget annotations instead of child fields).
Link copied to clipboard
public String getName()
The partial name of this field (T entry).
Link copied to clipboard
The parent field of this field, or null if this is a top-level field.
Link copied to clipboard
public String getValue()
The current value of the field.
Link copied to clipboard
public PdfWidgetAnnotation getWidget(int index)
Gets a widget annotation by index.
Link copied to clipboard
public int getWidgetCount()
The number of widget annotations.
Link copied to clipboard
public void removeChildAt(int index)
Removes a child field at the specified index.
Link copied to clipboard
public void setIsReadOnly(boolean value)
Whether the field is read-only.
Link copied to clipboard
public void setIsRequired(boolean value)
Whether the field is required.
Link copied to clipboard
public void setValue(String value)
The current value of the field.