cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

HTML in Power Apps converted with Flow to PDF

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

1 ACCEPTED SOLUTION

Accepted Solutions

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>

 


Did I answer your question? Mark my post as a solution!

Follow me on Twitter at @QG_LeeJHarris

Or on LinkedIn at in/leejharris

View solution in original post

5 REPLIES 5
LeeHarris
Solution Sage
Solution Sage

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. 

 


Did I answer your question? Mark my post as a solution!

Follow me on Twitter at @QG_LeeJHarris

Or on LinkedIn at in/leejharris

Anonymous
Not applicable

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?

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.

 

 


Did I answer your question? Mark my post as a solution!

Follow me on Twitter at @QG_LeeJHarris

Or on LinkedIn at in/leejharris

Anonymous
Not applicable

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...

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>

 


Did I answer your question? Mark my post as a solution!

Follow me on Twitter at @QG_LeeJHarris

Or on LinkedIn at in/leejharris

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (5,180)