How to Show a Map or Image When Clicking a Link in a PDF
Question details
The user wants to display a specific map or image when a reader clicks a link or button within a PDF, avoiding the need to duplicate the map on multiple pages.

- Product
- Device & OS
- not provided
- Scenario
- Creating interactive PDF documents where clicking a specific element reveals a supplementary image, such as a location map or floor plan.
- Observed behavior
- The user needs a method to trigger a pop-up or open a referenced image without embedding the same image repeatedly throughout the PDF pages.
Ensure you have the image or map files saved on your computer and easily accessible before adding them to your PDF document.
Use PDF Attachments to Link Images or Maps
The simplest and most reliable method is to attach the map or image file directly to the PDF and link your buttons to open that attachment.
By utilizing the built-in attachment feature, you can store an image inside the PDF container just once. You can then create multiple links or buttons across different pages that all point to this single attached file.
Open your PDF document in a capable PDF editor.
Navigate to the Attachments panel (usually located on the left sidebar) and click the 'Add' or paperclip icon to upload your map or image file to the PDF.
Go to the page where you want the interactive trigger. Select the 'Add Link' or 'Button' tool from the Edit menu and draw a linking area over your desired text or image.
In the Link Properties or Button Properties, set the action to 'Open a file' or 'Go to a page view' and select the image file you attached in step 2.

Use Custom JavaScript for In-Page Image Pop-ups
For a seamless pop-up experience without opening external file viewer windows, you can use custom JavaScript to show or hide hidden image fields.
Create Interactive PDFs with WPS Office
WPS Office provides powerful PDF editing tools, allowing you to easily add links, insert buttons, and manage attachments to create interactive, professional documents.
- 1. Open PDF in WPS Office: Launch WPS Office and open your target PDF document.
- 2. Add an Attachment: Click the Attachment icon in the left navigation panel and upload your map or image file.
- 3. Insert a Link: Navigate to the Edit tab, select 'Link', and draw a clickable box over the desired text or area.
- 4. Link to the Attached File: In the link creation dialog, set the action to open the attachment you just uploaded.

Frequently Asked Questions
Can I make the image appear as a floating pop-up instead of opening a new file?
Yes, but it typically requires using an advanced PDF editor to add custom JavaScript to a button, which toggles the visibility of a hidden image field on the page when clicked.
Will attaching images to a PDF make the file size too large?
Attaching an image once and linking to it multiple times is much more space-efficient than pasting the same image onto every single page. Ensure your map or image is properly compressed before attaching it to keep the overall file size low.
Do links to attachments work on mobile PDF readers?
Compatibility varies by app. Most advanced mobile PDF editors and viewers like WPS Office support opening attachments, but basic built-in phone viewers might not trigger the interactive action properly.




