using iText v8.0 HTML to PDF converter, the row heights look ok in HTML doc but NOT OK in PDF

23 Views Asked by At

Below is the HTML.
method being used from iText v8.0 com.itextpdf.html2pdf.HtmlConverter.convertToPdf

when rendered as a HTML, it looks fine.. when rendered as a PDF, it does NOT space out the row heights as expected.. What can I do to change this HTML (or call to convertToPdf to fix this?

Thanks in advance.


<html>
<head><style>
 /* Debrief Table, so want Margins at 0!!! */
 html, body {

 margin: 0;

     padding: 0;

     width: 100%;

     height: 100%;
 }
 /* Additional styles to ensure content utilizes full page */
 .full-page-content {

 width: 100%;

 height: 100%;

 /* More styles here */
 }</style><title>Reports</title>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>

</head>
<body> <table width='100%' border='0' cellpadding='0' cellspacing='0' align='center'  style='font-family: sans-serif;' >         <tr>           <td align='left' style='font-size: 24px; font-family:helvetica,sans-serif'>TABLE: Results (Revenue, Process, People)</td>           <td align='right' style='font-size: 15px; font-family:helvetica,sans-serif'>Executing Strategy / Quarter 3</td>      </tr></table><br/>
<table align='center' cellspacing='0' bordercolor='#E2E2E2' style='font-size: 14px; font-family: sans-serif;' cellpadding='7'  border='1' width='100%'>
<!-- Table is: 8 col(s) wide by 7 row(s) tall -->
    <tr height="114px" style='font-family:helvetica,sans-serif'>
        <td width='27%' style='background-color:#1f497d;' align='center' valign='center'><font  style='font-size: 25.0pt' font-family='Helvetica' color='#ffffff'>&nbsp;</font></td>
        <td width='10%' style='background-color:#1f497d;' align='center' valign='center'><font  style='font-size: 25.0pt' font-family='Helvetica' color='#ffffff'>PYr Qtr 4</font></td>
        <td width='10%' style='background-color:#1f497d;' align='center' valign='center'><font  style='font-size: 25.0pt' font-family='Helvetica' color='#ffffff'>Austen</font></td>
        <td width='10%' style='background-color:#1f497d;' align='center' valign='center'><font  style='font-size: 25.0pt' font-family='Helvetica' color='#ffffff'>Burke</font></td>
        <td width='10%' style='background-color:#1f497d;' align='center' valign='center'><font  style='font-size: 25.0pt' font-family='Helvetica' color='#ffffff'>Carlyle</font></td>
        <td width='10%' style='background-color:#1f497d;' align='center' valign='center'><font  style='font-size: 25.0pt' font-family='Helvetica' color='#ffffff'>Dawson</font></td>
        <td width='10%' style='background-color:#1f497d;' align='center' valign='center'><font  style='font-size: 25.0pt' font-family='Helvetica' color='#ffffff'>Eko</font></td>
        <td width='10%' style='background-color:#1f497d;' align='center' valign='center'><font  style='font-size: 25.0pt' font-family='Helvetica' color='#ffffff'>First</font></td>
    </tr>
    <tr height="114px" style='font-family:helvetica,sans-serif'>
        <td width='27%' style='border-top: 2px solid; background-color:#1f497d;' align='left' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica' color='#ffffff'>Revenue ($MM)</font></td>
        <td width='10%' style='border-top: 2px solid; background-color:#e8ebfd;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>$19.3</font></td>
        <td width='10%' style='border-top: 2px solid; background-color:#ffffff;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>$21.2</font></td>
        <td width='10%' style='border-top: 2px solid; background-color:#ffffff;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>$22.1</font></td>
        <td width='10%' style='border-top: 2px solid; background-color:#ffffff;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>$23.0</font></td>
        <td width='10%' style='border-top: 2px solid; background-color:#ffffff;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>$25.4</font></td>
        <td width='10%' style='border-top: 2px solid; background-color:#ffffff;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>$24.8</font></td>
        <td width='10%' style='border-top: 2px solid; background-color:#009900;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica' color='#ffffff'>$25.8</font></td>
    </tr>
    <tr height="114px" style='font-family:helvetica,sans-serif'>
        <td width='27%' style='border-top: 1px solid; background-color:#1f497d;' align='left' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica' color='#ffffff'>Process Complexity Index</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#e8ebfd;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>155.3</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#ffffff;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>131.5</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#ffffff;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>154.1</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#ffffff;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>153.1</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#009900;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica' color='#ffffff'>120.5</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#ffffff;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>136.3</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#ffffff;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>145.3</font></td>
    </tr>
    <tr height="114px" style='font-family:helvetica,sans-serif'>
        <td width='27%' style='border-top: 1px solid; background-color:#1f497d;' align='left' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica' color='#ffffff'>Cust Care Process Capability</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#e8ebfd;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>55.9%</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#ffffff;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>79.1%</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#ffffff;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>74.1%</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#ffffff;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>71.2%</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#ffffff;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>77.7%</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#009900;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica' color='#ffffff'>79.4%</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#ffffff;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>69.1%</font></td>
    </tr>
    <tr height="114px" style='font-family:helvetica,sans-serif'>
        <td width='27%' style='border-top: 1px solid; background-color:#1f497d;' align='left' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica' color='#ffffff'>BIT Process Capability</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#e8ebfd;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>58.2%</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#ffffff;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>77.0%</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#ffffff;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>82.0%</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#009900;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica' color='#ffffff'>82.7%</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#ffffff;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>75.5%</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#ffffff;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>77.6%</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#ffffff;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>71.8%</font></td>
    </tr>
    <tr height="114px" style='font-family:helvetica,sans-serif'>
        <td width='27%' style='border-top: 1px solid; background-color:#1f497d;' align='left' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica' color='#ffffff'>Cust Care Employee Perf</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#e8ebfd;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>62.2%</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#009900;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica' color='#ffffff'>73.1%</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#ffffff;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>70.7%</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#ffffff;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>70.9%</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#ffffff;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>72.5%</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#ffffff;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>70.2%</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#ffffff;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>72.0%</font></td>
    </tr>
    <tr height="114px" style='font-family:helvetica,sans-serif'>
        <td width='27%' style='border-top: 1px solid; background-color:#1f497d;' align='left' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica' color='#ffffff'>BIT Employee Perf</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#e8ebfd;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>65.4%</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#ffffff;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>71.2%</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#ffffff;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>73.4%</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#ffffff;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>74.1%</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#009900;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica' color='#ffffff'>79.1%</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#ffffff;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>74.5%</font></td>
        <td width='10%' style='border-top: 1px solid; background-color:#ffffff;' align='center' valign='center'><font  style='font-size: 30.0pt' font-family='Helvetica'>75.6%</font></td>
    </tr>
</table><div style="page-break-after: always;"></div>
</body></html>
0

There are 0 best solutions below