web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / PDF Viewer -One drive ...
Power Apps
Unanswered

PDF Viewer -One drive from Business

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi Everyone,

 

Can any one please provide steps to add PDF viewer in app created.

I have my one drive for business with one PDF file.

When I attempt to view the PDF from the App getting an error with  "Couldn't open PDF file". This link should let anyone view the PDF, so why is my PowerApp not able to view this?

Categories:
  • Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    Since OneDrive requires authentication, even for an anonymous link,  I don't think a sharing link will work based on the limitations specified in the documentation since a sharing link still does authentication.  See #3 from the list of limitations below.

     

    Limitations

    1. The security architecture of PowerApps requires the PDF Viewer to support only HTTPS links, not HTTP.

    2. The Document property must link directly to the PDF file. Server redirects or HTML views of the document aren't supported.

    3. The server that hosts the document must not require authentication.

    4. You may not be able to view a PDF document in your app if the document resides on a server that has restrictive cross-origin resource sharing (CORS) settings. To resolve this issue, the server that hosts PDF documents must permit cross-origin requests from powerapps.com.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank You for your clarification,

    Can it be possible to show a PDF document if it resides in SharePoint?

     

     

  • Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    There are ways to do it, but it requires the use of Flow and and HTTP request.  Here's a video that has a walkthrough.

    https://www.bing.com/videos/search?q=powerapps+pdf+viewer+sharepoint&view=detail&mid=4655DBAA3FF77D9386764655DBAA3FF77D938676&FORM=VIRE

  • MasterOffice365 Profile Picture
    184 on at

    There is actually a very easy to use workaround 🤗. 

     

    Assuming you have a Gallery control with the Items property set to a SharePoint or OneDrive Data Source for any given Document Library, all you need to do is set the Document property on the PDF Viewer control to:

    Substitute (Gallery1.Selected.'{Thumbnail}'.Small, "transform/thumbnail", "transform/pdf" )

     

    It doesn't really get any easy then that!

    Try it and reply back on this thread if it works for you so other people also know...

  • Bahalzamon Profile Picture
    on at

    @MasterOffice365 

    How does this even work? Using One Drive only offers Excel file connection. How would you connect it to anything except Excel?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 350 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 318

#3
Mohsin Ali Profile Picture

Mohsin Ali 220

Last 30 days Overall leaderboard