Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

HTML to PDF conversion mismatch

Hi there,


I managed to convert a piece of HTML to a .PDF (using Shane Young's method - Thank you Shane!) 

Unfortunately I can not get two tables and a logo to go in the right positions. Although they seem to be placed correctly in the app, when exporting to .pdf something makes them to shift position. What am I missing out?


Here are some pictures and the code I am using:


<header style='margin-bottom: 40px; text-align: right;'>
<img width='223px' height='82px' src='http://lormeipsum' alt=' logo'>
<h4 style='margin-bottom: 5px;'>Lorem ipsum A/S</h4>
<p>Mama-Center CPH<br/>Dronningensgade 16<br/>1420 Chirstianshavn</p>


Table 1:

<table style='text-align:right; border-collapse: collapse;
font-family: Arial, sans-serif; width: 220px;
max-width: 100%; float: right;' class='column-right'>
<td style='text-align: right;'>+45 12233445</td>
<td style='text-align: right;'></td>
<td style='text-align: right;'>12121212</td>


Table 2:

<table style='border-collapse: collapse;
font-family: Arial, sans-serif; max-width: 350px; width: 100%; margin-top: 40px; margin-right: 2px; float: right; text-align: right;' class='summary-table'>
<tr style='font-weight:bold'>
<td style='text-align:left'>I alt DKK ekskl. moms</td>
<td style='text-align:right'>" & DataCardValue26.Text & ".00</td>
<td style='text-align:left'>Momsbeløb</td>
<td style='text-align:right'>0.00</td>
<tr style='font-weight:bold'>
<td style='text-align:left'>I alt DKK inkl. moms</td>
<td style='text-align:right'>" & DataCardValue26.Text & ".00</td>

invoice example in app.pngwhen in PowerAppswhen in pdf.jpgwhen in .PDF




Community Support Team
Community Support Team

Re: HTML to PDF conversion mismatch

Hi @Cc2019 ,


Are you sending the PDF file as email attachment in Flow? 


Check if below thread could help.



Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Level: Powered On

Re: HTML to PDF conversion mismatch

Hi @v-monli-msft 

Thank you for your reply.


I am trying to use a Sharepoint form and HTML text to generate a .pdf file.

So a slightly different topic than the one you suggested. 

Helpful resources


Power Automate Community User Group Member Badge

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


Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020


Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,060)