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 Automate / Convert Form with Imag...
Power Automate
Unanswered

Convert Form with Image Gallery to PDF Possibly with Flow

(0) ShareShare
ReportReport
Posted on by

Hi,

I have a PowerApp that connects to a SharePoint list.  There is an Attachment Control that allows users to add up to 10 attachments.  These attachments are expected to be images.  On my display screen, I show the list item details plus an Image Gallery with all of the images.  My users need to be able to print the form data plus all images.  

 

Initially, I created a button which sends an HTML email that adds the images as attachments.  However, my users need to have everything together to be able to print as one document....so the email with attachments method will not suffice.  Ideally, I would like to be able to generate a PDF.  I've seen videos on how to create a PDF using FLOW. These only seem to take the HTML and possibly include one static image saved somewhere.  I need to be able to loop through and add ALL of the image attachments associated with a particular list item.  In PowerApps, I don't see that there is a way to dynamically build the HTML based on on all of the images in the control for a given item (generate image tags for each).  Is there a way to do this with flow?  Or are there other possible solutions?

Categories:
I have the same question (0)
  • Sharon Sumner MVP / RD Profile Picture
    78 on at

    Hi

     

    Depends on your browser but if you are accessing the App in a browser and you can see all the images there then just print screen to pdf? or consider an app page that does the layout and surface that as a link in the App to go to a browser.

     

    Sharon

  • Community Power Platform Member Profile Picture
    on at

    Thanks for the reply.

    I was hoping it would be this simple...but I tried adding a scrollable screen with the HTML on it plus an image gallery at the bottom.  When I do a print preview in my browser window, everything gets cut off.  Only 1 page is displayed with the HTML table cutoff and the images missing (they would be on page 2 and 3).  Am I missing something here.

  • Sharon Sumner MVP / RD Profile Picture
    78 on at

    Hi

     

    To get around that I use Chrome and an add in called Full Screen Page Capture - it scrolls the page for you 🙂

     

    Sharonimage.png

  • Community Power Platform Member Profile Picture
    on at

    Thanks - I will look into this.

     

    Ideally though, I would like to be able to convert the SharePoint list data with each image attachment to a PDF.  

  • Verified answer
    Jay-Encodian Profile Picture
    2,920 on at

    Hey @Anonymous ,

    You could pass the list item ID of the list item containing the attachments in SharePoint and the HTML form data to PowerAutomate and then you can:

    • Convert the HTML to a PDF Document using OneDrive or a third party connector 'Convert HTML to PDF'
    • Use the SharePoint 'Get Attachments' action to get all the attachments from the list item
    • Loop through the attachments collection returned by the SharePoint 'Get Attachments' action and use the SharePoint 'Get attachment content' to get each attachment.
    • Merge the attachments to a PDF document ... you'll need a third party connector for this such as Merge document array to PDF. The Encodian action dynamically works out if a file needs to be converted to PDF prior to merging, so you can just pass the documents (70+ file format supported) and a PDF will be returned

    There is an example documented here, albeit this is merging attachments from an email to PDF... however the principles of getting the files and merging are the same: https://support.encodian.com/hc/en-gb/articles/360016980633-Convert-an-Email-Message-including-attachments-to-a-PDF-document

    HTH

    Jay

  • Sharon Sumner MVP / RD Profile Picture
    78 on at

    I totally agree, we have used this method one our our sites using the Encodian tools, there are others too. 

     

    Sharon

  • Community Power Platform Member Profile Picture
    on at

    This sounds like a great option.  Would I need to purchase the third party connector?

  • Jay-Encodian Profile Picture
    2,920 on at

    @Anonymous 

    As you'll need to merge multiple documents into a single PDF you'll need a third party connector... Encodian and Plumsail documents for example both provide a merge action.

    Encodian also provide a 'Free' subscription plan which may cover you, if not you would need a paid plan.

    HTH

    Jay

  • Community Power Platform Member Profile Picture
    on at

    Thanks - This solution worked.  I used the Encodian "merge document array to pdf" action and added each of my attachments to a document array.  I also have a formatted Word template that I populate with the SharePoint list data ("populate Word template" action).  I merge this document with the image attachments to create my final PDF.  The only challenge I had is that the image files were wider than the 8.5 x 11 PDF document created.  When you scrolled, the were noticeably wider than the first pages.  I used the Encodian "resize an image" action to resolve it.  Looks really good now.

  • cyberco01 Profile Picture
    480 on at

    Can you please provide a screen-shot of the flow method used. It will be helpful

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 Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard