Microsoft 365 features that help users manage their subscriptions, account settings, and billing information.
Hi Jitendra,
Based on my test, we cannot use Office Online to directly open PDF file, so the Wopiframe redirect the URL to the root folder. If we use PDF reader to open the URL, it is related to the browser. Chrome or Firefox can directly open the PDF in browser. You may use the URL https://xyz.sharepoint.com/sites/sitename/libraryname/xxx.pdf to open the pdf file in PDF reader add-in with Chrome and Firefox.
Moreover, I'd like to confirm something via private message. You can find the message via the URL https://community.office365.com/en-us/user/conversations.
Best regards,
Tim