Hi Prajakta Pardhe,
I go through the post carefully, May I know if you add link path of the pdf in SharePoint to PDF viewer in Power Apps? If so, such link may not supported in PDF viewer and you may get the error, instead, you may use a flow to get content in pdf in SharePoint, here are some references for you:
Viewing PDFs from SharePoint within PowerApps | All Things 365 (masteroffice365.com)
***Disclaimer:****Microsoft provides no assurances and/or warranties, implied or otherwise, and is not responsible for the information you receive from the third-party linked sites or any support related to technology.*
If you need more assistance on use PDF viewer in Power Apps, I would suggest you post in Get Help with Power Apps - Power Platform Community (microsoft.com) which is a dedicated channel for such questions, and you may get more professional help from members there. Thanks for your patience and understanding!
Best Regards,
Clark