How to Keep PDF Form Fields Visible but Prevent Printing
Question details
The user needs a PDF form field to be visible and editable on screen but excluded when printing the document, specifically when interacting with checkboxes.

- Product
- PDF Editor
- Device & OS
- not provided
- Scenario
- Designing interactive PDF forms with checkboxes that dynamically control field visibility.
- Observed behavior
- The field's display setting reverts to 'Visible' when a checkbox state changes, causing the field to print unexpectedly.
Ensure you have access to the JavaScript editing features in your PDF editor and save a backup copy of your interactive PDF form before modifying the scripts.
Configure Field Display Properties Using PDF JavaScript
Apply the display.noPrint property in your checkbox action script to ensure the target field stays visible on screen but does not appear on paper.
When a checkbox action script changes a field's state to 'Visible', it defaults to printing. To keep it visible for editing but hidden during printing, you must explicitly use the 'noPrint' display property instead of 'visible'.
Open your PDF form in edit mode, right-click the checkbox field, and open its Properties. Navigate to the Actions tab and select the option to edit the existing JavaScript.
Locate the script line that changes the field visibility. Instead of setting it to display.visible, change the code to set the field's display property to display.noPrint.
Ensure that if the field needs to be completely unavailable, the script uses display.hidden. Verify that no other checkbox scripts overwrite this setting back to display.visible.

Manually Adjust Form Field Visibility Settings
If you aren't using complex JavaScript overrides, you can set the default print behavior directly through the form field's General properties.
Easily Manage PDF Forms and Printing with WPS Office
WPS PDF provides a comprehensive set of tools for viewing, filling, and managing PDF forms. With its intuitive interface, configuring document printing preferences and handling form data is seamless.
- 1. Open your PDF: Launch WPS Office and open your interactive PDF document using the WPS PDF tool.
- 2. Fill or Edit Forms: Navigate to the Form tab to easily interact with or modify existing form fields.
- 3. Customize Print Options: Go to the Print menu to adjust what elements of the PDF are printed, ensuring your physical output matches your exact requirements.

Frequently Asked Questions
Why do my hidden PDF form fields still print?
This usually happens if the form field's print property is explicitly set to visible in the background, or if a custom JavaScript action (like checking a box) overrides the default field properties to 'display.visible' instead of 'display.noPrint'.
What is the JavaScript code to hide a field only when printing?
You can use this.getField('YourFieldName').display = display.noPrint; in your PDF's JavaScript editor to keep the field editable on the screen but prevent it from appearing on the printed page.
Does 'Visible but doesn't print' affect the exported PDF file?
No, 'Visible but doesn't print' only affects the physical printed output or the result when 'Print to PDF' is used. If you simply save or export the document, the field remains visible.
Can I apply this setting to buttons as well as text fields?
Yes, the display.noPrint property or 'Visible but doesn't print' setting can be applied to almost any interactive form control, including buttons, text fields, and dropdown menus.




