I am creating an HTML table and I have problem with margins as you can see in the following image: http://i.stack.imgur.com/N5K9t.jpg How can I remove those left and top margins?
I used TCPDF before and tried hard to know it
you can see in /config/ folder /tcpdf_config.php/ file
you should looking up for
/**
* header margin
*/
define ('PDF_MARGIN_HEADER', 5);
/**
* footer margin
*/
define ('PDF_MARGIN_FOOTER', 10);
/**
* top margin
*/
define ('PDF_MARGIN_TOP', 27);
/**
* bottom margin
*/
define ('PDF_MARGIN_BOTTOM', 25);
/**
* left margin
*/
define ('PDF_MARGIN_LEFT', 15);
/**
* right margin
*/
define ('PDF_MARGIN_RIGHT', 15);
For the interested, just do as follows and it will work like a charm:
$pdf->SetMargins(0, 0, 0);
$pdf->SetHeaderMargin(0);
$pdf->SetFooterMargin(0);
I use a empty table to set margin
<your top table>
<table border="0">
<tr style="line-height: 40%;" >
<td></td>
</tr>
</table>
<your second table>
Enjoy it