cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GiovanniMugno
Level: Powered On

Issues converting HTML to PDF using Flow on the code

My problem is that I tried to make a HTML to pass it to PDF with a flow based on shane's young,  the thing is, i need to separate some bars from anothers to give the PDF a more appealing look, and to center all the tables in the middle, aditional, i need to put a logo on top of the PDF, i know the problem is in my HTML code, because the .html file that generates in my onedrive it's totally fine and looks like i wants to:

1.jpg








And it's totally fine (the width of the table it's because it's set on 80% but on paper it should look just fine), the problem comes when it converts to PDF:

2.jpg
It just sticks to the left, don't center in the paper,  and the <br/> doesn't work, on top of that, if i put an <img> to put the logo on the beggining of the PDF, it shows the image missing (i mean, the white box with a red X on it), so, summarizing, i need to:

  • Center all the tables.
  • Put a space between each <th> (the blue titles).
  • Put a image on top of the tables.

This is the HTML im using:

Spoiler
"<!DOCTYPE html>
<html>
<head>
<style>
table, th, td {
  border: 0px solid black;
}
th{
background-color:#00b0f0;
}
tr{
background-color: blue;
}
td{
width: 50%;
background-color: #92d050;
}
table{
width: 80%;
background-color: black;
margin: 0 auto; 
}
</style>
</head>
<body>
<br/>
<p align=center> </p>
<center>
<table align=center>
<tr>
    <th>" & Sede_PDF & " " & Ubicacion_PDF & "</th>
</tr>
</table>

<table align=center>
<br/>
<tr>
    <th colspan=""2"">CPU</th>
</tr>
  <tr>
    <td>Código</td>
    <td style='background-color:white'>" & CPC & "</td>
  </tr>
  <tr>
    <td>Marca</td>
    <td style='background-color:white'>" & Marca_PDF & "</td>
  </tr>
  <tr>
    <td>Procesador</td>
    <td style='background-color:white'>" & Procesador_PDF & "</td>
  </tr>
  <tr>
    <td>RAM</td>
    <td style='background-color:white'>" & RAM_PDF & "</td>
  </tr>
  <tr>
    <td>Unidad DVD</td>
    <td style='background-color:white'>" & Marca_PDF & "</td>
  </tr>
  <tr>
    <td>Windows</td>
    <td style='background-color:white'>" & 'S.O_PDF' & "</td>
  </tr>
  <tr>
    <td>Office</td>
    <td style='background-color:white'>" & Office_PDF & "</td>
  </tr>
  <tr>
    <td >Disco duro</td>
    <td style='background-color:white'>" & Disco_duro_PDF & "</td>
  </tr>
</table>

<table align=center>
<br/>
  <tr>
    <th colspan=""2"">Monitor</th>
  </tr>
  <tr>
    <td>Marca</td>
    <td style='background-color:white'>" & Marca_Monitor_PDF & "</td>
  </tr>
  <tr>
    <td>Serial</td>
    <td style='background-color:white'>" & Monitor_PDF & "</td>
  </tr>
</table>

<table align=center>
<br/>
  <tr>
    <th colspan=""2"">Teclado</th>
  </tr>
  <tr>
    <td>Marca</td>
    <td style='background-color:white'>" & Marca_Teclado_PDF & "</td>
  </tr>
  <tr>
    <td>Serial</td>
    <td style='background-color:white'>" & Teclado_PDF & "</td>
  </tr>
</table>

<table align=center>
<br/>
  <tr>
    <th colspan=""2"">Mouse</th>
  </tr>
  <tr>
    <td>Marca</td>
    <td style='background-color:white'>" & Marca_Mouse_PDF & "</td>
  </tr>
  <tr>
    <td>Serial</td>
    <td style='background-color:white'>" & Mouse_PDF & "</td>
  </tr>
</table>
</center>
<br/>
</body>
</html>
"
2 REPLIES 2
Sijts
Level 8

Re: Issues converting HTML to PDF using Flow on the code

don't, just don't.

 

the pdf converter shane uses is not far enough for nice creation of pdf's.

i spend a lot of time to it, but it isn't really stable..

 

If you can/must, try to use an email or other platform (excel whatever) instead.

vamorris
Level: Powered On

Re: Issues converting HTML to PDF using Flow on the code

Hi, I also was habving issues generating the PDF.

I found that the HTML has to be REALLY well formed for the PDF converter to work - so check your hmtl result file in an HTML checker...

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (3,788)