logo
search
SharePoint Document Issues

How to Change SharePoint PDF Close-Button Behavior

Maira MehtabMaira Mehtab Sep 27, 2026 868 views

Question details

The user needs to change the default behavior of the PDF close button in SharePoint so that it redirects to a specific SharePoint page instead of returning to the document library.

How to Change SharePoint PDF Close-Button Behavior
Product
Microsoft SharePoint
Device & OS
not provided
Scenario
Opening and closing PDF documents hosted in a SharePoint document library.
Observed behavior
When a PDF is closed, SharePoint automatically returns the user to the document library instead of navigating to a designated SharePoint page.
Before you start

Note that modifying native SharePoint navigation behaviors requires administrative permissions and familiarity with custom script development or the SharePoint Framework (SPFx).

Solution 1Recommended

Request Custom Development Guidance via Microsoft Q&A

Because standard SharePoint settings do not support changing the PDF close-button destination, custom development is required to implement this specific redirect behavior.

Currently, SharePoint's built-in PDF viewer is hardcoded to return users to the originating document library upon closing.

To override this limitation and redirect users to a specific SharePoint page, you will need to implement a custom coding solution using the SharePoint Framework (SPFx) or custom web parts.

1
Navigate to Microsoft Q&A

Open your web browser and go to the official Microsoft Q&A community platform.

2
Sign In to Your Account

Log in using your Microsoft credentials associated with your SharePoint administration or developer account.

3
Post a New Question

Click on 'Ask a question' and describe your specific requirement for redirecting users to a custom page after closing a PDF.

4
Add the Appropriate Tags

Ensure you add the 'SharePoint Development' tag to your post so that it reaches the right developers and Microsoft engineers who can provide accurate custom code guidance.

Request Custom Development Guidance via Microsoft Q&A
Development Resources: Familiarize yourself with Microsoft's SharePoint Framework (SPFx) documentation, as it is the recommended standard for deploying custom navigation behaviors in modern SharePoint environments.
Free Microsoft Office alternative

Handle PDFs and Documents Seamlessly with WPS Office

While SharePoint requires custom coding for specific PDF navigation behaviors online, managing your documents locally shouldn't be complicated. WPS Office is a free, lightweight alternative to Microsoft Office that includes a powerful built-in PDF editor, ensuring you can read, annotate, and manage PDFs effortlessly without worrying about complex browser settings.

  1. 1. Download WPS Office: Visit the official WPS website and download the free installation package for your operating system.
  2. 2. Install and Set Up: Run the downloaded installer and follow the simple on-screen instructions to complete the setup in minutes.
  3. 3. Manage Your Documents: Launch WPS Office to easily open, edit, and organize your PDFs, Word documents, Excel spreadsheets, and PowerPoint presentations.
Built-in robust PDF reader and editor for seamless local document management.Excellent compatibility with Microsoft Word, Excel, and PowerPoint formats.Lightweight design ensuring fast installation and smooth performance on any device.Familiar tabbed user interface, requiring zero learning curve for seamless migration.
microsoft office alternative - wps office

Frequently Asked Questions

Can I change the PDF close button behavior using default SharePoint settings?

No, standard SharePoint document library settings do not offer an out-of-the-box option to change the destination URL when closing the built-in PDF viewer. This requirement necessitates a custom development approach.

What is the default behavior when closing a PDF in a SharePoint library?

By default, when you open a PDF link from a SharePoint document library and then close the viewer tab or window, the system automatically redirects you back to the originating document library.

Where can I get help for SharePoint custom development?

The best place to request custom development guidance is the Microsoft Q&A forum. Be sure to use the 'SharePoint Development' tag to reach experts who can assist with SharePoint Framework (SPFx) solutions and customizations.