Showing results for 
Search instead for 
Did you mean: 
Deriooo Advocate I
Advocate I

HTML page break convert to PDF

Hey everyone,


Wondering if you could help me please, I have a flow that converts HTML text to PDF and then saves the PDF file to OneDrive.

The html text is sent from PowerApps to flow, this is used for a company delivery ticket, the ticket and design all works correctly. The issue I am having is when multiple tickets are passed from PowerApps, the new ticket is not generating on to a new page, what I am trying to achieve is basically ticket 1 on page 1, ticket 2 on page 2 etc.

I have used the page-break-before and page-break-after in my html, I have also tried break-after, these work correctly in my html document but this does not work when the flow converts to PDF, the page breaks are removed.

I can use <br> on the end of my html to pad out the spacing at the end of the ticket, however this doesn't always work as depending on the data passed to the delivery ticket the height can change.

Does anyone have any experience in getting the page breaks to work when converting to PDF or any work around I can use instead? 


I have copied in the html below for reference.

Thanks in advance!


concat('<!DOCTYPE html>
table, th, td {
border: 0.5px solid black;}
.newPageTop {
.newPageBottom {
p {break-before: always;

<body><p></p><h3 style= "text-align: center; color:#000080; font-family:tahoma; font-size: 12px;"> <img src="', variables('logoHeader'),'" style="width:350px; height:60px;"> <br> T:  <br> E: 
W: <br><img src="', variables('logoSocial'),'" style="width:60px; height:20px;"></h3>', items('Apply_to_each'), '<center><img src="', variables('creditLogo'), '" width ="120px" height="30px""></center></td></tr></table>



Super User
Super User

Re: HTML page break convert to PDF

HI @Deriooo 


I don't have much experience in this, but I did some digging and found the following articles:


Also, I found this:

(Try inserting the style directly in the <br>)


Hope this helps you

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.


Deriooo Advocate I
Advocate I

Re: HTML page break convert to PDF

Hi Manuel,


Thanks for your reply and suggestions, apologies for the late reply. 


I have tried the suggestions you sent over, unfortunately still not working as expected, so I'm assuming Flow can't support this function at the moment. Thanks for your help on this anyway!





Super User
Super User

Re: HTML page break convert to PDF

Hi Deri,

Can you please share the complete HTML your sending to conversion? we can't validate the HTML with the contained variables.

Thanks J

Helpful resources

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.


New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!


Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!


New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!


Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Users online (6,812)