Redirecting to SharePoint home page after clicking "x" on a PDF file

Occasional Visitor



I have a SharePoint page that will be shared with many people. We have files that are shared on the site that can be opened, viewed and printed. When looking at a PDF and then clicking "x" in the top right corner to close the PDF window the site directs the viewer to our document library. We don't want viewers to be able to have access to the document libraries. Is there a way to make it so that the viewer is redirected to the SharePoint home page after closing the PDF file? 


Thank you for help in advance.

1 Reply
I'm afraid this is something that cannot be done Today at least the redirection idea from a file. However, what you could could do is to ask a Developer to write a SPFx extension that make the redirection based on the permissions of the user on the current site