Jeckky / dompdf

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

color problem in the bottom of pdf using dompdf #500

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

on generating pdf. In the generated pdf gray color show in the bottom.

I want not to show that color instead of this white color show.
i am using dompdf 3 beta.

can anyone help me

In the controller of codeigniter: 

include(FCPATH."public/dompdf/dompdf_config.inc.php");
            $_GET[base_path];
            $html = utf8_decode($this->load->view('bill', $data, true));

            $dompdf = new DOMPDF(); 
            $dompdf->load_html($html);
            $dompdf->set_paper("A4");
            $dompdf->render();
            $dompdf->stream("$update_billing_number.pdf");

and the file of html is that

<html> 
<head>
    <LINK href="styles/styles.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="bill-generate">
    <div class="first-bill-table">
        <table border="1px" cellpadding="0" cellspacing="0"> 
            <tr>
                <td width="267px">
                    <img src="<?php echo base_url() ?>images/logo.png" style:"width:200px;height:49;border:none"/>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                        "ViaVIP España, S.L.<br />
                        Pz. Catalunya, 22<br />
                        08830 Sant Boi de Llobregat (Barcelona)<br />
                        CIF B-85801009<br />
                        <a href="mailto:contacto@todoley.net">contacto@todoley.net</a>
                </td>
                <td width="350px" style="text-align:right;">
                    <ul>
                        <li>
                            <h3>Billing data</h3>
                        </li>
                        <li>
                            <h3><?php echo $social_name ?></h3>
                        </li>
                        <li>
                            <h3><?php echo $address ?></h3>
                        </li>
                        <li>
                            <h3><?php echo $postal_code.", ".$locality."(".$province.")" ?></h3>
                        </li>
                        <li>
                            <h3><?php echo $identification_id ?></h3>
                        </li>
                    </ul>
                </td>
            </tr>
            <tr>
                <td >

                </td>
                <td >
                </td>
            </tr>
        </table>
        <h3>Número de factura: <?php echo $billing_number ?></h3>
        <h3>Data: <?php echo date("Y/m/d") ?></h3>
        <table border="1px" cellpadding="0" cellspacing="0" style="margin-top:15px;">
            <tr>
                <td width="300px">
                    <h2><bold>"CONCEPTO"</bold></h2>
                </td>
                <td width="105px">
                    <h3>Cantidad</h3>
                </td>
                <td width="200px">
                    <h3>Importe(Without IVA)</h3>
                </td>
            </tr>
            <tr>
                <td width="300px" style="padding-bottom:250px;">
                    <p>"Servicios de marketing online Todoley.net"</p>
                </td>
                <td width="100px" style="padding-bottom:250px;">
                    <p>1,00</p>
                </td>
                <td width="200px" style="padding-bottom:250px;">
                    <p><?php echo ($user_data[0]->total_price-(($user_data[0]->total_price)*18)/100); ?></p>
                </td>
            </tr>
        </table>

         <table border="1px" cellpadding="0" cellspacing="0" style="margin-top:20px;padding-bottom:-330px;margin-bottom:660px;">
            <tr>
                <td width="180px">
                    <h3>Base imponible</h3>
                </td>
                <td width="100px">
                    <h3>IVA</h3>
                </td>
                <td width="25px">

                </td>
                <td width="25px">

                </td>
                <td width="250px">
                    <h3>Total factura</h3>
                </td>
            </tr>
            <tr>
                <td width="150px">
                    <p><?php echo ($user_data[0]->total_price-(($user_data[0]->total_price)*18)/100); ?></p>
                </td>
                <td width="100px">
                    <p><?php echo (($user_data[0]->total_price)*18)/100; ?></p>
                </td>
                <td width="26px">

                </td>
                <td width="26px">

                </td>
                <td width="250px">
                    <p style="font-style:bold;font-size:16px;""><strong><?php echo $user_data[0]->total_price ?></strong></p>
                </td>
            </tr>
        </table>
    </div>
    <div class="clear"></div>
</div>
<div class="clear"></div>
</body>
</html>

Original issue reported on code.google.com by wasim.k...@jotixtech.com on 8 Jun 2012 at 11:09

Attachments:

GoogleCodeExporter commented 9 years ago
Before we can determine what's wrong it would help to have two things:

1) a sample HTML document (we can't know what is filled in by your PHP code)
2) the stylesheet

Also, you may want to validate your output. You have some HTML syntax error in 
the attached PHP file:
-you used a colon instead of a quote when defining your style attribute on line 
11
-you tried to bold some text using <bold>...</bold> instead of ... on line 57
-you have a double-quote ending an attribute value on line 111

Original comment by eclecticgeek on 9 Jun 2012 at 2:26

GoogleCodeExporter commented 9 years ago

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