cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
shaneOZ
Level 8

Powerapps HTML box to Flow Code issue

Hi, 

 

Ive got a custom form app that has a button to send to flow to create a pdf, it works however the HTML code im trying to use doesnt. 

 

I would just like a simple Image to float on the right and a table to float on the left 

 

(ie a header with a image on the right, standard buisness pdf)

 

this is the code im currently using and it wont display as id like. (im not purchasing 3rd party)

 

this is the create file part of the flow

concat('<!DOCTYPE html>

<div style= "width:100%">
    
<div style="float:Right">
        
<img src="',variables('TESTLogo'),'" width="100" />
    
</div>
    
<div style="float:left">
<div style="width:100%;
  text-align: left">
  <tr>
    <th><span style ="color: #ff9900; padding: 0px; margin:0px">COMPANY NAME</span> <strong>BUISNESS NUMBER</strong></th>

<body>
',variables('var_HTMLTESTCONTENT'),'
</body>
</html>')

Could any one help me?

 

Or has anyone got any similar code they could share?

1 REPLY 1
Community Support Team
Community Support Team

Re: Powerapps HTML box to Flow Code issue

Hi @shaneOZ ,

Do you pass your HTML text content (Table) from your app to your flow?

Could you please share a screenshot about your flow's configuration?

 

Based on the HTML code that you provided, I think there is something wrong with it. I have made a test on my side, please take a try with the following workaround:

Flow's configuration as below:16.JPG

 

17.JPG

 

App's configuration as below:18.JPG

 

19.JPG

Set the Html Text property of the Html text control to following:

"<table border='1' style='float:left'> " &
     "<tr>
         <td align='center'> Employee: </td>" & "<td align='center'>John Smith (johnsm@contoso.com)</td>" &
     "</tr>" &
     "<tr>
         <td align='center'> Checkout Date: </td> <td align='center'>" & Today() & "</td>
     </tr>" &
     "<tr>
         <td align='center'> Return date: </td> <td align='center'>" & DateAdd(Today(), 1, Months) & "</td>
     </tr>
</table>"

 

The float css style works well in Html file as below:20.JPG

But the float css style does not work in PDF file:21.JPG

 

If you want to make your Image to float on the right and a table to float on the left within your PDF file, I afraid that there is no way to achieve your needs. The Float CSS Style is not supported within PDF file.

 

More details about embedding a image within a PDF file, please check the following blog:

http://johnliu.net/blog/2017/10/generate-any-pdf-documents-from-html-with-flow

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 202 members 4,210 guests
Please welcome our newest community members: