Project

General

Profile

Help Pdf_Table ignores SetAutoPageBreak bottom margin value

Added by Adriaan Nel over 9 years ago

Hi,

I'm creating a pdf containing a table that spans multiple pages. Everything works correctly, except that after the first page, the bottom margin specified in SetAutoPageBreak(true,56.95); is ignored...

Any help will be greatly appreciated.

Thanks

Code:

@$pdf->Open();
$pdf->SetAutoPageBreak(true, 56.95);

$headers = array(
array('TEXT' => 'Code')
, array('TEXT' => 'Description')
, array('TEXT' => 'Unit Price', 'TEXT_ALIGN' => 'R')
, array('TEXT' => 'Qty', 'TEXT_ALIGN' => 'C')
, array('TEXT' => 'TOTAL', 'TEXT_ALIGN' => 'R')
);

$oTable = new Pdf_Table( $pdf);
$oTable->addHeader($headers);
for($i = 1; $i < 100; $i++) {
$oTable->addRow($headers);
}

$oTable->drawBorder();
$oTable->close();@


Replies (3)

RE: Help Pdf_Table ignores SetAutoPageBreak bottom margin value - Added by Andrei Bintintan over 9 years ago

Make sure your header function respects the top margin. Try this by disabling it first.

    (1-3/3)