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 Automate / HTML in Power Apps con...
Power Automate
Answered

HTML in Power Apps converted with Flow to PDF

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I posted a similar message in the Power Apps community. Because my app uses Flow and Power Apps, I thought I would ask here too.

Basically, i am using the HTML control of Power Apps to display how I want my PDF to look like and then I convert it to an actual PDF via Flow. My problem is that it does not correspond. For example, the space breaks that I want completly disappear in my final PDF.

 

Here are the details. I am not a HTML developper at all so I am sorry for how it is written ^^

CaptureFlowPDF1.PNGCaptureFlowPDF2.PNGCaptureHTML.PNGCapturePDF.PNG

 

I hope you can help me fix this,

 

Thanks in advance

Categories:
  • LeeHarris Profile Picture
    1,026 on at

    Hi @Anonymous 

    Try using the line break tag "<br>" instead of "&nbsp;". Though I have noticed formatting issues in the past when using the OneDrive conversion with certain tags and styles. 

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    The thing is I just want to create spaces between my items. In this case, I want 4 items to be in the same line that their cost. If I use <br>, the cost just goes under. Is there another way to convert to PDF without using a converter outside of office?

  • LeeHarris Profile Picture
    1,026 on at

    Hi @Anonymous 

    Apologies, after reading the initial post again I see why you want to keep the spaces.

    You can make use of the <pre> tag in HTML. This defines the content (including any dynamics values) as preformatted text and will not remove the spaces when converting to PDF. I have tested this in a Flow with the OneDrive conversion and it does work although you need to then define a style on the <pre> tag in order to format the text the way you want it.

    Hope that helps.

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Well thank you, I did not know about this tag! It seems that it does keeps the space I put in. It changes my font and stuff though. Could you indicate me how to define a font/font size etc... for what is in between the <pre> tags?

    I tried to put a style tag at the beginning with something like pre { font-size : 16px} but it does not seem to work...

  • Verified answer
    LeeHarris Profile Picture
    1,026 on at

    Hi @Anonymous 

    When I was testing this I had to put the style in line on the tag rather than as CSS.

    For your pre tag set it up something like this:

    <pre style="font-family:calibri;font-size:14pt;"> Text here       with     spaces</pre>

     

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 Automate

#1
11manish Profile Picture

11manish 307 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 289

#3
Henil Profile Picture

Henil 127

Last 30 days Overall leaderboard