Consider the following scenario.
- You browse to a SharePoint Online or OneDrive for Business site, and then you click SHARE for a PDF file.
- You click Get a link, and then click CREATE LINK for either the View Only or Edit options.
- You share the link with a user.
This is expected behavior in SharePoint Online. Users must download the PDF file in order to view it.