cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dipak_Shaw
Resolver I
Resolver I

Power Automate Html Convert to PDF

Hi Everyone, I am trying to create a pdf from html document.

Everything is fine with HTML but when I am converting the html to PDF I am not getting the pdf as expected.
there are unnecessary spaces in borders and there are double borders in some tables.

 

is there any instructions to create such html so that pdf will be good? Please Help

@RezaDorrani

@Pstork1 @tom_riha @ScottShearer @abm 

1 ACCEPTED SOLUTION

Accepted Solutions
Dipak_Shaw
Resolver I
Resolver I

The issue was that I was using multiple tables and appending them one by one but I found that using colspan property in td tag we can create multiple columns in different rows in a single table and single table won't cause any css issue.

Thanks

View solution in original post

6 REPLIES 6
Pstork1
Dual Super User
Dual Super User

How are you setting things like borders in the HTML? Are you using CSS?  The built-in converter is somewhat limited in its support for custom CSS formatting of tables.  That may be what is causing he issue.  The only real solution for that is to use a third party connector/action that has a better feature set.  But we will need more information on the HTML you are using before we can really tell if that is the cause.



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

Join me at 365 and PWR EduCon in Chicago
EduCon Chicago 2022

Dipak_Shaw
Resolver I
Resolver I

I am using CSS for borders and also I am using the Border-collapse css but its not collapsing properly.

As I mentioned there is certain CSS that is not respected by the built-in PDF conversion.  In my case it was page breaks.  The only option then is to use one of the third party connectors to do the conversion. I've had good luck with Encodian.  They have a free license that can be used to explore the possibities.  I would try their connector and see if you get the results you want.  If you do you'll either need to use a third party converter or modify your table styling to supported CSS.



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

Join me at 365 and PWR EduCon in Chicago
EduCon Chicago 2022

Dipak_Shaw
Resolver I
Resolver I

The issue was that I was using multiple tables and appending them one by one but I found that using colspan property in td tag we can create multiple columns in different rows in a single table and single table won't cause any css issue.

Thanks

McPowerPlatform
Frequent Visitor

Depending of the Document you are going to format, the best experience I had was using DIV's, keep in mind that Power Automate supports inline CSS so let me add you some code with a table with sample data: you can add this in the flow as a compose step, let me know how this works for you

<div id="table" STYLE="display: table;">
<div style="display: table-caption; padding: 0.5em; border: 1px solid #000;">Table Head with DivsS</div>
<div style="display: table-row; ">
<div style="display: table-cell; padding: 0.5em; border: 1px solid; ">Data 1</div><div style="display: table-cell; padding: 0.5em; border: 1px solid; ">Data2</div><div style="display: table-cell; padding: 0.5em; border: 1px solid;">Data3</div>
</div>
<div style="display: table-row; ">
<div style="display: table-cell; padding: 0.5em; border: 1px solid; " >Data 4</div><div style="display: table-cell; padding: 0.5em; border: 1px solid; ">Data5</div><div style="display: table-cell; padding: 0.5em; border: 1px solid; " > Data6</div>
</div>
<div style="display: table-row; ">
<div style="display: table-cell; padding: 0.5em; border: 1px solid; " >Data 7</div><div style="display: table-cell; padding: 0.5em; border: 1px solid; " >Data 8</div><div style="display: table-cell; padding: 0.5em; border: 1px solid; ">Data 9</div>
</div>
</div>

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (3,440)