Merge pull request #5387 from frederic34/patch-8

FIX Using parm instead of this in function pdfGetHeightForHtmlContent
This commit is contained in:
Laurent Destailleur 2016-06-23 20:22:17 +02:00 committed by GitHub
commit 05cbf37aca

View File

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