PDF Editing Issues

How to Create a Rollover Button to Display a Large Image in a PDF

Algirdas JasaitisAlgirdas Jasaitis Oct 28, 2026 869 views

Question details

The user wants to set up a small button in a PDF that, when interacted with, displays a larger, readable map or image that is bigger than the button itself.

How to Create a Rollover Button to Display a Large Image in a PDF
Product
PDF Editor
Device & OS
not provided
Scenario
Adding interactive visual elements to a PDF document to expand small images without taking up permanent page space.
Observed behavior
The user needs a method to trigger a large image to appear on screen via a smaller button, and a way to hide it again once viewed.
Before you start

Ensure you have your large map or image file ready, and verify that your PDF editor supports creating interactive form fields and visibility action triggers.

Solution 1Recommended

Use a Hidden Image Field and Visibility Actions

Create a large, hidden form field containing the map image, and use a smaller button to toggle its visibility.

This method involves creating two interactive elements: the trigger button and the target image field. By setting the target image to be hidden by default, you can use the trigger button's 'Mouse Up' (click) or 'Mouse Enter' (hover) action to make the large image visible.

1
Insert the Large Image Field

Create a new button or image field that covers the area where you want the large map to appear. In the field's appearance properties, upload or set your large map image as the icon.

2
Set Default Visibility to Hidden

Open the properties of the large image field, navigate to the General tab, and change the Form Field visibility property to 'Hidden'.

3
Create the Trigger Button

Insert a smaller button on the PDF page that users will interact with to view the map. You can customize its appearance to look like a magnifying glass or a thumbnail.

4
Add the Show Action

Open the small button's properties and go to the Actions tab. Set the trigger to 'Mouse Up' (for a click) or 'Mouse Enter' (for a rollover). Select 'Show/hide a field' as the action, click 'Add', and set it to show the large map field.

5
Add an Action to Hide the Map

To let users close the map, add a 'Mouse Exit' action to the trigger button to hide the field. Alternatively, create a large transparent 'Close' button over the map with an action to hide both the map and itself.

Use a Hidden Image Field and Visibility Actions
PDF Viewer Compatibility: Interactive features like rollover buttons and visibility toggles work best in full-featured desktop PDF readers. Some browser-based or basic mobile PDF viewers may not fully support these actions.

Edit and Enhance PDFs with WPS Office

WPS Office provides a comprehensive PDF editor that allows you to add images, insert interactive form elements, and modify PDF documents effortlessly.

  1. 1. Open your PDF: Launch WPS Office and open your PDF document using the built-in WPS PDF tool.
  2. 2. Access Form Tools: Navigate to the 'Form' tab to find interactive elements like Push Buttons and image fields.
  3. 3. Configure Button Properties: Draw your button on the page, double-click to open its properties, and set up the appearance and visibility actions.
  4. 4. Save the Document: Once your interactive elements are configured, save the PDF to preserve the interactive functionality for your readers.
Easily insert, resize, and manage images within PDF files.Fully compatible with standard PDF formats and Adobe Acrobat.Lightweight and fast, offering a smooth reading and editing experience.Create and fill PDF forms with user-friendly interactive tools.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my rollover button not work when viewed in a web browser?

Many built-in web browser PDF viewers (like Chrome or Edge's default viewer) have limited support for interactive PDF features such as JavaScript or show/hide actions. For best results, advise your users to open the PDF in a dedicated desktop application like WPS Office or Adobe Acrobat.

Can I use an image instead of a standard gray box for the trigger button?

Yes. When configuring the trigger button's properties, you can change its appearance settings. Select 'Icon' as the layout and upload a custom image (like a thumbnail of the map) to serve as the button's visual representation.

How do I make the large map disappear after the user moves their mouse away?

In the trigger button's properties, go to the Actions tab and add a second action. Set the trigger event to 'Mouse Exit' and choose the 'Show/hide a field' action, setting it to hide the large map field.

Is it possible to add a close button directly on the large map?

Yes. You can place a transparent button directly over the large map image. Set this transparent button's action to hide both the map field and the transparent button itself when clicked.