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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Button from gallery in...
Power Apps
Unanswered

Button from gallery in displayform to PDF viwer

(0) ShareShare
ReportReport
Posted on by 88

Hello everyone 

i have a gallery (Gallery1) connected to data source "Meshworks quality - news" to show all items. 
in the gallery, you can select an item to be view´d in a display form - and in my display form i have a gallery that shows the attached file and a button. I want to be able to press the button and view the attached file in a PDF viwer. 

Code for bottun on gallery: UpdateContext({ShowPopup4: true})& Set(varPDF,varThisItem.Miniature.Large)

Currently, i am able to press the button and it shows me the viwer but the the following error: Coudn´t open PDF file, make sure the PDF file is comming from a HTTPS link. 

Any suggestions to how i overcome this issue?

 

Image 1.png

Image 2.png

Categories:
I have the same question (0)
  • ANB Profile Picture
    7,223 Super User 2025 Season 2 on at

    Hi @Snow_89 ,

    Where is pdf stored?

    Did you check this https://powerusers.microsoft.com/t5/Building-Power-Apps/PDF-viewer-not-working/td-p/401944

     

    ------------------------------------------------------------------------------------------------------------------------------

    I hope this helps.

    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.

    Thanks,

    ANB

  • Snow_89 Profile Picture
    88 on at

    the PDF is store in a SharePoint Document Library, there is multiple in the end product but for now i just need the solution. 

    Lets call the library: Documents

    I did read the post you link to, but i did not find anything i could manage myself

  • ANB Profile Picture
    7,223 Super User 2025 Season 2 on at

    Hi @Snow_89 ,

    I tried from my end and basically it gives me different error and I can open the PDF in new tab in browser. You need to make sure that whoever access this PDF has enough permission on SharePoint library to open this PDF.

    ANB_0-1695118259528.png

    Not sure in your case. From your screenshot is it PDF or PPT? Also, if you are looking for PDF Viewer control to be used in your production app, then I would not recommend to use because it is still in experimental phase even Microsoft recommend the same.

    PDF viewer control (experimental) in Power Apps

     

    As a alternative, you can use iframe PCF component for your requirement. Please check https://pcf.gallery/iframe-pcf/ which can solve your purpose.

     

    ------------------------------------------------------------------------------------------------------------------------------

    I hope this helps.

    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.

    Thanks,

    ANB

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard