cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (73,336)