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 / Preview of PDF / Image...
Power Apps
Unanswered

Preview of PDF / Image Document in Power Apps Gallery

(0) ShareShare
ReportReport
Posted on by 5,331 Moderator

I am attempting to create a work-around that displays PDF and image files in a Gallery of an SP List custom form app.

I've got it to this -
The Gallery (on the right) has 'TTG Medical History Template' in its Items property.
The Gallery Image control has the following in it's Items property.
"https://------------.sharepoint.com/_layouts/15/getpreview.ashx?path=" & First(LookUp([@'History Template'], FullName = DataCardValue4.Text).Attachments).AbsoluteUri

Phineas_0-1666624203074.png


I can get the document to display in the Image control, however it shows the same image as many times as there are items on the SP List (three in this case), rather than the single page that it is (or the multiple different pages of the PDF or Image).

Why does the Image control show the same image multiple times even if the original document may only be a single page document, or shows the same image four times when the document has eight different pages?

Categories:
I have the same question (0)
  • subsguts Profile Picture
    1,259 Moderator on at

    I believe the reason to the question of why does it show three times is because you Items property of the gallery is tied to a List that has 3 items.  If you put anything in that gallery it will repeat mutliple times.  For example, if you add an icon to that gallery, I believe it will also show 3 times.  

    So to fix this problem, you'll need to adjust your Items property.  I know this is not a "cut&paste" solution, but hopeful this will get you going in the right direction?

  • Phineas Profile Picture
    5,331 Moderator on at

    When I comment out the content of the Gallery Items property, I can see the content of the Image control (which to be clear is a PDF file from the Attachment column of the SP List), in 'Edit' mode...

    Phineas_0-1666626818309.png

    ...But not in 'Play'.

    Phineas_1-1666626936740.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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard