PDF Editing Issues

Export PDF Form Field Properties to CSV with Acrobat JavaScript

Maira MehtabMaira Mehtab Nov 19, 2026 868 views

Question details

Export PDF checkbox field names and dimensions to a spreadsheet so undersized fields can be reviewed.

Export PDF Form Field Properties to CSV with Acrobat JavaScript
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.
Before you start

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.

Solution 1Recommended

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.

1
Install the PDF library

Install Python if needed, then open a terminal and run: python -m pip install pymupdf

2
Create the script

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)

3
Run the report

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.

4
Review the results

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.

Export checkbox properties from a folder with Python
Protected and noninteractive forms: The example skips password-protected PDFs and does not detect checkboxes that are only part of a scanned image. If a file cannot be fully processed, its report rows may be incomplete.
Free Microsoft Office alternative

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.

Open and filter checkbox reports in WPS Spreadsheets.Work with Microsoft Excel formats such as XLSX and XLS.Use a familiar interface for a straightforward transition from Microsoft Office.Access a free, lightweight office suite for everyday document work.
microsoft office alternative - wps office

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.