How to Create Hover Pop-Ups in an Interactive PDF
Question details
The user wants to display an image or text panel that appears when a reader interacts with a specific area of an interactive PDF.

- Product
- Device & OS
- not provided
- Scenario
- Designing an interactive PDF that requires hidden form fields and scripting to reveal text or image pop-ups upon user interaction.
- Observed behavior
- Creating hover effects in standard PDFs requires utilizing form fields and custom JavaScript, as native PDF elements do not support dynamic visibility by default.
Ensure you are using an advanced PDF editor that supports form creation and JavaScript, such as Adobe Acrobat Pro, as standard PDF readers cannot build or edit these interactive elements.
Use Button Fields and JavaScript to Create a Hover Pop-Up
By creating two separate button fields and applying a simple JavaScript action, you can make an image or text field appear when a user hovers over or clicks the trigger button.
This method involves creating a 'target' field that holds your pop-up content and a 'trigger' field placed over your interactive document area. Custom scripting is then used to toggle the visibility of the target field.
Add a new Button form field that will contain your pop-up image or text as its appearance. In the field's Properties, go to the General tab and set the Form Field to 'Hidden' so it does not display by default.
Add a second Button form field over the area you want the reader to interact with. If this is over existing text or images, make the button's fill and border colors transparent.
Right-click the trigger field, open Properties, and navigate to the Actions tab. Choose 'Mouse Enter' (for a hover effect) or 'Mouse Up' (for a click effect) from the Select Trigger dropdown.
Select 'Run a JavaScript' from the Select Action dropdown and click Add. Enter the script to display the hidden field: this.getField('YourTargetFieldName').display = display.visible;
Add a second action to the trigger field using the 'Mouse Exit' trigger. Add a script to hide the field when the mouse leaves: this.getField('YourTargetFieldName').display = display.hidden;

Easily Add Pop-Up Notes and Interactions with WPS Office
If writing JavaScript and configuring hidden form fields seems too complex, WPS Office provides an intuitive way to add interactive pop-up notes, hyperlinks, and comments to your PDFs without any coding required.
- 1. Open your PDF: Launch WPS Office and open your PDF document.
- 2. Access Comment Tools: Navigate to the 'Comment' tab located on the top ribbon menu.
- 3. Add an Interactive Note: Click the 'Note' tool and place it anywhere on your document. This creates an interactive icon that displays your text as a pop-up when hovered or clicked.
- 4. Customize the Appearance: Right-click the note to change its color, icon style, and author name to seamlessly blend with your PDF design.

Frequently Asked Questions
Why doesn't my hover pop-up work on mobile devices?
Hover interactions rely on a mouse cursor, which touchscreens lack. For a mobile-friendly interactive PDF, you should assign the JavaScript action to a click event (Mouse Up) rather than a hover event (Mouse Enter).
Will this interactive PDF work in a web browser?
Built-in browser PDF viewers (like Chrome, Edge, or Safari) have limited support for JavaScript and advanced form fields. For the interactive pop-ups to function correctly, users should open the file in a dedicated PDF reader.
Can I make an image pop-up instead of text?
Yes. When creating the hidden target button field, go to the Options tab in the field properties. Set the layout to 'Icon only', click 'Choose Icon', and select your desired image file. The image will then act as the button's appearance.




