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
$webApplication.AllowedInlineDownloadedMimeTypes.Add("application/pdf")
$webApplication.Update()
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.