Welcome Guest Search | Active Topics | Sign In | Register

Convert HTML to PDF flow Options
nadinka
Posted: Thursday, March 24, 2022 10:30:52 AM
Rank: Newbie
Groups: Member

Joined: 3/24/2022
Posts: 1
Hello! I try convert HTML to PDF in power automate. And have problem: in html to table are placed in same line, but in pdf are placed one under one.

CODE:
<html>
<head>
<meta charset="utf-8">
<title>Таблица</title>
[/code]
<style>




.vertical-table th {
color: #000;
font-size: 11px;
font-weight: 800;
text-align: center;
border: 1px #000 solid;

}

.vertical-table td {
font-size: 14px;
font-weight: normal;
color:#277d92;
line-height: 130%;
text-align: center;

}

</style>
</head>
<body>

<div>
<table class = "vertical-table" cellpadding="0" cellspacing="0" width = "70px" style="border: 1px #000 solid;background-color: aqua;display:inline-table;border-collapse: collapse;" >
<tr>
<th></th>
<th>Vision</th>
<th>Sph:</th>
<th>Cyl:</th>
<th>Axis:</th>
<th>Prism:</th>
<th>V/A:</th>
<th>Add:</th>
<th>V/A:</th>
</tr>

<tr>
<td>Right: </td>
<td>0.75</td>
<td>Data</td>
<td>Data</td>
<td>Data</td>
<td>Data</td>
<td>Data</td>
<td>Data</td>
<td>Data</td>
</tr>

<tr>
<td>left </td>
<td>0.75</td>
<td>Data</td>
<td>Data</td>
<td>Data</td>
<td>Data</td>
<td>Data</td>
<td>Data</td>
<td>lok</td>
</tr>
</table>


<table class="vertical-table" style="border: 1px #000 solid;background-color: chartreuse;display:inline-table"; width = "30px">
<tr><th> Advice</th></tr>
<tr> <td> something</td> </tr>
</table>

<div><p>lalallla</p></div>


</div>


</body>
</html>

END CODE

When viewed in HTML:
Everything displays correctly regardless of the amount of data.

When converted to PDF:
Tables are placed one under one.
eo_support
Posted: Thursday, March 24, 2022 6:26:52 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

We tested your HTML here and they worked correctly.

The main difference between screen and PDF page is screen is usually horizontal and PDF page is vertical. This means a browser window on screen is typically wider than a PDF page. The same content may appears on the same row horizontally on a wider window, but may wrap into two rows in a narrower window. To confirm whether this is the problem, you can try to reduce the width of your browser window to see if you see the same output in your PDF file.

If this is the problem, you can increase the pixel width of a PDF page by setting HtmlToPdf.Options.ZoomLevel to less than 1. This will reduce output size. For example, text would become smaller, but the result would be one line can fit more text.

Hope this helps. Please feel free to let us know if you still have any more questions.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.