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

Please HELP! Conversion of this file to PDF is not supported

Please Help

I am currently trying to build a flow which will send a HTML and a PDF version of a file. I have been able to do this couple of time but recently I have been having an issue with a "Conversion of this file to PDF is not supported" error. I cant see where I have gone wrong and hoping if a fresh set of eyes will be able to point out my mistake.

 

Flow error

 

Flow

1 ACCEPTED SOLUTION

Accepted Solutions

@GrantC101 

I've fixed the main problem... none of your <tr> tags were closed with </tr>

See below:

3.png

 

You still need to do some work with the styling, OneDrive isn't the greatest with HTML conversion unfortunately.

Cheers J

 

Updated HTML Source below:

<html>
<head>
<style>
table, th, td {
border: 1px Solid black;
Vertical-Align: middle;text-align: left;
line-height: 0.8;
font-size: 90%;
}
</style>
</head>
<body>
<table>
<tr>
<td width='91'> <img src='Document Logo.jpg' width= '30' length= '50'>
</td>
<td colspan= '5'>
<p style='color:red;font-size:150%; text-align:center;'><strong>1.1 Scene Capture Personnel Record.</strong> </p>
</td>
</tr>
<tr>
<td colspan= '6'>
<p style='text-align:center;'><strong>Identify and record all individuals who were involved or witnessed the incident below.</strong></p>
<p style='text-align:center;'><strong>Ensure you identify if the individual was the Injured Party(IP), Involved (I) or Witness</strong></p>
</td>
</tr>
<tr>
<td width='91';><p style='text-align:center;'><strong>Name</strong></p>
</td>
<td width='91';><p style='text-align:center;'><strong>Contact Number</strong></p>
</td>
<td width='91';><p style='text-align:center;'><strong>WHO (IP,(I) or (W)</strong></p>
</td>
<td width='91'; ><p style='text-align:center;'><strong>Employee / Contractor</strong></p>
<p style='text-align:center;'><strong>Visitor</strong></p>
</td>
<td width='91';><p style='text-align:center;'><strong>Statement given</strong></p>
<p style='text-align:center;'><strong>Yes / No</strong></p>
</td>
<td width='91';><p style='text-align:center;'><strong>Comments</strong></p>
</td>
</tr>
<tr>
<td width='91';><p style='text-align:center;'>"&Name1_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Contact1_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Who1_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Employee1_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Statement1_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Comment1_Textbox&"</p>
</td>
</tr>
<tr>
<td width='91';><p style='text-align:center;'>"&Name2_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Contact2_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Who2_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Employee2_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Statement2_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Comment2_TextBox&"</p>
</td>
</tr>
<tr>
<td width='91';><p style='text-align:center;'>"&Name3_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Contact3_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Who3_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Employee3_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Statement3_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Comment3_TextBox&"</p>
</td>
</tr>
<tr>
<td width='91';><p style='text-align:center;'>"&Name4_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Contact4_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Who4_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Employee4_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Statement4_textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Comment4_TextBox&"</p>
</td>
</tr>
<tr>
<td width='91';><p style='text-align:center;'>"&Name5_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Contact5_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Who5_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Employee5_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Statement5_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Comment5_TextBox&"</p>
</td>
</tr>
<tr>
<td width='91';><p style='text-align:center;'>"&Name6_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Contact6_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Who6_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Employee6_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Statement6_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Comment6_TextBox&"</p>
</td>
</tr>
</table>
</body>
</html>

View solution in original post

11 REPLIES 11
GrantC101
Helper I
Helper I

The pictures I took did not load

Here is the message I get

{ "status": 400, "message": "Conversion of this file to PDF is not supported.", "source": "api.connectorp.svc.ms" }

Hey @GrantC101 

So you are trying to convert a HTML file? Can you share the input details to the failed convert actions? (assuming you're using OneDrive?)... this will help to see what you have passed in.

Thanks J

Hello @Jay-Encodian 

I create an HTML file from the data I collect using power apps this works fine and I can send the html via email. When I try to convert the file to PDF using a flow it fails and gives me the message. 

 

Flow error 2.pngFlow error1.pngPower Automate.jpg

Thanks @GrantC101 , can you share the input to the create file action so we can validate the HTML has valid content?

 

Afternoon @Jay-Encodian 

Here is the Htmltext that I have used.

<table>
<style>
table, th, td {
border: 1px Solid black;
Vertical-Align: middle;text-align: left;
line-height: 0.8;
font-size: 90%;
}
</style>
<tr>
<td width='91'> <img src='Document Logo.jpg' width= '30' length= '50'>
</td>
<td colspan= '5'>
<p style='color:red;font-size:150%; text-align:center;'><strong>1.1 Scene Capture Personnel Record.</strong> </p>
</td>
</tr>
<tr>
<td colspan= '6'>
<p style='text-align:center;'><strong>Identify and record all individuals who were involved or witnessed the incident below.</strong></p>
<p style='text-align:center;'><strong>Ensure you identify if the individual was the Injured Party(IP), Involved (I) or Witness</strong></p>
</td>
<tr>
<td width='91';><p style='text-align:center;'><strong>Name</strong></p>
</td>
<td width='91';><p style='text-align:center;'><strong>Contact Number</strong></p>
</td>
<td width='91';><p style='text-align:center;'><strong>WHO (IP,(I) or (W)</strong></p>
</td>
<td width='91'; ><p style='text-align:center;'><strong>Employee / Contractor</strong></p>
<p style='text-align:center;'><strong>Visitor</strong></p>
</td>
<td width='91';><p style='text-align:center;'><strong>Statement given</strong></p>
<p style='text-align:center;'><strong>Yes / No</strong></p>
</td>
<td width='91';><p style='text-align:center;'><strong>Comments</strong></p>
</td>
<tr>
<td width='91';><p style='text-align:center;'>"&Name1_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Contact1_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Who1_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Employee1_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Statement1_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Comment1_Textbox&"</p>
</td>
<tr>
<td width='91';><p style='text-align:center;'>"&Name2_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Contact2_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Who2_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Employee2_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Statement2_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Comment2_TextBox&"</p>
</td>
<tr>
<td width='91';><p style='text-align:center;'>"&Name3_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Contact3_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Who3_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Employee3_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Statement3_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Comment3_TextBox&"</p>
</td>
<tr>
<td width='91';><p style='text-align:center;'>"&Name4_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Contact4_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Who4_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Employee4_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Statement4_textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Comment4_TextBox&"</p>
</td>
<tr>
<td width='91';><p style='text-align:center;'>"&Name5_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Contact5_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Who5_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Employee5_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Statement5_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Comment5_TextBox&"</p>
</td>
<tr>
<td width='91';><p style='text-align:center;'>"&Name6_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Contact6_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Who6_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Employee6_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Statement6_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Comment6_TextBox&"</p>
</td>
</table>

 

Hey @GrantC101 

The HTML is malformed which is why it won't convert... not a very helpful error message!

I've just fixed up adding html, head, body tags... it now converts, but empty PDF generated. I've got 5 more mins and will see if I can fix it... This conversion tool has very limited support for HTML standards

HTH

Jay

Hey @GrantC101 

See below... I'll see if I can fix-up the HTML for Onedrive.

2.png

 

Cheers J

@GrantC101 

I've fixed the main problem... none of your <tr> tags were closed with </tr>

See below:

3.png

 

You still need to do some work with the styling, OneDrive isn't the greatest with HTML conversion unfortunately.

Cheers J

 

Updated HTML Source below:

<html>
<head>
<style>
table, th, td {
border: 1px Solid black;
Vertical-Align: middle;text-align: left;
line-height: 0.8;
font-size: 90%;
}
</style>
</head>
<body>
<table>
<tr>
<td width='91'> <img src='Document Logo.jpg' width= '30' length= '50'>
</td>
<td colspan= '5'>
<p style='color:red;font-size:150%; text-align:center;'><strong>1.1 Scene Capture Personnel Record.</strong> </p>
</td>
</tr>
<tr>
<td colspan= '6'>
<p style='text-align:center;'><strong>Identify and record all individuals who were involved or witnessed the incident below.</strong></p>
<p style='text-align:center;'><strong>Ensure you identify if the individual was the Injured Party(IP), Involved (I) or Witness</strong></p>
</td>
</tr>
<tr>
<td width='91';><p style='text-align:center;'><strong>Name</strong></p>
</td>
<td width='91';><p style='text-align:center;'><strong>Contact Number</strong></p>
</td>
<td width='91';><p style='text-align:center;'><strong>WHO (IP,(I) or (W)</strong></p>
</td>
<td width='91'; ><p style='text-align:center;'><strong>Employee / Contractor</strong></p>
<p style='text-align:center;'><strong>Visitor</strong></p>
</td>
<td width='91';><p style='text-align:center;'><strong>Statement given</strong></p>
<p style='text-align:center;'><strong>Yes / No</strong></p>
</td>
<td width='91';><p style='text-align:center;'><strong>Comments</strong></p>
</td>
</tr>
<tr>
<td width='91';><p style='text-align:center;'>"&Name1_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Contact1_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Who1_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Employee1_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Statement1_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Comment1_Textbox&"</p>
</td>
</tr>
<tr>
<td width='91';><p style='text-align:center;'>"&Name2_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Contact2_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Who2_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Employee2_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Statement2_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Comment2_TextBox&"</p>
</td>
</tr>
<tr>
<td width='91';><p style='text-align:center;'>"&Name3_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Contact3_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Who3_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Employee3_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Statement3_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Comment3_TextBox&"</p>
</td>
</tr>
<tr>
<td width='91';><p style='text-align:center;'>"&Name4_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Contact4_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Who4_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Employee4_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Statement4_textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Comment4_TextBox&"</p>
</td>
</tr>
<tr>
<td width='91';><p style='text-align:center;'>"&Name5_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Contact5_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Who5_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Employee5_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Statement5_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Comment5_TextBox&"</p>
</td>
</tr>
<tr>
<td width='91';><p style='text-align:center;'>"&Name6_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Contact6_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Who6_Textbox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Employee6_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Statement6_TextBox&"</p>
</td>
<td width='91';><p style='text-align:center;'>"&Comment6_TextBox&"</p>
</td>
</tr>
</table>
</body>
</html>
v-alzhan-msft
Community Support
Community Support

Hi @GrantC101 ,

 

Could you please take a try to choose the File content from the Get file content action when you create the html file? please create the flow as screenshot below:

1.png

 

Best Regards,

Alice

 

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

Thank you very much @Jay-Encodian 

I thought it would be something simple but I just couldn't see it.

Hi @v-alzhan-msft 

The first "get file content" is an image file I use on my forms.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (6,278)