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 Apps
Answered

Export to PDF

(0) ShareShare
ReportReport
Posted on by 141

This is my flow of exporting HTMLText to PDF :

norashura_0-1696811334480.pngnorashura_1-1696811358158.png

When i executed this flow to print, the printed file will read the HTMLText as PlainText,

norashura_2-1696811591788.png

below is my HTML code :
"<!DOCTYPE html>
<html>
<head>
<title>Checklist Interface</title>
<style>
table {
font-family: arial, sans-serif;
width: 100%;
}
th:nth-child(2),
td:nth-child(2) {
width: 2%; /* Adjusted width for Completed column */
}
th:nth-child(3),
td:nth-child(3) {
width: 2%; /* Adjusted width for Remarks column */
}
th {
padding: 5px;
border: 1px solid #dddddd;
text-align: left;
font-weight: normal;
font-size: 25px;
}
td {
padding: 5px;
border: 1px solid #dddddd;
text-align: left;
font-size: 18px; /* Reduced font size by 2 */
}
input[type='checkbox'] {
transform: scale(0.7);
margin-left: 40%; /* Adjusted margin to center the checkbox */
}
p {
font-family: arial, sans-serif;
width: 100%;
font-size: 18px; /* Reduced font size by 2 */
text-align: justify;
}
.footer {
text-align: right;
margin-right: 200px;
}
.remarks {
max-height: 100px; /* Set the maximum height for the div */
overflow: auto; /* Enable vertical scroll when content exceeds max height */
font-size: 12px;
text-align: justify;
}
</style>
</head>
<body>
<h1 style='font-size: 15px;text-align: center;'>Checklist Form</h1>
<p style='font-size: 15px;'>Department : </p>
<p style='font-size: 15px;'>Checked By : </p>
<table border='1%'>
<thead>
<tr>
<th style='padding: 5px; font-size: 14px;text-align: center; width: 80%;'>Recommendation</th>
<th style='font-size: 14px;text-align: center; '>Tick</th>
<th style='font-size: 14px;text-align: center;width: 70%;'>Remarks</th>
</tr>
</thead>
<tbody>
" & Concat(
Gallery1.AllItems,
" <tr><td><div class='remarks'><textarea>" & Recommendation & "</textarea></div></td><td></td><td></td></tr> "
) & "
</tbody>
</table>
<div class='footer'>
<p style='font-size: 15px;'>Approved By: </p>
</div>
</body>
</html>
"

Thank you for helping ! appreciate it so much!

Categories:
  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @norashura ,

     

    Please replace the newline character with '<br>' in power apps.

     

    for example:

     

    Concat(
    Gallery1.AllItems,
    " <tr><td><div class='remarks'><textarea>" & Substitute(Substitute(Recommendation,Char(10),"<br>"),Char(13),"<br>") & "</textarea></div></td><td></td><td></td></tr> "
    )

     

    Best Regards,

    Bof

  • norashura Profile Picture
    141 on at

    may i know what does Char(10) and Char(13) represent ?

     

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @norashura .

     

    vbofengmsft_0-1696820711324.png

     

    Char(10) means new line and Char(13) means carriage return.

     

    Best Regards,

    Bof

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 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 204 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard