web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Converting from HTML t...
Power Automate
Unanswered

Converting from HTML to PDF returns nothing

(0) ShareShare
ReportReport
Posted on by 23

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?

Categories:
  • Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    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.

  • Dhruv100322 Profile Picture
    23 on at

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

  • Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    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.

  • Kitsu Profile Picture
    45 on at

    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.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 289

#2
11manish Profile Picture

11manish 288 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 125

Last 30 days Overall leaderboard