PDF Editing Issues

How to Keep PDF Form Fields Visible but Prevent Printing

Anum MushtaqAnum Mushtaq Nov 3, 2026 869 views

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.

How to Keep PDF Form Fields Visible but Prevent Printing
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.
Before you start

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.

Solution 1Recommended

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'.

1
Open JavaScript Editor

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.

2
Modify the Display Script

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.

3
Handle Hidden States

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.

Configure Field Display Properties Using PDF JavaScript
JavaScript Syntax: Use this.getField('FieldName').display = display.noPrint; in your custom calculation or action script.
Powerful PDF Editor

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. 1. Open your PDF: Launch WPS Office and open your interactive PDF document using the WPS PDF tool.
  2. 2. Fill or Edit Forms: Navigate to the Form tab to easily interact with or modify existing form fields.
  3. 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.
View, edit, and fill interactive PDF forms effortlessly.Advanced print settings to control exactly what document elements are printed.Highly compatible with Adobe Acrobat PDF formats.Lightweight, fast, and available across multiple platforms.
microsoft office alternative - wps office

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.