Skip to main content

Notifications

Community site session details

Community site session details

Session Id : BmtC/23+HHz460V9XZgKrx
Power Apps - Power Apps Pro Dev & ISV
Suggested answer

Displaying all attachment contents in a PDF file

Like (1) ShareShare
ReportReport
Posted on 14 Mar 2025 13:22:40 by 153
Hi,
 
I have a Power Apps app that has a PDF export button on it.  The export button creates a PDF file for the currently displayed record.  The record may have attachments (pictures, PDFs, documents).  I can add the list of attachments (Filenames) to the PDF file.  I would like to be able to add the contents of each attachment. 
 
Not sure if this is possible, but I have managed to display the contents using Reza Dorrani's video (Display SharePoint List Attachments in Power Apps | Viewer Component) to display previews of some of the attachments.   It is necessary to download each attachment in order to get the full details.  
 
Would it be possible to have a gallery of PDF Viewer controls and image controls that would have the contents of the attachments?  I could probably limit the types of attachments that can be viewed, but users do attach PDF files to the record, so I would need to be able to extract these attachments and append them to the exported PDF of the main record.
 
Any help is much appreciated.
 
Pete
 
 
  • petewalburn Profile Picture
    153 on 14 Mar 2025 at 14:07:18
    Displaying all attachment contents in a PDF file
    Hi Jacqui,
     
    Thanks for that answer.  I don't think that it's something that about (extra work and licensing issues), so I guess I'll probably have to just be happy with the attachment names.
     
    Pete
  • Suggested answer
    Jacqui Muller Profile Picture
    46 on 14 Mar 2025 at 13:54:24
    Displaying all attachment contents in a PDF file
    Hi @petewalburn we spent many many hours on a similar problem. We ended up writing an Azure Function for this which we called from the App. You could create a PCF as well but there's a limit on the byte size that can be returned. 
     
    I know it's not a great answer - it's a lot of work and adds additional security/licensing conversations but it's the best solution we could find. We also limited our attachments/files to pdf, docx and xlsx.

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

Thomas Rice – Community Spotlight

We are honored to recognize Thomas Rice as our March 2025 Community…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,508 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,431 Most Valuable Professional

Leaderboard
Loading started