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 Apps / HTML to PDF conversion...
Power Apps
Unanswered

HTML to PDF conversion mismatch

(0) ShareShare
ReportReport
Posted on by 13

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

 

 

 

Categories:
I have the same question (0)
  • v-monli-msft Profile Picture
    Microsoft Employee on at

    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-with-table-header/td-p/206263

    Regards,

    Mona

  • Cc2019 Profile Picture
    13 on at

    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. 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard