25

I am creating pdf using TCPDF in php,I need to include my data into pdf without bottom margines,The data will be included at the end of the page.

$pdf->SetLeftMargin(14);
$pdf->SetTopMargin(6);
$pdf->SetFont($fontname, '', '9');
$pdf->setPrintHeader(false);
$pdf->SetFooterMargin(0);
$pdf->setPrintFooter(false);

$pdf->AddPage();
$pdf->writeHTML($html, true, 0, true, 0);

I am using the above code.Anyone know how to remove margin space from pdf using tcpdf?

Shijin TR
  • 7,516
  • 10
  • 55
  • 122

2 Answers2

77

Margin that you are seeing is due to pageBreak margin

Add this $pdf->SetAutoPageBreak(TRUE, 0); definitely remove margin from bottom

mukund
  • 2,253
  • 1
  • 18
  • 31
  • This is what I was looking for. It removes the bottom space and right space that setMargin(0,0,0,false); doesn't remove. – nwolybug Sep 28 '17 at 16:49
3

try this

 $pdf->setCellPaddings(0,0,0,0);

read this... you will get some idea....http://www.tcpdf.org/examples/example_022.phps

thumber nirmal
  • 1,639
  • 3
  • 16
  • 27