How to Close a SharePoint PDF Without Returning to the Document Library
Question details
Users need a way to return to their original SharePoint page after viewing a PDF, rather than being automatically redirected to the underlying document library.

- Product
- Microsoft SharePoint
- Device & OS
- not provided
- Scenario
- Clicking a PDF link on a SharePoint page to view it in the browser preview overlay, then attempting to close it to resume reading the original page.
- Observed behavior
- Clicking the close (X) button in the SharePoint PDF preview redirects the user to the document library instead of the SharePoint page they originally navigated from.
Ensure you have the necessary edit permissions for the SharePoint site to modify web parts and update document links.
Use Quick Links to Open the PDF in a New Tab
Configure your SharePoint page to open PDFs in a new browser tab, ensuring the original page remains open in the background.
SharePoint currently does not provide a native setting to change the destination of the PDF preview's close button. Since the default behavior redirects users to the document library, the most reliable workaround is to bypass the preview overlay entirely by forcing the document to open in a new tab.
Navigate to your document library or Microsoft Teams. Click the three-dot menu next to the PDF, select 'Share', choose 'Copy link', and ensure the appropriate audience permissions are set.
Edit your SharePoint page by clicking 'Edit' in the top right corner. Click the '+' icon to add a new web part and select 'Quick Links' from the menu.
Add your copied PDF link into the Quick Links web part. In the link properties panel, enable the option to 'Open in a new tab' so users won't lose their place on the main page.

Instruct Users on Browser Navigation Shortcuts
Teach users standard browser shortcuts to open SharePoint files in a new tab without leaving the current page, which is useful when page editing is not an option.
Manage and Edit Your PDFs Seamlessly with WPS Office
While SharePoint limits how you can navigate online PDF previews, managing and editing your PDFs locally gives you complete control. WPS Office is a fast, lightweight, and highly compatible suite that handles PDFs and Office documents without frustrating browser redirects.
- 1. Download WPS Office: Visit the official WPS website and download the free desktop application for your operating system.
- 2. Open Your PDF: Launch WPS Office, click 'Open', and select your downloaded SharePoint PDF to view it locally.
- 3. Edit and Save: Use the comprehensive PDF tools to edit, annotate, or sign, then save it securely back to your drive.

Frequently Asked Questions
Why does closing a PDF in SharePoint redirect to the document library?
This is a default, hardcoded behavior in SharePoint's online file viewer. When closing a file preview, SharePoint routes the user to the library where the file is hosted rather than tracking their browsing history to return them to the previous page.
Does the SharePoint Image web part allow opening links in a new tab?
No, the SharePoint Image web part currently does not provide a native option to change its default navigation behavior or force a link to open in a new tab. Using the Quick Links web part is the recommended alternative.
How do I get the direct file path link to a PDF in Teams or SharePoint?
In Teams or SharePoint, select the three-dot menu next to the PDF file and choose 'Details' to copy the direct file path. Alternatively, click 'Share' and select 'Copy link' while ensuring the correct permissions are set for your intended audience.
Can I force a SharePoint document to open in a desktop application automatically?
Yes, for Word, Excel, and PowerPoint files, you can configure the SharePoint library settings to 'Open in the client application.' However, PDFs often default to the browser viewer unless specific browser settings or local default app configurations force them to open in a dedicated PDF reader.




