Zunenonooo / dompdf

Automatically exported from code.google.com/p/dompdf
0 stars 0 forks source link

Big white space between table cells #545

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The problem is that I get a big white space between the <tr> before the last 
and the last <tr>, I don't know why.

I am using - DOMPDF 0.6.0 beta 3.

HTML source code that I want to convert

<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title></title>
        <style type="text/css"> 
            @page {margin: 5.5cm 2cm 2cm;}
            body {font-family: sans-serif; margin: 0; text-align: justify; font-size: 0.8em;}
            #header, #footer {position: fixed; left: 0; right: 0; font-size: 0.7em;}
            #header {top: 0;}
            #footer {bottom: 0; text-align: center;}
            #editorial_title {font-size: 18px; font-weight: bold;}
            ul {padding: 0; margin: 0 0 20px 0; list-style-type:square; }
            ul#editorial_assistant {margin-bottom: 50px;}
            ul#editorial_assistant li {margin-left: 13px;}
            #date {font-size: 22px; font-weight: bold; color: #113D76; margin: 0; padding: 0;}
            #office_title {font-size: 20px; font-weight: bold;}
            #links a {font-size: 20px; font-weight: bold; color: #113D76; text-decoration: underline; line-height: 30px;}
            #links li {list-style-type: none; padding-bottom: 10px;}
            h2 {font-size: 20px;}
            hr {border: 0 none; page-break-after: always;}
            p {text-align: justify; margin-left: 0px; padding-left: 0px;}
            #first_page {padding-left: 118px; width: 600px;}
            #content {font-family: sans-serif; font-size: 1.1em; padding-left: -40px; width: 740px;}
        #content p {line-height: 20px;}            
            #last_page {font-size: 0.8em; padding-left: -40px;}
        #last_page p {margin-bottom: 20px; text-align: left;}
            #footer_text {font-size: 0.9em;}
            .line {border-bottom: 2px solid #113D76; width:581px;}
            #head_table {position: fixed; bottom: 230px; right: 0; width:552px; font-size: 0.8em;}
            #head_table td p {text-align: justify; }
            #head_table td {line-height: 15px;}
            table.report_title h2 {text-align: left; width: 550px;}
            .report_date span {margin: 0; text-align: right; width: 180px;}  
        </style>
    </head>
    <body>      
        <script type="text/php">
            if( isset($pdf) ) {
            //header and footer
            $obj = $pdf->open_object();

            //header image
            $image_top = 'images/di_pdf/logo.png';
            $pdf->image($image_top, 25, 25, 556, 123); 

            $w = $pdf->get_width();
            $h = $pdf->get_height() - 20;

            // Draw a line along the bottom
            $image_width = 51;
            $image_height = 39;
            $image_bottom = 'images/di_pdf/bottom_logo.png';
            $pdf->image($image_bottom, 25, $h - $image_width, $image_width, $image_height); 

            $color = array(0.06,0.23,0.46);
            $pdf->line(94 + $image_width, $h - $image_width + 27, $w - $image_width + 20, $h - $image_width + 27, $color, 4);

            $color = array(0, 0, 0);
            $font = Font_Metrics::get_font("verdana");
            $text = "editor@BCAresearch.com TEL 514.499.9550 FAX 514.843.1763 www.BCAresearch.com Copyright 2011 BCA Research Inc. All Rights Reserved. Refer to last page.";
            $pdf->page_text(94 + $image_width, $h - $image_width + 32, $text, $font, 5.5, $color);

            $text = "{PAGE_NUM}";
            $pdf->page_text($w - $image_width + 15, $h - $image_width + 32, $text, $font, 5.5, $color);

            $pdf->close_object();
            $pdf->add_object($obj, 'all');
            }
        </script>
        <div id="header"></div>
        <div id="footer"></div>     
        <!-- HEADER TABLE -->
        <div id="content">
            <table class="report_title"><thead><tr><th><h2><a name="7974" class="report_title">The Challenges Of FOMC Policy Evolution</a></h2></th><th class="report_date"><span>October 11, 2012</span></th></tr></thead><tr><td colspan="2"><em><p>
    The FOMC minutes confirmed an evolution is underway toward a more explicit outcome-based forward guidance (please see the October 5th <a href="http://dailyinsights.bcaresearch.com/daily/7963"><em>Insight</em></a>). Nonetheless, there are still considerable barriers to implementation.</p>
</em></td></tr><tr><td colspan="2"><p style="text-align: center">
    <img alt="" src="/images/editor/images/di/DIN-20121011-125012.GIF" style="width: 511px; height: 377px" /></p></td></tr>
<tr><td colspan="2"><p>
    Last week&rsquo;s employment report demonstrates the downside of linking forward guidance to specific numerical targets. The unemployment rate fell by 0.3 percentage points to 7.8%, but this likely overstates the strength of the labor market. The household employment data - from which the unemployment rate is derived - have been particularly volatile during this recovery. Fed Chairman Bernanke has argued that the official unemployment rate (U3) understates the true level of slack, pointing to the U6 measure and the duration of unemployment.</p></td></tr>
<tr><td colspan="2"><p>
    Meanwhile, the payroll report, based on the establishment survey, claimed 114,000 jobs were created in September. Bear in mind, however, the 90% confidence interval on this number according to the Bureau of Labor Statistics is +/-100,000 due to sampling error, which makes payroll growth barely different from zero at this level of statistical significance. Non-sampling error further reduces the fidelity of the monthly payroll estimate.</p></td></tr>
<tr><td colspan="2"><p>
    So, while the move toward more explicit outcome-based guidance may be desirable based on the precept it will improve the public&rsquo;s understanding of the Fed&rsquo;s reaction function, it may be difficult to implement in practice. There has been a steady downtrend in yield volatility with each move the Fed has made along the spectrum towards more explicit policy guidance. Linking policy to a volatile or unreliable economic data series may not achieve the desired end.</p></td></tr>
</table>
        </div>
    </body>
</html>

Original issue reported on code.google.com by parra.ca...@gmail.com on 12 Oct 2012 at 4:02

GoogleCodeExporter commented 8 years ago

Original comment by eclecticgeek on 24 May 2013 at 3:00