cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dhruv100322
Frequent Visitor

Converting from HTML to PDF returns nothing

What the HTML page appears as:

 

Dhruv100322_0-1651066408906.png

 

Output in PDF:

 

Dhruv100322_1-1651066436402.png

 

Screenshot of my flow:

Dhruv100322_2-1651066459326.png

 

 

Input for compose is:

 

 

 

 

 

<!DOCTYPE html>
<html lang="en">

<style>

  .card-body {
  -webkit-box-flex: 1;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  padding: 1.25rem;
}

.p-3 {
  padding: 1rem !important;
}

.mb-3,
.my-3 {
  margin-bottom: 1rem !important;
}

.row {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
}
.col {
  -ms-flex-preferred-size: 0;
  flex-basis: 0;
  -webkit-box-flex: 1;
  -ms-flex-positive: 1;
  flex-grow: 1;
  max-width: 100%;
}
.container {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

.card {
  position: relative;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color: var(--white);
  background-clip: border-box;
  border: 1px solid rgba(0, 0, 0, 0.125);
  border-radius: 0.25rem;
}
.border-dark {
  border-color: var(--gray-dark) !important;
}
  </style>

<head>
<title>Home</title>
</head>

<body>
<div class="container">
  <div class="card border-dark">
<div class="card-body">
  <h4 class="mb-3">Overview</h4>
  <div class="row">
    <div class="col">
      <!-- Campaign Information fields -->
      <fieldset class="mb-3">
        <div class="row mb-3">
          <div class="col">
            <!-- Portfolio -->
            <label><strong>Portfolio</strong></label>
            <input class="form-control complianceLoadIn" type="text" value="exportCompliance-portfolio" disabled>
          </div>
        </div>
      </fieldset>
    </div>
  </div>  
</div>
</div>
</div>
</body>
</html>

 

 

 

 

 

Can anyone help please?

5 REPLIES 5
Pstork1
Dual Super User
Dual Super User

I'm not sure if this would do it, but the one thing that I see out of place is your <Style></Style> tag needs to be inside the <Head> tag, not before it.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Oh okay. I fixed it. However, that didn't solve the issue.

The other thing I suspect you will have a problem with is that the PDF formatting doesn't do advanced CSS.  For example, it won't do page breaks specified in CSS.  So I doubt it will work with -webkit-box-flex or -ms-flex.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Kitsu
Helper I
Helper I

You are trying to make an advanced html, power automate default connector can only use simple html, use adobe pdf connector if you want and advanced PDF, but you need to use a zip file with all the required files you need inside.

Hertzy_Tambwe
Helper III
Helper III

I have the same problem for a while, let me know if you find a solution, it would help me a lot.

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.

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.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (4,486)