Why viewing PDF file open in SharePoint 2019 OOS site instead of the browser viewer.

Nguyen, Tee 86 Reputation points

Hi, We had SharePoint 2019 onprem and Office Online Server. When we open PDF file, it open PDF file in OOS site instead of browse viewer? Is is expected behavior or not? If not, how can we configure SharePoint in the backend to open PDF file in browser viewer.



A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,126 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Yanli Jiang - MSFT 19,671 Reputation points Microsoft Vendor

    Hi @Nguyen, Tee ,

    It is expected behavior for PDF files to open in Office Online Server (OOS) when using SharePoint 2019 on-premises. This is because OOS is designed to handle the rendering of Office and PDF files within SharePoint.

    If you would like to configure SharePoint to open PDF files in the browser viewer, you can try to add PDF (by default it is added) to the web application’s trusted MIME Type List. Please follow these steps:

    1.Remove the binding by executing the following PowerShell command:

    Get-SPWOPIBinding –Application "PDF" | Remove-SPWOPIBinding -Confirm:$false 

    2.Add PDF to the web application’s trusted MIME Type List

    open the SharePoint Management Shell as administrator, and then run PowerShell commands:

    $webApplication = Get-SPWebApplication("http://sp/")  ## web application URL  

    You could check whether the PDF has been added successfully through the $webApplication.AllowedInlineDownloadedMimeTypes command.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.