pdfGetFormFieldName

Get the name of a form field.
char *pdfGetFormFieldName(PDFFormFieldHandle field, int *length)
This function returns the name of a form field (whose handle was obtained with pdfGetFormField).

A string is returned, and *length is filled in with the string length. The string will be zero-terminated, but it may contain zero bytes, depending on the current text encoding (see pdfSetTextEncoding). The caller is responsible for freeing the string with the pdfFreeMemory function.

C:
PDFFormFieldHandle field; char *type, *name, *value; int nameLength, valueLength; for (i = 0; i < pdfGetNumFormFields(pdf); ++i) { field = pdfGetFormField(pdf, i); type = pdfGetFormFieldType(field); name = pdfGetFormFieldName(field, &nameLength); value = pdfGetFormFieldValue(field, &valueLength); ... if (value) { ... pdfFreeMemory(value); } pdfFreeMemory(name); }
pdfGetFormType
pdfGetNumFormFields
pdfGetFormField
pdfGetFormFieldType
pdfGetFormFieldValue