Export PDF Form Field Properties to CSV with Acrobat JavaScript
Question details
Export PDF checkbox field names and dimensions to a spreadsheet so undersized fields can be reviewed.

- Product
- Adobe Acrobat and PDF forms
- Device & OS
- not provided
- Scenario
- The user has a large folder of PDF forms and wants to identify checkboxes below a chosen size.
- Observed behavior
- The desired report lists checkbox names, widths, heights, and areas, with small fields flagged for review.
Choose a minimum acceptable checkbox width and height in points; 72 points equal one inch. Confirm that the PDFs contain interactive form fields rather than checkbox images, and have passwords available for protected files.
Export checkbox properties from a folder with Python
Use this approach to scan a folder and its subfolders and create one CSV report for review in a spreadsheet.
The example flags a checkbox if either dimension is below 12 points. Change MIN_SIZE to match your requirements. Width and height are in points, and area is in square points.
Install Python if needed, then open a terminal and run: python -m pip install pymupdf
Create a file named pdf_checkbox_report.py and paste this code: import csv import sys from pathlib import Path import fitz MIN_SIZE = 12.0 folder = Path(sys.argv[1]) output = Path(sys.argv[2]) with output.open('w', newline='', encoding='utf-8-sig') as report: writer = csv.writer(report) writer.writerow(['file', 'page', 'field_name', 'width_pt', 'height_pt', 'area_sq_pt', 'too_small']) for path in folder.rglob('*'): if not path.is_file() or path.suffix.lower() != '.pdf': continue try: with fitz.open(path) as doc: if doc.needs_pass: print(f'Skipped password-protected file: {path}', file=sys.stderr) continue for page in doc: for widget in page.widgets() or []: if widget.field_type != fitz.PDF_WIDGET_TYPE_CHECKBOX: continue width = widget.rect.width height = widget.rect.height writer.writerow([str(path), page.number + 1, widget.field_name or '', round(width, 2), round(height, 2), round(width * height, 2), width < MIN_SIZE or height < MIN_SIZE]) except Exception as exc: print(f'Could not fully process {path}: {exc}', file=sys.stderr)
In the terminal, run python pdf_checkbox_report.py "path/to/pdf-folder" "checkbox-report.csv", replacing both paths with your own. Check the terminal for files that were skipped or could not be fully processed.
Open checkbox-report.csv in a spreadsheet and filter the too_small column for TRUE. Use the file and page columns to locate each field in its PDF.

Inspect checkbox properties in the Acrobat JavaScript console
Use Acrobat's JavaScript console to create a CSV-style report for the PDF currently open in Acrobat.
Review PDF checkbox reports in WPS Office
After exporting your report, use WPS Office as a free, lightweight alternative to Microsoft Office. Its familiar spreadsheet interface and format compatibility make it easy to move existing files and review CSV results.

Frequently Asked Questions
Can Acrobat JavaScript scan every PDF in a folder from the console?
The console example operates on the currently open PDF. For a folder, use a batch workflow such as the Python script above, or configure an Acrobat Action with JavaScript where supported.
How do I choose the minimum checkbox size?
Set MIN_SIZE in the Python script or minSize in the Acrobat script to your desired minimum dimension in points. A checkbox is flagged when its width or height is below that value.
Why is a checkbox missing from the report?
The scripts inspect interactive checkbox fields, not checkbox images in scanned or flattened PDFs. The Python script also skips password-protected files; check the terminal for skipped files and processing errors.
Can I open the CSV report in Excel or WPS Spreadsheets?
Yes. Open the .csv file in either application and filter the too_small column to review flagged checkboxes. You can then save a working copy in XLSX format.




