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
Super User

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 Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,470)