How to Fix PDF Form Radio Buttons and Checkboxes Returning Off Values
Question details
Users encounter an issue where PDF form radio buttons and checkboxes return 'Off', '0', or other unexpected values when read by Apache PDFBox after the document is saved.

- Product
- Adobe Acrobat / Apache PDFBox
- Device & OS
- not provided
- Scenario
- Reading data from a saved PDF survey form using Apache PDFBox scripts.
- Observed behavior
- Checkboxes and radio buttons output 'Off', '0', or incorrect values instead of the expected selected states.
Ensure you have the latest version of Apache PDFBox installed, as parsing errors are frequently resolved in updated releases. Also, verify that the PDF form was correctly saved without corrupting the interactive elements.
Verify Export Values in PDF Form Properties
Check the properties of your radio buttons and checkboxes to ensure correct export values are set for the selected states.
It is standard PDF specification behavior for an unselected radio button or checkbox to return the value 'Off'. However, if selected items also return 'Off' or '0', the export values might be missing or improperly configured in the form authoring software.
Open your survey form in Adobe Acrobat and navigate to the 'Prepare Form' tool.
Right-click the problematic checkbox or radio button and select 'Properties' from the context menu.
Navigate to the 'Options' tab within the Properties dialog box.
Ensure the 'Export Value' field contains the correct data string (e.g., 'Yes', '1', or 'Choice A') instead of being blank. Save the PDF and test again.

Report Bug to Apache PDFBox Issue Tracker
If the PDF form's appearance states and export values are perfectly correct but the issue persists, the problem may lie within the PDFBox parser.
Create and Fill PDF Forms Smoothly with WPS Office
Avoid complex parsing errors and form corruption by using WPS Office to create, fill, and manage your PDF forms. WPS Office provides an intuitive interface for handling interactive PDF elements, ensuring data is reliably saved, exported, and highly compatible with standard PDF structures.
- 1. Open WPS PDF: Launch WPS Office and click on 'PDF' to access the professional PDF editor.
- 2. Open Your Document: Open your existing PDF survey or create a new blank document.
- 3. Manage Form Fields: Navigate to the 'Form' tab to insert or modify text fields, checkboxes, and radio buttons, ensuring clear export values are defined.
- 4. Save and Export: Save the document locally to ensure all interactive elements and states are securely embedded for standardized processing.

Frequently Asked Questions
Why does a checkbox return 'Off' even when I assigned it a specific value?
'Off' is the default standard value defined in the PDF specification for any unselected checkbox or radio button. The specific export value you assigned is only returned when the field is actively checked or selected by the user.
Can saving a PDF in different software corrupt form values?
Yes, opening and saving interactive PDFs in certain third-party PDF readers or using virtual print-to-PDF tools can flatten the document or alter the interactive form dictionaries. This causes parsers like PDFBox to read incorrect states. Always save forms using standard, compliant PDF editors.
How do I read PDF form data without writing custom parser code?
You can export form data directly to a spreadsheet or CSV format using professional PDF editors like Adobe Acrobat or WPS Office Premium. This built-in functionality extracts the selected values securely, eliminating the need for custom Java parsing scripts.




