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
Answered

HTML to PDF conversion issue with headings

(0) ShareShare
ReportReport
Posted on by 53

I have the following HTML which looks great in Powerapps, exactly as I expect it to be.

<html>
<head>
<style>
table {
	font-family: arial, sans-serif;
	border-collapse: collapse;
	width: 100%;
}

td, th {
	border: 1px solid #dddddd;
	text-align: left;
	padding: 8px;
}

tr:nth-child(even) {
	background-color: #dddddd;
}
</style>
</head>
<body>
<h2><u>CyT OBJECTIVES</u></h2>
<table>

<td width = 250px;><h3><u>Details</span></td>
<td width = 250px;><h3><u>Activity</td>
<td width = 250px;><h3><u>Comments</td>

</table>	
<table border>" & Concat(
 galleryObjectives.AllItems,
 "<tr><td width = 250px; valign = top>" & objDetails & "</td><td width = 250px; valign = top>" & objActivity & "</td><td width = 250px; valign = top>" & objComments & "</td></tr>") & "
</table>
</body>
</html>

 

The output is as expected

pdf1.JPG

 

The output to the HTML is fine then it converts to a pdf, and the headings dissapear

 

pdf2.JPG

 

the flow is as would expect

 

pdf3.JPG

 

Am i missing something?

 

thanks

 

 

Categories:
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @CYT_Dev 

    Your table is malformed. 

    Change this part:

    <table>
    <td width = 250px;><h3><u>Details</span></td>
    <td width = 250px;><h3><u>Activity</td>
    <td width = 250px;><h3><u>Comments</td>
    </table>

    To:

    <table>
    <tr>
    <td width = 250px;><h3><u>Details</span></td>
    <td width = 250px;><h3><u>Activity</td>
    <td width = 250px;><h3><u>Comments</td>
    </tr>
    </table>

     

    I hope this is helpful for you.

     

  • CYT_Dev Profile Picture
    53 on at

    Thanks, completely missed that.

    All working now as expected

    Much obliged

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 224 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 126

Last 30 days Overall leaderboard