Option 1. Select Browser File Handling option to Permissive instead of Strict through SharePoint Central Administration.

SharePoint Central Administration => Application Management => Manage Web Applications => General Settings


Option 2. Keep Browser File Handing option as Strict and add allow inline download mime type for PDF through Powershell command line.

$webapps = Get-SPWebApplication
foreach ($webapp in $webapps)