Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

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>

when in PowerAppswhen in PowerAppswhen in .PDFwhen in .PDF




Community Support
Community Support

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.

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 Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.


New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,349)