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 / html to pdf font issue
Power Automate
Answered

html to pdf font issue

(0) ShareShare
ReportReport
Posted on by 29

Hi I'm using the cloudmersive connector trying to convert an html to pdf using css styling but for some reason the font size doesn't stay as it should, 

 

this is my code:

 

<!DOCTYPE html>
<html>
<head>
<style>
 .fondo_imagen{
background: linear-gradient(rgba(255,255,255,.7), rgba(255,255,255,.8)), url("@{dataUri(outputs('Get_file_content_Fondo')?['body'])}");
height: 99%;
background-repeat: no-repeat;
background-size: 100% 100%;
font-family: 'Ropa Sans', sans-serif;
}
table{
width: 100%;
table-layout: fixed;
align-self: center;
page-break-inside: auto;
margin: auto;
}
table.center {
width: 100%;
table-layout: fixed;
align-self: center;
page-break-inside: auto;
margin: auto;
}
th, td {
 padding: 1px 4px;
}
th {
font-size: 12px;
color: white;
font-weight: bold;
background-color:#006414;
text-align: center;
border-radius: 10px;
}
td {
border:1px solid #000000;
font-size: 10px;
color: black;
border-radius: 5px;
text-align: center;
}

tbody>tr>*:nth-last-child(3)~*{ width:33.3%}
tbody>tr>*:nth-last-child(4)~*{ width:25%}
tbody>tr>*:nth-last-child(6)~*{ width:15%}

#footer {
text-align: center;
position: fixed;
bottom: 0;
width: 100%;
font-size: 6px;
height: 10px;/* Height of the footer */
}
@media all {
.page-break { display: none; }
}
@media print {
html, body {
border: 1px solid white;
height: 99%;
page-break-after: avoid;
page-break-before: avoid;
};
.page-break { display: block; page-break-before: always; };
}
h2{
font-weight: bold;
text-align: center;
font-size: 20px;
page-break-after: auto;
}
h6{
font-weight: bold;
text-align: right;
font-size: 10px;
}
.cuerpo3{
border-right:none;
border-left:none;
border-top:none;
border-bottom:none;
font-size:12px;
text-align:left;
}
.parrafo{
font-size: 10px;
text-align: justify;
font-weight: normal;
}
</style>
</head>
<body>
<div class="fondo_imagen">
<h2>NOTA</h2>
<h6> Fecha: @{formatDateTime(outputs('Get_item')?['body/Fecha_x0020_de_x0020_Atenci_x00f'], 'dd-MM-yyyy')}</h6>
<hr />
<hr/>

<h3 class="cuerpo3">TITLE1</h3>

<p class="parrafo">@{outputs('Get_item')?['body/1']}</p>

<h3 class="cuerpo3">TITLE2</h3>

<p class="parrafo">@{outputs('Get_item')?['body/2']}</p>

<h3 class="cuerpo3">TITLE3</h3>

 <p class="parrafo"> @{outputs('Get_item')?['body/3']}</p>

<h3 class="cuerpo3">TITLE4</h3>

<p class="parrafo">@{outputs('Get_item')?['body/4']}</p>

<hr/>

</p>
</body>
<div id="footer">--</div>
</div>
<div class="page-break"></div>
</html>
using visual code should display this: 
ManuelH_0-1684879978634.png

 

but from power automate displays like this

 

ManuelH_2-1684880229133.png

 

 

Categories:
I have the same question (0)
  • CFernandes Profile Picture
    8,482 Most Valuable Professional on at

    @ManuelH - I don't have access to cloudmersive connector (Its third party) can you please try to reach out to their support https://account.cloudmersive.com/contact-support 

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

     

    P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.

  • Verified answer
    ManuelH Profile Picture
    29 on at

    I had to change my code and put the h and p inside a table

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 227

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard