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 multi line...
Power Apps
Unanswered

html to pdf multi line text on one line

(0) ShareShare
ReportReport
Posted on by 407

Hi, i am having a problem with the html pdf conversion. I have a powerautomate flow that converts to onedrive, then the pdf is sent to sharepoint. I have the flow and html linked to a submit button (see below) and data from powerapps gallery is pulled into the html. The conversion works however, i have two sections that needs multiple line text (Work Instruction and Work Details). I have theses sections in tables and it looks fine in html but once it goes to pdf, text is on the same line. Because its pulling the data in from the gallery, i cant see a way to put <br> that will work. Any ideas?

This what its doing: aaaaaaaabbbbbbbbbbbbbbbbbbccccccccccccccccccc
This is what i want it to do: aaaaaaaaa
                                            bbbbbbbb

                                            cccccccccc

 

PDFconvert-2'.Run("<!DOCTYPE html>
<html>
<p><strong>KBX</strong> <em>Mechanical</em></p>
<hr />
<p><strong>Date:</strong> "& (CollectGallery.Selected.Date) &"</p>
<p>&nbsp;</p>
<table style='height: 59px; width: 564px;' border='1px solid black'>
<tbody>
<tr>
<td style='width: 104px;'><strong>Customer:</strong></td>
<td style='width: 186.4px;'>"& (CollectGallery.Selected.Customer) &"</td>
<td style='width: 81.6px;'><strong>Site:</strong></td>
<td style='width: 166.4px;'>"& (CollectGallery.Selected.Site) &"</td>
</tr>
<tr>
<td style='width: 104px;'><strong>Machine ID:</strong></td>
<td style='width: 186.4px;'>"& (CollectGallery.Selected.MachineID) &"</td>
<td style='width: 81.6px;'><strong>KBX Staff:</strong></td>
<td style='width: 166.4px;'>"& (CollectGallery.Selected.Title) &"</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<table style='height: 54px;' border='1px solid black' width='560'>
<tbody>
<tr>
<td style='width: 272.8px;'><strong>Work Instruction</strong></td>
<td style='width: 272.8px;'><strong>Details of work carried out</strong></td>
</tr>
<tr>
<td style='width: 272.8px;'>&nbsp;"& (CollectGallery.Selected.WorkInstruction) &"</td>
<td style='width: 272.8px;'>&nbsp;"& (CollectGallery.Selected.WorkDetails) &"</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<table style='height: 27px; width: 565px;' border='1px solid black'>
<tbody>
<tr>
<td style='width: 120.8px;'><strong>Company Rep:</strong></td>
<td style='width: 429.2px;'>"& (CollectGallery.Selected.CompanyRep) &"</td>
</tr>
</tbody>
</table>
<p><img src="&JSON(CollectGallery.Selected.Signature1, JSONFormat.IgnoreBinaryData)&" type='image/png' style='width:120px'></p>
<table style='height: 22px; width: 564px;' border='1px solid black'>
<tbody>
<tr>
<td style='width: 97.4px;'><strong>Start Time:</strong></td>
<td style='width: 77.6px;'>"& (CollectGallery.Selected.StartTime) &"</td>
<td style='width: 100px;'><strong>Finish Time:</strong></td>
<td style='width: 75px;'>"& (CollectGallery.Selected.FinishTime) &"</td>
<td style='width: 103px;'><strong>Total Hours:</strong></td>
<td style='width: 72px;'>"& (CollectGallery.Selected.TotalHours) &"</td>
</tr>
</tbody>
</table>
<p><strong>Parts:</strong></p>
<table style='height: 76px;' border='1px solid black' width='564'>
<tbody>
<tr>
<td style='width: 555.2px;'>"& (CollectGallery.Selected.Part1) &"</td>
</tr>
<tr>
<td style='width: 555.2px;'>"& (CollectGallery.Selected.Part2) &"</td>
</tr>
<tr>
<td style='width: 555.2px;'>"& (CollectGallery.Selected.Parts3) &"</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp;</strong></p>
<p><strong>Images of work conducted:</strong></p>
<p><img src="&JSON(CollectGallery.Selected.Image1, JSONFormat.IgnoreBinaryData)&" type='image/png' style='width:75px;height:75px'><img src="&JSON(CollectGallery.Selected.Image2, JSONFormat.IgnoreBinaryData)&" type='image/png' style='width:75px;height:75px'><img src="&JSON(CollectGallery.Selected.Image3, JSONFormat.IgnoreBinaryData)&" type='image/png' style='width:75px;height:75px'><img src="&JSON(CollectGallery.Selected.Image4, JSONFormat.IgnoreBinaryData)&" type='image/png' style='width:75px;height:75px'></p>

</body>
</html>")

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Matt383 did you ever find a solution for this?  I have exactly the same issue at the moment

  • Matt383 Profile Picture
    407 on at

    Hi, yes, added Char(10),",br/>" see below. First line is what i had originally
    <td style='width: 272.8px;'>&nbsp;"& (CollectGallery.Selected.WorkDetails) &"</td>
    <td style='width: 100%;'>"&Substitute(CollectGallery.Selected.WorkDetails,Char(10),"<br/>")&"</td>

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

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
timl Profile Picture

timl 122 Super User 2026 Season 2

Last 30 days Overall leaderboard