cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Skiroy Helper I
Helper I

HTML to Sharepoint PDF created in Webview, but blank in PDF

Hello, 

 

I've been working towards creating a PDF from PowerApps. I've written the HTML code, created the Flow, and for all intents and purposes it works. The only issue I'm running into now is while Flow is creating the HTML file (that includes formatting as it should be) the PDF version is coming back blank. 

 

Some on the forums said that there might be an issue with ColSpan in the HTML, and others said that it might be an issue with <tr> .   

 

Thanks!


Any thoughts / assistance would be greatly appreciated. 

 

 

Capture.PNG

 

Capture.PNG

 

"
 
<table style='width:100%'>
<tbody>
<tr>
<td colspan='1'>
<h4 style='text-align: left;'><span style='color: #de162b;'>&nbsp;</span></h4>
</td>
<td colspan='3'>
<h1>Title</h1>
</td>
</tr>
<tr>
<td colspan='6' bgcolor='#6295b1'>&nbsp;</td>
</tr>
</tbody>
</table>

<table style='width:100%'>
<tbody>
<tr>
<td width='150'>
<p>Branch Closing: </p>
</td>
<td style='colspan='2'; text-align: left;'><strong>" & DataRequested.Text &" </strong></td>
<td width='205'>
<p>Confidential:</p> 
</td>
<td colspan='2'><strong> "& 'Confidential Selector'.Text &" </strong></td>
</tr>
</tbody>
</table>

<table style='width:100%'>
<tbody>
<tr>
<td colspan='6' bgcolor='#6295b1'>
<p style='text-align: center;'>MILESTONE DATES</p>
</td>
</tr>
<tr>
<td>
<p>Employee Notification Date:</p>
</td>
<td colspan='2'>"& DatePicker1.SelectedDate &" </td>
<td>
<p>Project Specialist:</p>
</td>
<td colspan='2'>"& ClosingTeamMembers.Selected.DisplayName &"</td>
</tr>
<tr>
<td>
<p>Customer Notification Date:</p>
</td>
<td colspan='2'>"& DatePicker1.SelectedDate &"</td>
<td>
<p>Project Specialist Phone:</p>
</td>
<td colspan='2'>"& PhoneNumber.Text &"</td>
</tr>
<tr>
<td>
<p> Close Date:</p>
</td>
<td colspan='2'>"& DatePicker1.SelectedDate &"</td>
</tr>
<tr>
<td>
<p>Internal Close Date:</p>
</td>
<td colspan='2'>"& DatePicker1.SelectedDate &"</td>
</tr>
<tr>
<td colspan='6' bgcolor='#6295b1'>
<p style='text-align: center;'>ATTENTION</p>
</td>
</tr>
<tr>
<td colspan='6'>
<p>Warning</p>
</td>
</tr>
<td colspan='3' bgcolor='#6295b1'>
<p style='text-align: center;'>CLOSING</p>
</td>
<td colspan='3' bgcolor='#6295b1'>
<p style='text-align: center;'>SERVICING ACCOUNTS</p>
</td>
</tr>
<tr>
<td colspan='1'>
<p>Name:</p>
</td>
<td colspan='2'>"& Receiving.Text &"
</td>
<td colspan='1'>
<p> Name:</p>
</td>
<td colspan='2'>"& Receiving.Text &"</td>
</tr>
<tr>
<td>
<p>Address:</p>
</td>
<td colspan='2'>"& Receiving.Text &"</td>
<td>
<p>Address:</p>
</td>
<td colspan='2'>"& Receiving.Text &"</td>
</tr>
<tr>
<td>
<p>City/ST/Zip:</p>
<td colspan='2'>"& Receiving.Text &" </td>
<td>
<p>City/ST/Zip:</p>
<td colspan='2'>"& Receiving.Text &"</td>
</tr>
<tr>
<td>
<p>County:</p>
</td>
<td colspan='2'>"& Receiving.Text &"</td>
<td>
<p>County:</p>
</td>
<td colspan='2'>"& Receiving.Text &"</td>
</tr>
<tr>
<td>
<p> #:</p>
</td>
<td colspan='2'>"& Receiving.Text &"</td>
<td>
<p> #:</p>
</td>
<td colspan='2'>"& Receiving.Text &"</td>
</tr>
<tr>
<td>
<p> site #:</p>
</td>
<td colspan='2'>" & DataRequested.Text &" </td>
<td>
<p>Site #:</p>
</td>
<td colspan='2'>"& Receiving.Text &"</td>
</tr>
<tr>
<td>
<p>Cost Center #:</p>
</td>
<td colspan='2'>"& Receiving.Text &"</td>
<td>
<p> Cost Center #:</p>
</td>
<td colspan='2'>"& Receiving.Text &"</td>
</tr>
<tr>
<td>
<p>CRE Cost Center #:</p>
</td>
<td colspan='2'>" & DataRequested.Text &" </td>
<td>
<p>CRE Cost Center #:</p>
</td>
<td colspan='2'>"& Receiving.Text &"</td>
</tr>
<tr>
<td>
<p> Phone #:</p>
</td>
<td colspan='2'>" & DataRequested.Text &" </td>
<td>
<p>Phone #:</p>
</td>
<td colspan='2'>"& Receiving.Text &"</td>
</tr>
<tr>
<td>
<p> Fax #:</p>
</td>
<td colspan='2'>" & DataRequested.Text &" </td>
<td Fax #:</p>
</td>
<td colspan='2'>"& Receiving.Text &"</td>
</tr>
<tr>
<td>
<p> Mail Code:</p>
</td>
<td colspan='2'>" & DataRequested.Text &" </td>
<td>
<p> Mail Code:</p>
</td>
<td colspan='2'>"& Receiving.Text &"</td>
</tr>
<tr>
<td>
<p>Contact Name:</p>
</td>
<td colspan='2'>" & DataRequested.Text &" </td>
<td>
<p>Contact Name:</p>
</td>
<td colspan='2'>"& Receiving.Text &"</td>
</tr>
<td>
<p>MSA:</p>
</td>
<td colspan='2'>"& Receiving.Text &"</td>
<td>
<p>MSA:</p>
</td>
<td colspan='2'>"& Receiving.Text &"</td>
</tr>
<tr>
<td>
<p>Own / Lease:</p>
</td>
<td colspan='2'>"& Receiving.Text &"</td>
<td>
<p>Own / Lease:</p>
</td>
<td colspan='2'>"& Receiving.Text &"</td>
</tr>

