cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Preeti1234
Frequent Visitor

Coludn't open PDF file in Powerapps PDF viewer Control

Hii Power Apps Community Members,

 

I have a SharePoint Document Library (TSInfo Documents) and it has some PDF Files. In the Document Library, I have created one column as "PDF URL" (as Single line of text data type). This column has a PDF file URL of individual files like https://<tenantname>.sharepoint.com/sites/PowerApps/TSInfoDocuments/TestPDF.pdf

 

As per my requirement, I want to display the PDF files using the Power Apps PDF viewer Control.

 

On the PowerApps screen, I have created one Vertical Gallery control and connected with the SharePoint Document Library. On the half of the screen, I have added the PDF viewer control. When a user will click on the next arrow icon (>) of a specific PDF file, then the file will appear in the PDF viewer. Refer the below screenshot:

PDF viewer.png

I have written the below formula on the PDF viewer Document property as:

Gallery1.Selected.'PDF URL'

Here, 'PDF URL' = It has the PDF File URL in SharePoint Document Library

 

But the issue is, in the PDF URL, When I am giving the URL as https://blog.mozilla.org/security/files/2015/05/HTTPS-FAQ.pdf, this is working perfectly. But at the same time, While I am passing the URL as https://<tenantname>.sharepoint.com/sites/PowerApps/TSInfoDocuments/TestPDF.pdf , It is not working for me and giving an error as "Couldn't open PDF file, Open in my Browser instead". You can refer the below screenshot:

 

Powerapps PDF error.png

 

Can anyone help me with this issue? Thanks in advance!!

2 REPLIES 2
WarrenBelz
Super User III
Super User III

HI @Preeti1234 ,

Please have a read of this post of mine a little while back. The only way I have been able to view SharePoint Library PDF files in the view is as per this process. Happy to assist with your particular code if you get stuck.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hi @Preeti1234 ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (65,885)