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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Loading spinner on PDF...
Power Apps
Answered

Loading spinner on PDF Viewer

(0) ShareShare
ReportReport
Posted on by 432

Hi all,

 

I'm using a PDF Viewer in my power app to, obviously, view PDF files. However I'd like to show a custom loading spinner while the document is being loaded.

I assumed I could manipulate the spinner's visibility attribute with some conditions in the PDF Viewer's 'OnStateChange' method, but it doesn't yield me any result.

 

Therefore I turn to the good old forum for some advise, thanks in advance to all taking the time to consider.

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,923 on at

    Follow this video from Brian:
    https://youtu.be/YfYf-AkY1P8?t=239

     

    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

  • gjeh Profile Picture
    432 on at

    I'm using an http request to my power automate flow to return the selected documents from my sharepoint document library.

    I've viewed Brian's video aswel as this thread. Sadly neither is working for my situation.

  • eka24 Profile Picture
    20,923 on at

    Can you show what you have done so far, Screenshot or Formula

  • gjeh Profile Picture
    432 on at

    Certainly.

     

    I've created this flow:

    pdfflow.PNG

    I call this flow through HTTP request, it strips document ID out of the http request -> gets file properties -> returns document byte string to be displayed in the PDF viewer.

     

    looks like this on the power apps side:

    http.png

    How ever, during the condition in the flow the file format is being examined and if it's not a pdf it is converted to PDF and then have the bytestring of the pdf file returned. this can take a while so therefore i want to show a loading spinner between selecting a document in power apps and seeing it in the pdf viewer.

  • Verified answer
    tonyfowlkes Profile Picture
    13 on at

    I was hoping to accomplish the same thing and watched all the related videos to spinners with no luck. I did come up with a solution that works and accomplishes the same thing, but much less technical.

     

    • Place the spinner image on the PDF Viewer where you want it to Display
    • Right Click on the image and select Reorder and Send to Back
    • Then update the Fill property on the PDF View to be transparent

    This will display the spinner until the original  PDF loads or if you select a new PDF to view.

     

    Hope this helps

  • Warisme Profile Picture
    32 on at

    So here is what I did.  and it works great

    1. Load a spinner gif file, put it under the PDF Viewer and set a var for its Visibilty.

    (I like containers, so I made one to fill the screen, set to spinner color and put image of gif inside it)

    2. Set the PDF View Docuement as a Variable like varPdfDocument

    3. Set the FILL of the PDF  Viewer to RGBA(0,0,0,0)  so its clear

    4. From my Gallery the OnSelect object loads the varPdfDcoument with my Trick

    (Set(varPdfDocument, Substitute(FileGallary.Selected.Thumbnail.Large,"/thumbnail","/pdf") );)

    5. Set the Visibilty of the PDF Viewer to True (control with variable) 

    6. Now I see a spnner until the PDF LOADS.

    7. the CLOSE button , has a set the DOCUMENT of hte PDF Viewer to "clear"  (means nothing, but make it blank)

    8. Hide the PDF Viewer (visibilty)

     

    So the next time I click on a member of my Gallery, it loads that PDF with a spinner and never shows the previous PDF (like it did before , annoying!)

     

    So its basically all controlled with Variables (Document, Visiblity ) and then Order for the FILL to work

    PDF VIEWER on top of the spinner  

    Warisme_0-1684284502067.png

     

    Warisme_1-1684284722775.png

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 542 Most Valuable Professional

#2
Haque Profile Picture

Haque 206

#3
Kalathiya Profile Picture

Kalathiya 201 Super User 2026 Season 1

Last 30 days Overall leaderboard