<tr>
<td>
<p>Lease Exp:</p>
</td>
<td colspan='2'>"& Receiving.Text &"</td>
<td>
<p>Lease Exp:</p>
</td>
<td colspan='2'>"& Receiving.Text &"</td>
</tr>

<tr>
<td colspan='3'>&nbsp;</td>
<td colspan='3'>&nbsp;</td>
</tr>
<tr>
<td colspan='6' bgcolor='#6295b1'>
<p>INFORMATION</p>
</td>
</tr>
<tr>
<td>
<p>Income Tract:</p>
</td>
<td colspan='6'>"& PDFGallery.Selected.'Tract Income' &"</td>
</tr>
<tr>
<td>
<p>Distance to New :</p>
</td>
<td colspan='6'>" & DataRequested.Text &" </td>
</tr>
<tr>
<td>
<p>Reason for Close:</p>
</td>
<td colspan='6'>" & DataRequested.Text &" </td>
</tr>
<tr>
<td>
<p>Distance of Drive-Thru :</p>
</td>
<td colspan='6'>" & DataRequested.Text &" </td>
</tr>
<tr>
<td>
<p>Final Date FF&amp;E removed from Closing :</p>
</td>
<td colspan='6'>" & DataRequested.Text &" </td>
</tr>

<tr>
<td colspan='6' bgcolor='#6295b1'>
<p>BOX INFORMATION</p>
</td>
</tr>
<tr>
<td>
<p>Total boxes:</p>
</td>
<td>" & DataRequested.Text &" </td>
<td>
<p> Drill Date</p>
</td>
<td>" & DataRequested.Text &" </td>
<td>
<p>Boxes Rented:</p>
</td>
<td>" & DataRequested.Text &" </td>
</tr>

