Hello - the html text shown below in red is making it through a power automate process to the html stage OK but the conversion to pdf (One drive for Business - convert to pdf) doesn't seem to be picking it up. I have attached the two outputs (html and pdf) to show the missing content. Any advice gratefully received. Cheers. Thom
// This is HTML that sends to flow to generate the PDF file.
"<html>" & "<head>
<H1>ME Detail report: " & ddPlanName_1.Selected.Result & " - " & ddDate.Selected.Value & "</H1>
<p>" & HtmlExecutiveSumm.HtmlText & " </p><br>
<p>" & HtmlKPIDecline.HtmlText & " </p><br>
<p>" & HtmlSocCult.HtmlText & " </p>
<style>
a { color: blue; }
body { text-align: centre; }
h1 { color: green; }
table.one { border-collapse: collapse; border-spacing: 10px; }
table.two { border-collapse: collapse; border-spacing: 10px; }
table, td, th { border: 1px solid; border-color: lightgray; vertical-align: text-top}
td.content{ padding-left: 5px; padding-right: 5px; }
span { color: white; padding-top: 2px; padding-bottom: 2px; padding-left: 8px; padding-right: 8px; font-size: 80%; }
</style>
</head>" & "<body>" &
// Strategies - First Table etc
Solved! Go to Solution.
Hi @ThenewThom ,
The OneDrive PDF converter is not a "full blown" HTML resolver and things like CSS Styles often do not translate. I keep my HTML on these to fairly simple basic tags (table structure and colours, font bold, italic, underline etc) which generally do the job I need.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Hi Warren - thanks for responding. That's the part that's difficult to follow - the style applying to the tables works perfectly. It's the basic stuff (the <p> tags) that isn't going through. Cheers, Thom
Hi @ThenewThom ,
The other thing I forgot to mention is that the OneDrive converter is far less forgiving on structure inconsistencies such as the lack of closing tags. I have tested code that resolves perfectly in a Power Apps HTML control, but if the tags are not strictly correct gets unexpected results in the PDF like yours.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Thanks Warren - it was a problem with the label I used - the conversion handled .text with the html as a resolved output (rich text style) but I was feeding it html that included the filtering codes etc. Oh well, is working now
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
181 | |
47 | |
46 | |
34 | |
33 |
User | Count |
---|---|
260 | |
87 | |
79 | |
68 | |
67 |