cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RVF
Regular Visitor

Convert HTML to PDF - Error

Hello everyone!

I am trying to convert an HTML file to PDF in Power Automate, however I always get the error: 400 Error Conversion to PDF not supported. I have tried using an "basic" HTML file an it worked. Do you know if there is any limit for this conversion or any code which is not acceptable (CSS) ?

Here is the HTML code I am using:

 

 

<!DOCTYPE html>
<html >

<head>

  <title></title>

  <style type="text/css">
    table,
    td {
      color: #000000;
    }
    
    @media only screen and (min-width: 620px) {
      .u-row {
        width: 600px !important;
      }
      .u-row .u-col {
        vertical-align: top;
      }
      .u-row .u-col-30 {
        width: 180px !important;
      }
      .u-row .u-col-70 {
        width: 420px !important;
      }
      .u-row .u-col-100 {
        width: 600px !important;
      }
    }
    
    @media (max-width: 620px) {
      .u-row-container {
        max-width: 100% !important;
        padding-left: 0px !important;
        padding-right: 0px !important;
      }
      .u-row .u-col {
        min-width: 320px !important;
        max-width: 100% !important;
        display: block !important;
      }
      .u-row {
        width: calc(100% - 40px) !important;
      }
      .u-col {
        width: 100% !important;
      }
      .u-col>div {
        margin: 0 auto;
      }
    }
    
    body {
      margin: 0;
      padding: 0;
    }
    
    table,
    tr,
    td {
      vertical-align: top;
      border-collapse: collapse;
    }
    
    p {
      margin: 0;
    }
    
    .ie-container table,
    .mso-container table {
      table-layout: fixed;
    }
    
    * {
      line-height: inherit;
    }
    
    a[x-apple-data-detectors='true'] {
      color: inherit !important;
      text-decoration: none !important;
    }
  </style>







</head>

