pdfGetFormFieldType
Get the type of a form field.
char *pdfGetFormFieldType(PDFFormFieldHandle field)
This function returns the type of a form field (whose handle was
obtained with
pdfGetFormField
). The field type is one of:
"PushButton"
"RadioButton"
"Checkbox"
"FileSelect"
"MultilineText"
"Text"
"ComboBox"
"ListBox"
"Signature"
C:
PDFFormFieldHandle field;
char *type, *name, *value;
int nameLength, page, maxLength, valueLength;
double xMin, yMin, xMax, yMax;
for (i = 0; i < pdfGetNumFormFields(pdf); ++i) {
field = pdfGetFormField(pdf, i);
type = pdfGetFormFieldType(field);
name = pdfGetFormFieldName(field, &nameLength);
pdfGetFormFieldBBox(field, &page, &xMin, &yMin, &xMax, &yMax);
maxLength = pdfGetFormFieldMaxLength(field);
value = pdfGetFormFieldValue(field, &valueLength);
...
if (value) {
...
pdfFreeMemory(value);
}
pdfFreeMemory(name);
}