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

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>"

when in PowerAppswhen in PowerAppswhen in .PDFwhen in .PDF

 

 

 

2 REPLIES 2
Community Support
Community Support

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.

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (4,109)