<body class="clean-body" style="margin: 0;padding: 0;-webkit-text-size-adjust: 100%;background-color: #ffffff;color: #000000">

  <table style="border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;min-width: 320px;Margin: 0 auto;background-color: #ffffff;width:100%" cellpadding="0" cellspacing="0">
    <tbody>
      <tr style="vertical-align: top">
        <td style="word-break: break-word;border-collapse: collapse !important;vertical-align: top">



          <div class="u-row-container" style="padding: 0px;background-color: transparent">
            <div class="u-row" style="Margin: 0 auto;min-width: 320px;max-width: 600px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: transparent;">
              <div style="border-collapse: collapse;display: table;width: 100%;background-color: transparent;">
     
                <div class="u-col u-col-30" style="max-width: 320px;min-width: 180px;display: table-cell;vertical-align: top;">
                  <div style="width: 100% !important;">
         
                    <div style="padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;">
              

                      <table style="font-family:'Cabin',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
                        <tbody>
                          <tr>
                            <td style="overflow-wrap:break-word;word-break:break-word;padding:1px;font-family:'Cabin',sans-serif;" align="left">

                              <table width="100%" cellpadding="0" cellspacing="0" border="0">
                                <tr>
                                  <td style="padding-right: 0px;padding-left: 0px;" align="center">

                                    <img align="center" border="0" src="$foto$" alt="" title="" style="outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: inline-block !important;border: none;height: auto;float: none;width: 100%;max-width: 178px;"
                                      width="178" />

                                  </td>
                                </tr>
                              </table>

                            </td>
                          </tr>
                        </tbody>
                      </table>

              
                    </div>
        
                  </div>
                </div>
         
                <div class="u-col u-col-70" style="max-width: 320px;min-width: 420px;display: table-cell;vertical-align: top;">
                  <div style="width: 100% !important;">
           
                    <div style="padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;">
             

                      <table style="font-family:'Cabin',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
                        <tbody>
                          <tr>
                            <td style="overflow-wrap:break-word;word-break:break-word;padding:8px 8px 0px;font-family:'Cabin',sans-serif;" align="left">

                              <div style="line-height: 140%; text-align: left; word-wrap: break-word;">
                                <p style="font-size: 14px; line-height: 140%;"><strong><span style="font-family: arial, helvetica, sans-serif; font-size: 18px; line-height: 25.2px;">$NomeProfissional$</span></strong></p>
                              </div>

                            </td>
                          </tr>
                        </tbody>
                      </table>

                      <table style="font-family:'Cabin',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
                        <tbody>
                          <tr>
                            <td style="overflow-wrap:break-word;word-break:break-word;padding:1px 7px 20px;font-family:'Cabin',sans-serif;" align="left">

                              <div style="line-height: 100%; text-align: left; word-wrap: break-word;">
                                <p style="font-size: 14px; line-height: 100%;"><span style="font-family: arial, helvetica, sans-serif; font-size: 14px; line-height: 14px; color: #747480;">$cargo$</span></p>
                              </div>

                            </td>
                          </tr>
                        </tbody>
                      </table>

                      <table style="font-family:'Cabin',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
                        <tbody>
                          <tr>
                            <td style="overflow-wrap:break-word;word-break:break-word;padding:10px 10px 5px;font-family:'Cabin',sans-serif;" align="left">

                              <div style="line-height: 100%; text-align: left; word-wrap: break-word;">
                                <p style="font-size: 14px; line-height: 100%;"><span style="font-family: arial, helvetica, sans-serif; font-size: 14px; line-height: 14px;"><strong>Mobile:</strong> $mobile$</span></p>
                              </div>

                            </td>
                          </tr>
                        </tbody>
                      </table>

                      <table style="font-family:'Cabin',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
                        <tbody>
                          <tr>
                            <td style="overflow-wrap:break-word;word-break:break-word;padding:10px 10px 5px;font-family:'Cabin',sans-serif;" align="left">

                              <div style="line-height: 100%; text-align: left; word-wrap: break-word;">
                                <p style="font-size: 14px; line-height: 100%;"><span style="font-family: arial, helvetica, sans-serif; font-size: 14px; line-height: 14px;"><strong>Email:</strong> $email$</span></p>
                              </div>

                            </td>
                          </tr>
                        </tbody>
                      </table>

                      <table style="font-family:'Cabin',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
                        <tbody>
                          <tr>
                            <td style="overflow-wrap:break-word;word-break:break-word;padding:10px;font-family:'Cabin',sans-serif;" align="left">

                              <div style="line-height: 100%; text-align: left; word-wrap: break-word;">
                                <p style="font-size: 14px; line-height: 100%;"><span style="font-family: arial, helvetica, sans-serif; font-size: 14px; line-height: 14px;"><strong>Office:</strong> $office$</span></p>
                              </div>

                            </td>
                          </tr>
                        </tbody>
                      </table>

                    </div>
             
                  </div>
                </div>
    
              </div>
            </div>
          </div>



          <div class="u-row-container" style="padding: 0px;background-color: transparent">
            <div class="u-row" style="Margin: 0 auto;min-width: 320px;max-width: 600px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: #ffffff;">
              <div style="border-collapse: collapse;display: table;width: 100%;background-color: transparent;">
  
                <div class="u-col u-col-100" style="max-width: 320px;min-width: 600px;display: table-cell;vertical-align: top;">
                  <div style="width: 100% !important;">
         
                    <div style="padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;">
               

                      <table style="font-family:'Cabin',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
                        <tbody>
                          <tr>
                            <td style="overflow-wrap:break-word;word-break:break-word;padding:15px 5px 5px;font-family:'Cabin',sans-serif;" align="left">

                              <h4 style="margin: 0px; color: #ffe600; line-height: 100%; text-align: left; word-wrap: break-word; font-weight: normal; font-family: arial,helvetica,sans-serif; font-size: 16px;">
                                Curriculum Vitae
                              </h4>

                            </td>
                          </tr>
                        </tbody>
                      </table>

                      <table style="font-family:'Cabin',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
                        <tbody>
                          <tr>
                            <td style="overflow-wrap:break-word;word-break:break-word;padding:0px 0px 0px 10px;font-family:'Cabin',sans-serif;" align="left">

                              <div style="line-height: 100%; text-align: left; word-wrap: break-word;">
                                <p style="font-size: 14px; line-height: 100%;">$cv$</p>
                              </div>

                            </td>
                          </tr>
                        </tbody>
                      </table>

                    </div>
           
                  </div>
                </div>
 
              </div>
            </div>
          </div>



          <div class="u-row-container" style="padding: 0px;background-color: transparent">
            <div class="u-row" style="Margin: 0 auto;min-width: 320px;max-width: 600px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: #ffffff;">
              <div style="border-collapse: collapse;display: table;width: 100%;background-color: transparent;">
   
                <div class="u-col u-col-100" style="max-width: 320px;min-width: 600px;display: table-cell;vertical-align: top;">
                  <div style="width: 100% !important;">
      
                    <div style="padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;">
       

                      <table style="font-family:'Cabin',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
                        <tbody>
                          <tr>
                            <td style="overflow-wrap:break-word;word-break:break-word;padding:5px;font-family:'Cabin',sans-serif;" align="left">

                              <h4 style="margin: 0px; color: #ffe600; line-height: 100%; text-align: left; word-wrap: break-word; font-weight: normal; font-family: arial,helvetica,sans-serif; font-size: 16px;">
                                Relevant Experience
                              </h4>

                            </td>
                          </tr>
                        </tbody>
                      </table>

                      <table style="font-family:'Cabin',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
                        <tbody>
                          <tr>
                            <td style="overflow-wrap:break-word;word-break:break-word;padding:0px 0px 0px 10px;font-family:'Cabin',sans-serif;" align="left">

                              <div style="line-height: 100%; text-align: left; word-wrap: break-word;">
                                <p style="font-size: 14px; line-height: 100%;">$experience$</p>
                              </div>

                            </td>
                          </tr>
                        </tbody>
                      </table>

                    </div>

                  </div>
                </div>

              </div>
            </div>
          </div>



          <div class="u-row-container" style="padding: 0px;background-color: transparent">
            <div class="u-row" style="Margin: 0 auto;min-width: 320px;max-width: 600px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: #ffffff;">
              <div style="border-collapse: collapse;display: table;width: 100%;background-color: transparent;">

                <div class="u-col u-col-100" style="max-width: 320px;min-width: 600px;display: table-cell;vertical-align: top;">
                  <div style="width: 100% !important;">
         
                    <div style="padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;">
          

                      <table style="font-family:'Cabin',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
                        <tbody>
                          <tr>
                            <td style="overflow-wrap:break-word;word-break:break-word;padding:5px;font-family:'Cabin',sans-serif;" align="left">

                              <h4 style="margin: 0px; color: #ffe600; line-height: 100%; text-align: left; word-wrap: break-word; font-weight: normal; font-family: arial,helvetica,sans-serif; font-size: 16px;">
                                Experience in AgriBusiness
                              </h4>

                            </td>
                          </tr>
                        </tbody>
                      </table>

                      <table style="font-family:'Cabin',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
                        <tbody>
                          <tr>
                            <td style="overflow-wrap:break-word;word-break:break-word;padding:0px;font-family:'Cabin',sans-serif;" align="left">

                              <div style="line-height: 100%; text-align: left; word-wrap: break-word;">
                                <ul>
                                  $tagagro$
                                </ul>
                              </div>

                            </td>
                          </tr>
                        </tbody>
                      </table>

         
                    </div>
            
                  </div>
                </div>
 
              </div>
            </div>
          </div>



          <div class="u-row-container" style="padding: 0px;background-color: transparent">
            <div class="u-row" style="Margin: 0 auto;min-width: 320px;max-width: 600px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: #ffffff;">
              <div style="border-collapse: collapse;display: table;width: 100%;background-color: transparent;">
          
                <div class="u-col u-col-100" style="max-width: 320px;min-width: 600px;display: table-cell;vertical-align: top;">
                  <div style="width: 100% !important;">
             
                    <div style="padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;">
                 

                      <table style="font-family:'Cabin',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
                        <tbody>
                          <tr>
                            <td style="overflow-wrap:break-word;word-break:break-word;padding:5px;font-family:'Cabin',sans-serif;" align="left">

                              <h4 style="margin: 0px; color: #ffe600; line-height: 100%; text-align: left; word-wrap: break-word; font-weight: normal; font-family: arial,helvetica,sans-serif; font-size: 16px;">
                                AgriBusiness Clients
                              </h4>

                            </td>
                          </tr>
                        </tbody>
                      </table>

                      <table style="font-family:'Cabin',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
                        <tbody>
                          <tr>
                            <td style="overflow-wrap:break-word;word-break:break-word;padding:0px;font-family:'Cabin',sans-serif;" align="left">

                              <div style="line-height: 100%; text-align: left; word-wrap: break-word;">
                                <ul>
                                  <li dir="ltr" style="font-size: 14px; line-height: 14px;">$clients$</li>
                                </ul>
                              </div>

                            </td>
                          </tr>
                        </tbody>
                      </table>

           
                    </div>
  
                  </div>
                </div>

              </div>
            </div>
          </div>

        </td>
      </tr>
    </tbody>
  </table>

</body>

</html>

 

 

 

Thanks and Regards,
Rafael

1 REPLY 1
VJR
Solution Supplier
Solution Supplier

Hello @RVF 

 

Could you please check if the methods mentioned in below links are working on the html that is not basic

 

http://www.cleverworkarounds.com/2018/03/09/three-ways-to-convert-html-to-pdf-using-microsoft-flow/

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

 






-------------------------------------------
Help fellow beings find relevant posts.
Upvote to a supporting response.
Mark as solution to an answer.

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,323)