FIX private property can't be read when building pdf
This commit is contained in:
parent
80ac99e9b1
commit
74a9bbbf38
@ -319,14 +319,16 @@ function pdfGetHeightForHtmlContent(&$pdf, $htmlcontent)
|
||||
{
|
||||
for ($page=$start_page; $page <= $end_page; ++$page) {
|
||||
$pdf->setPage($page);
|
||||
$tmpm=$pdf->getMargins();
|
||||
$tMargin = $tmpm['top'];
|
||||
if ($page == $start_page) {
|
||||
// first page
|
||||
$height = $pdf->h - $start_y - $pdf->bMargin;
|
||||
$height = $pdf->getPageHeight() - $start_y - $pdf->getBreakMargin();
|
||||
} elseif ($page == $end_page) {
|
||||
// last page
|
||||
$height = $end_y - $pdf->tMargin;
|
||||
$height = $end_y - $tMargin;
|
||||
} else {
|
||||
$height = $pdf->h - $pdf->tMargin - $pdf->bMargin;
|
||||
$height = $pdf->getPageHeight() - $tMargin - $pdf->getBreakMargin();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -949,7 +951,7 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass
|
||||
if ($line) // Free text
|
||||
{
|
||||
//$line="eee<br>\nfd<strong>sf</strong>sdf<br>\nghfghg<br>";
|
||||
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) // by default
|
||||
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
|
||||
{
|
||||
$width=20000; $align='L'; // By default, ask a manual break: We use a large value 20000, to not have automatic wrap. This make user understand, he need to add CR on its text.
|
||||
if (! empty($conf->global->MAIN_USE_AUTOWRAP_ON_FREETEXT)) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user