PDF Editing Issues

Hide PDF Form Buttons in Acrobat Full-Screen Mode and Restore Their States

Rana GarciaRana Garcia Nov 24, 2026 868 views

Question details

Hide PDF buttons and radio buttons in full-screen mode, then restore their previous visibility when full-screen mode ends.

Hide PDF Form Buttons in Acrobat Full-Screen Mode Without Losing Visibility States
Product
Adobe Acrobat PDF forms
Device & OS
not provided
Scenario
A PDF form needs a clean full-screen view without permanently changing controls that may already have different visibility settings.
Observed behavior
Buttons and radio buttons should be hidden during full-screen mode and return to their individual saved visibility states afterward.
Before you start

Open the form in a desktop version of Adobe Acrobat that supports document-level JavaScript, and check that JavaScript is enabled. Test the form in the PDF viewer your audience will use, because browser viewers and other PDF apps may not support Acrobat JavaScript or full-screen detection.

Solution 1Recommended

Save and restore form-control visibility with Acrobat JavaScript

Use a document-level script to detect full-screen mode and preserve each targeted field's existing display value.

The script saves the display value of each button and radio-button field before hiding it, then restores the saved values after full-screen mode ends. It does not change the selected radio value.

The script works at the field level. If separate widgets of the same field have different visibility settings, test them carefully; field-level restoration may not preserve those widget-specific differences.

1
Open document JavaScripts

In Acrobat, open the PDF and choose All tools > Use JavaScript > Document JavaScripts. Add a named document-level script; menu wording may vary by Acrobat version.

2
Add the visibility script

Paste this script into the editor and save it: var fsSavedDisplays = null; var fsWasFullScreen = false; function updateFullScreenFields() { var isFullScreen = app.fs.isFullScreen; if (isFullScreen && !fsWasFullScreen) { fsSavedDisplays = []; for (var i = 0; i < this.numFields; i++) { var name = this.getNthFieldName(i); var field = this.getField(name); if (field && (field.type === "button" || field.type === "radiobutton")) { fsSavedDisplays.push({ name: name, value: field.display }); field.display = display.hidden; } } } else if (!isFullScreen && fsWasFullScreen && fsSavedDisplays) { for (var j = 0; j < fsSavedDisplays.length; j++) { var saved = fsSavedDisplays[j]; var target = this.getField(saved.name); if (target) target.display = saved.value; } fsSavedDisplays = null; } fsWasFullScreen = isFullScreen; } var fsVisibilityTimer = app.setInterval("updateFullScreenFields()", 300);

3
Save and reopen the PDF

Choose File > Save, close the PDF, and reopen it so the document-level script starts. Allow JavaScript if Acrobat prompts you and you trust the document.

4
Test both transitions

Enter full-screen mode using View > Full Screen Mode, then exit with Esc. Confirm that buttons and radio buttons disappear and that both previously visible and previously hidden fields return to their original states.

Save and restore form-control visibility with Acrobat JavaScript
Check script interactions: The timer checks for changes periodically, so visibility may update with a short delay. Changes made by other scripts while full-screen mode is active will be replaced by the saved values on exit; coordinate those scripts if needed.
Free Microsoft Office alternative

View PDF Forms and Office Files with WPS Office

WPS Office is a free, lightweight alternative with a familiar interface for working with PDFs and Office files. Its Microsoft Office format compatibility makes migration straightforward, but it does not replace the Acrobat JavaScript solution for automatic full-screen visibility changes.

Open and view PDF forms alongside other documentsCompatible with Microsoft Word, Excel, and PowerPoint formatsFamiliar interface for an easier transition from Microsoft OfficeFree, lightweight suite for everyday document work
microsoft office alternative - wps office

Frequently Asked Questions

Why save each field's display value before hiding it?

A field may already be hidden or use another display setting. Saving field.display before setting display.hidden lets the script restore that specific setting instead of making every field visible.

Will this script hide text fields too?

No. The field.type check targets only button and radiobutton fields. Adjust the condition if other interactive field types also need to be hidden.

Does hiding a radio button clear its selection?

No. The script changes the field's display property, not its value. Test the form in Acrobat to confirm the selected option remains intact after exiting full-screen mode.

Why does the form still show controls in my browser?

Many browser PDF viewers do not support Acrobat document-level JavaScript or its full-screen APIs. Open the saved PDF in a compatible desktop Acrobat viewer and check that JavaScript is enabled.