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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Convert File to PDF no...
Power Automate
Answered

Convert File to PDF not pulling in all Table rows

(0) ShareShare
ReportReport
Posted on by 839

Hey All -been tinkering arounds with converting a html file to a pdf - I'm having an issue where my last 2 table rows aren't showing up in the PDF .. everything shows up perfect in the html but the PDF cuts off the last 2 rows of the table. 

I also can't get the body to covert unless I wrap the table in a <div> tag. I'm no expert on anything... so just thought I'd see if anyone else ever ran across this, or knows of some special html to pdf  rules.   - some screenshots attached -thx 

All data is just Single line of text in the SharePoint list - nothing fancy here at all. The values show in the compose output in the flow and in the html - So I know the flow is picking up the right values - they just get lost in the pdf convert. 

 

Thx in advance 

 

ctedesco3307_0-1662741942967.png

ctedesco3307_1-1662741976967.png

 

CODE: 

 

<!DOCTYPE html>
<html>
<head>
<style>
table {
font-family: arial, sans-serif;
border: 1px solid black;
width: 75%;
}

td, th {
border: 1px solid #dddddd;
text-align: left;
border: 1px solid black;
padding: 2px;
}
address{
height: 100%;

}

body {
font-family: arial, sans-serif;
}

</style>
</head>

<body >
<br>
<br>
<div id="address">
<table>
<tr>
<th>From: </th>
<th>To:</th>
</tr>
<tr>
<td>@{outputs('Get_item_-_Vendors')?['body/Name']}</td>
<td>@{outputs('Get_item_-_Clients')?['body/Client_x0020_Name']}</td>
</tr>
<tr>
<td>@{outputs('Get_item_-_Vendors')?['body/Email']}</td>
<td>@{outputs('Get_item_-_Clients')?['body/Client_x0020_EMail']}</td>
</tr>
<tr>
<td>@{outputs('Get_item_-_Vendors')?['body/Street_x0020_Address']}</td>
<td>@{outputs('Get_item_-_Clients')?['body/StreetAddress']}</td>
</tr>
</tr>
<tr>
<td>@{outputs('Get_item_-_Vendors')?['body/City']}</td>
<td>@{outputs('Get_item_-_Clients')?['body/City']} </td>
<tr>
<td> @{outputs('Get_item_-_Vendors')?['body/State']} </td>
<td> @{outputs('Get_item_-_Clients')?['body/State']} </td>

</tr>
<tr>
<td> @{outputs('Get_item_-_Vendors')?['body/ZipCode']}</td>
<td>@{outputs('Get_item_-_Clients')?['body/ZipCode']}</td>

</table>
</div>
<br>
<br>
<p>@{triggerOutputs()?['body/InvoiceDate']}</p>
<p>@{triggerOutputs()?['body/Invoice_x0020_Number']}</p>
<br>
<p>@{triggerOutputs()?['body/Description']}</p>

<p>==========================================================</p>

<p>@{triggerOutputs()?['body/Hours']}.00 @ @{triggerOutputs()?['body/Rate']}.00 = $ @{variables('curr')}</p>

</body>
</html>

 

 

Categories:
I have the same question (0)
  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @ctedesco3307 ,

     

    Based on this doc:

    Convert to other formats - OneDrive API - OneDrive dev center | Microsoft Docs

    For best performance validate that the HTML follows the XHTML standard. The component will not perform as well as modern web browsers at correctly parsing HTML that is not well-formed, for example if a table row is missing an end tag.

     

    So you will need to add all the end tags for the last two rows:

    <!DOCTYPE html>
    <html>
    <head>
    <style>
    table {
    font-family: arial, sans-serif;
    border: 1px solid black;
    width: 75%;
    }
    
    td, th {
    border: 1px solid #dddddd;
    text-align: left;
    border: 1px solid black;
    padding: 2px;
    }
    address{
    height: 100%;
    
    }
    
    body {
    font-family: arial, sans-serif;
    }
    
    </style>
    </head>
    
    <body >
    <br>
    <br>
    <div id="address">
    <table>
    <tr>
    <th>From: </th>
    <th>To:</th>
    </tr>
    <tr>
    <td>@{outputs('Get_item_-_Vendors')?['body/Name']}</td>
    <td>@{outputs('Get_item_-_Clients')?['body/Client_x0020_Name']}</td>
    </tr>
    <tr>
    <td>@{outputs('Get_item_-_Vendors')?['body/Email']}</td>
    <td>@{outputs('Get_item_-_Clients')?['body/Client_x0020_EMail']}</td>
    </tr>
    <tr>
    <td>@{outputs('Get_item_-_Vendors')?['body/Street_x0020_Address']}</td>
    <td>@{outputs('Get_item_-_Clients')?['body/StreetAddress']}</td>
    </tr>
    <tr>
    <td>@{outputs('Get_item_-_Vendors')?['body/City']}</td>
    <td>@{outputs('Get_item_-_Clients')?['body/City']} </td>
    </tr>
    <tr>
    <td> @{outputs('Get_item_-_Vendors')?['body/State']} </td>
    <td> @{outputs('Get_item_-_Clients')?['body/State']} </td>
    </tr>
    <tr>
    <td> @{outputs('Get_item_-_Vendors')?['body/ZipCode']}</td>
    <td>@{outputs('Get_item_-_Clients')?['body/ZipCode']}</td>
    </tr>
    </table>
    </div>
    <br>
    <br>
    <p>@{triggerOutputs()?['body/InvoiceDate']}</p>
    <p>@{triggerOutputs()?['body/Invoice_x0020_Number']}</p>
    <br>
    <p>@{triggerOutputs()?['body/Description']}</p>
    
    <p>==========================================================</p>
    
    <p>@{triggerOutputs()?['body/Hours']}.00 @ @{triggerOutputs()?['body/Rate']}.00 = $ @{variables('curr')}</p>
    
    </body>
    </html>

     

    You have to add an end section tag for the same reason.

     

    Best regards,

  • ctedesco3307 Profile Picture
    839 on at

    Hi @v-jefferni - thanks for the response. Much appreciated. 

  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @ctedesco3307 ,

     

    In my post, I have supplemented the missing tags in the code area, just copy and paste the codes in your flow and check if it will work.

     

    Best regards,

  • Verified answer
    ctedesco3307 Profile Picture
    839 on at

      

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 976

#2
Valantis Profile Picture

Valantis 863

#3
Haque Profile Picture

Haque 547

Last 30 days Overall leaderboard