cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Cc2019
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:

Logo:

<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>
</header>

 

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'>
<tr>
<td>Telefon</td>
<td style='text-align: right;'>+45 12233445</td>
</tr>
<tr>
<td>Mail</td>
<td style='text-align: right;'>john.doe@bob.dk</td>
</tr>
<tr>
<td>SE/CVR-nr.</td>
<td style='text-align: right;'>12121212</td>
</tr>

 

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>
</tr>
<tr>
<td style='text-align:left'>Momsbeløb</td>
<td style='text-align:right'>0.00</td>
</tr>
<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>
</tr>
</table>"

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

 

 

 

2 REPLIES 2
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.

https://powerusers.microsoft.com/t5/Building-PowerApps-Formerly/html-text-to-pdf-formatting-issue-wi...

Regards,

Mona

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.
Cc2019
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

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

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