Update pdf.lib.php

This commit is contained in:
Frédéric FRANCE 2016-06-23 10:48:52 +02:00 committed by GitHub
parent 7f0ed90652
commit 3690d11ca2

View File

@ -318,15 +318,15 @@ function pdfGetHeightForHtmlContent(&$pdf, $htmlcontent)
else else
{ {
for ($page=$start_page; $page <= $end_page; ++$page) { for ($page=$start_page; $page <= $end_page; ++$page) {
$this->setPage($page); $pdf->setPage($page);
if ($page == $start_page) { if ($page == $start_page) {
// first page // first page
$height = $this->h - $start_y - $this->bMargin; $height = $pdf->h - $start_y - $pdf->bMargin;
} elseif ($page == $end_page) { } elseif ($page == $end_page) {
// last page // last page
$height = $end_y - $this->tMargin; $height = $end_y - $pdf->tMargin;
} else { } else {
$height = $this->h - $this->tMargin - $this->bMargin; $height = $pdf->h - $pdf->tMargin - $pdf->bMargin;
} }
} }
} }