cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nemanjasovic011
Helper III
Helper III

PDF viewer control broken only for PDF files from SharePoint( tenant)

Hello,

I have an issue where reference to PDF files from clients tenant only(SharePoint -SPO) are not getting rendered in PDF viewer control. Also, an attempt to get thumbnail from SharePoint and link it to image gallery is not working only for PDF files.

 

All I am asking is possible reasons for this behavior, and if there is a configuration in tenant or SPO admin center that will fix this issue.

 

For PDF Viewer, I get -'this file cannot be displayed'; -while image galley gives me 'broke image icon' - and I have confirmed that the thumbnail code works for other tenants.

 

Thank you.

3 REPLIES 3
Pstork1
Dual Super User
Dual Super User

I'm not sure about the thumbnail issue, but the problem with the PDF viewer is that it can only display PDFs from anonymous locations.  It can't display a pdf from SharePoint because SharePoint requires a login.  Here;s an article that explains a workaround. Power Apps View A PDF Stored In A SharePoint Document Library (matthewdevaney.com)



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Thanks for the response and clarification. In our scenario we looking for PDF 'preview' to be available in image galley and the solution you have linked, as great as it is,  requires user action which does not meet our requirement.

 

Does anyone know why linking image gallery to to a thumbnail URL would not work on this given tenant - it is not displaying ONLY PDFs - the method renders images fine? I know that this method works on other tenants as there are tutorials about this.

 

Thanks.

Looking at the response from Pstrok1, it could be that this is authentication issue as tenant is using 'non-standard' authentication methods. If true, It would be sufficient if someone can either clarify how PDF rendering in PowerApps is affected by authentication or simply discard my claim above.....again, images render fine - PDFs are broken.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (5,500)