<tr>
<td colspan='1' bgcolor='#6295b1'>
<p>CONTACT INFORMATION</p>
</td>
<td colspan='1' bgcolor='#6295b1'>
<p>Name</p>
</td>
<td colspan='1' bgcolor='#6295b1'>
<p>Phone</p>
</td>
<td colspan='1' bgcolor='#6295b1'>&nbsp;</td>
<td colspan='1' bgcolor='#6295b1'>
<p>Name</p>
</td>
<td colspan='1' bgcolor='#6295b1'>
<p>Phone</p>
</td>
</tr>
<tr>
<td>
<p> Executive:</p>
</td>
<td>" & DataRequested.Text &" </td>
<td>" & PhoneNumber.Text &" </td>
<td>
<p>Intercept #</p>
</td>
<td>" & DataRequested.Text &" </td>
<td>" & PhoneNumber.Text &"</td>
</tr>
<tr>
<td>
<p>Leader:</p>
</td>
<td>" & DataRequested.Text &" </td>
<td>" & PhoneNumber.Text &"</td>
<td>
<p> Info</p>
</td>
<td>" & DataRequested.Text &" </td>
<td>" & PhoneNumber.Text &"</td>
</tr>
<tr>
<td>
<p>District Manager:</p>
</td>
<td>" & DataRequested.Text &" </td>
<td>" & PhoneNumber.Text &"</td>
<td>
<p>C Info:</p>
</td>
<td>" & DataRequested.Text &" </td>
<td>" & PhoneNumber.Text &"</td>
</tr>
<tr>
<td>
<p>Regional Operation:</p>
</td>
<td>" & DataRequested.Text &" </td>
<td>" & PhoneNumber.Text &"</td>
<td>
<p>Fair</p>
</td>
<td>" & DataRequested.Text &" </td>
<td>" & PhoneNumber.Text &"</td>
</tr>
<tr>
<td>
<p>District Operation:</p>
</td>
<td>" & DataRequested.Text &" </td>
<td>" & PhoneNumber.Text &"</td>
<td>
<p>relo signs</p>
</td>
<td>" & DataRequested.Text &" </td>
<td>" & PhoneNumber.Text &"</td>
</tr>
<tr>
<td>
<p>P Manager:</p>
</td>
<td>" & DataRequested.Text &" </td>
<td>" & PhoneNumber.Text &"</td>
<td>
<p>Ext. signage removal</p>
</td>
<td>" & DataRequested.Text &" </td>
<td>" & PhoneNumber.Text &"</td>
</tr>
<tr>
<td>
<p>Facility Manager:</p>
</td>
<td>" & DataRequested.Text &" </td>
<td>" & PhoneNumber.Text &"</td>
<td>
<p>A questions</p>
</td>
<td>" & DataRequested.Text &" </td>
<td>" & PhoneNumber.Text &"</td>
</tr>
<tr>
<td>
<p>Sr. Facility Manager:</p>
</td>
<td>" & DataRequested.Text &" </td>
<td>" & PhoneNumber.Text &"</td>
<td>
<p> Data/Voice</p>
</td>
<td>" & DataRequested.Text &" </td>
<td>" & PhoneNumber.Text &"</td>
</tr>
<tr>
<td>
<p>Regional Facility Manager:</p>
</td>
<td>" & DataRequested.Text &" </td>
<td>&" & PhoneNumber.Text &"</td>
<td>
<p> Box - Coordinator</p>
</td>
<td>" & DataRequested.Text &" </td>
<td>" & PhoneNumber.Text &"</td>
</tr>
<tr>
<td>
<p>Local Security:</p>
</td>
<td>" & DataRequested.Text &" </td>
<td>" & PhoneNumber.Text &"</td>
<td colspan='3'>&nbsp;</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
"
6 REPLIES 6
Highlighted
Community Support
Community Support

Re: HTML to Sharepoint PDF created in Webview, but blank in PDF

Hi @Skiroy ,

 

Where did you follow the steps to achieve this? Can you please share the reference link?

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Fatih1 Helper III
Helper III

Re: HTML to Sharepoint PDF created in Webview, but blank in PDF

If I make A PDF from Powerapps I do this like this:

1. In Powerapps create an HTMLText with property HtmlText -> myCode (your Htmlcode dont start with <!DOCTYPE><html>.. I dont know if this makes an different)

2. Create Flow

2.1 Trigger Powerapps -> Create File: concat(ask in powerapps my htmltext)

2.2 convert file to pdf

2.3 create file

 

so know in powerapps make a button and connect it with your flow. Then give the flow your htmltext.

 

I dont know if this gonna help you.

 

Skiroy Helper I
Helper I

Re: HTML to Sharepoint PDF created in Webview, but blank in PDF

Hi @v-monli-msft

 

I followed the basic procedure from this link https://www.youtube.com/watch?v=IhE0-HumNNo , but needed to create the HTML myself (which admittedly I have not done before). When I take out the ColSpans / any formatting it looks ugly as hell, but it actually creates the PDF in a SharePoint Document Library.  It also creates the HTML, and when I pull that up, it looks great (but the PDF is blank when opened). 

 

Thanks

Skiroy Helper I
Helper I

Re: HTML to Sharepoint PDF created in Webview, but blank in PDF

Hi @Fatih1

 

Within my Powerapps I have the HTMLText box with all my HTML (some examples showed <!doctype> and <html> as needed, but I've never written HTML before, so I wasn't sure. I was using www.w3schools.com as examples to write the HTML. For all intents and purposes the HTML is flowing through because it makes the HTML documents on the backend that looks correct, but it's that last convert to PDF phase that I'm thinking the format of the HTML is throwing off Powerapps / Flow in the conversion because it creates a PDF, allbeit a blank one. 

 

Thanks for your help!

Fatih1 Helper III
Helper III

Re: HTML to Sharepoint PDF created in Webview, but blank in PDF

Okey, in your Flow delete that last action 'Create File' - Sharepoint and change it to 'Create File' One Drive for Business. 

Folder path: Same as your html file

File Name: your choice

File Content: 'File-Content' from the HTML file

 

Can you try this out ? 

Skiroy Helper I
Helper I

Re: HTML to Sharepoint PDF created in Webview, but blank in PDF

Hi @Fatih1

 

I went back and reworked all the HTML. I didn't use any colspan functions and was very critical of the HTML. Interesting tidbit though, don't trust how the HTML looks on the PowerApps HTML field. Modify your HTML and export to PDF, then address any formatting issues after. 

 

Attention to detail is key. 

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (9,411)