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

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Create PDF Invoice fro...
Power Automate
Unanswered

Create PDF Invoice from PowerApps

(0) ShareShare
ReportReport
Posted on by 303

Hello all,

 

I have created a PowerApp that stores invoice information into a SharePoint List. Information like client name, billing info, and invoice items are collected on the PowerApp via the SharePoint list submission form. When the user submits, a flow is triggered that grabs an HTML file from my OneDrive and then the flow uses the replace( ) function to replace specific portions of the HTML with data from the SharePoint list. 

 

This works fine but I find it extremely difficult to format the PDF the way I want it to be, also I can't seem to figure out the logic to only allow a limited number of invoice items on each page and not allow invoice items to "spill over" and ruin the formatting of the following pages. The goal is to have the same format for each page, which would look like this:

 

| Company Logo | Billing Information Here |

|-------- Client Information Here - - - - - -   |

|    ----      INVOICE ITEMS  ----------------  |

|    ----      INVOICE ITEMS  ----------------  |

|    ----      INVOICE ITEMS  ----------------  |

|    ----      INVOICE ITEMS  ----------------  |

|      PAGE TOTAL FOR INVOICE ITEMS  ---  |

 

Each page would be required to look exactly like this. So if there were enough items for 10 pages, each page would be displayed like this. Any help is greatly appreciated.

Categories:
I have the same question (0)
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at
    Re: Create PDF Invoice from PowerApps

    Hey @JMAFO 

     

    You can also try using word templates for this (it is a premium connector). You can define all the place holder tags and then add repeating control to the word template for each item and you can customize it as needed. 

     

    You can check my blog here to get started with that: https://www.bythedevs.com/post/how-to-populate-a-word-template-with-repeating-control

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • JMAFO Profile Picture
    303 on at
    Re: Create PDF Invoice from PowerApps

    Thank you, this was helpful. For premium connectors, would all users in my company be required to have it? Or since the Flows run from my account would only I need to have it? 

  • Jay-Encodian Profile Picture
    2,920 on at
    Re: Create PDF Invoice from PowerApps

    @Hey @JMAFO 

    Ref Licensing: Whilst I have a view I'd recommend reviewing the licensing document directly... licensing is changing and its worth spending the time to digest the document considering the licenses you hold. (Though, my view is... each user benefiting from the Flow should be licensed... others please correct / add where required :))

    Ref HTML Conversion to PDF conversion;

    Are you able to share an example of the HTML which is causing issues when spanning multiple pages? You may be suffering from limitations in the OneDrive HTML to PDF conversion... it doesn't provide full HTML support.

    This may / may not help... and a disclaimer I work for Encodian who provide the Encodian connector which provides the 'Convert HTML to PDF' and 'Convert HTML to Word' actions.

    The 'Convert to HTML' action contains some advanced settings which govern what to do when table data is split across multiple pages, for example 'Repeat Table Header' and 'Repeat Table Footer'... these may help.

    Ref HTML Creation with repeating sections;

    Many of our customers use the following approach which would also work for the Microsoft OneDrive and Word PDF conversion actions:

    1. Create a string variable
    2. Append the initial part of the HTML document
    3. For an array of items; loop through and append the HTML to the string variable
    4. Append the end part of the HTML document

    This image shows shows an example of steps 3 & 4... where a HTML file containing document approval response is compiled and then inserted into an existing PDF document.

     

    1.png

     

    You can then of course just interlace the HTML with dynamic data from PowerApps, SharePoint, etc. and convert to PDF:

     

    2.png

    HTH

     

    Jay

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

     

  • Pavetl Profile Picture
    10 on at
    Re: Create PDF Invoice from PowerApps

    How can you add an image into the repeating table for each row. I am trying to make an invoice with images for each item.

  • Jay-Encodian Profile Picture
    2,920 on at
    Re: Create PDF Invoice from PowerApps

    Hey @Pavetl 

    Could I ask you to please post this as a new thread? Please tag me in the new post and I'll share the details.

    Thanks J

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
Tomac Profile Picture

Tomac 497 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 477 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 242

Last 30 days Overall leaderboard