pdfGetFormFieldBBox
Get a form field's bounding box.
void pdfGetFormFieldBBox(PDFFormFieldHandle field, int *page, double *xMin, double *yMin, double *xMax, double *yMax)
This function returns the page number and bounding box of a form field
(whose handle was obtained with
pdfGetFormField
). The bounding
box is in the PDF coordinate space.
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);
}