Improved alignment handling
Fixed a bug for right aligning elements with top right reference point.
This commit is contained in:
parent
553da0a62a
commit
58d7312d9e
1 changed files with 8 additions and 0 deletions
|
@ -204,6 +204,8 @@ abstract class customcert_element_base {
|
||||||
if ($x < 0) {
|
if ($x < 0) {
|
||||||
$x = 0;
|
$x = 0;
|
||||||
$w = $this->element->posx;
|
$w = $this->element->posx;
|
||||||
|
} else {
|
||||||
|
$w = $actualwidth;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CUSTOMCERT_REF_POINT_TOPCENTER:
|
case CUSTOMCERT_REF_POINT_TOPCENTER:
|
||||||
|
@ -211,10 +213,16 @@ abstract class customcert_element_base {
|
||||||
if ($x < 0) {
|
if ($x < 0) {
|
||||||
$x = 0;
|
$x = 0;
|
||||||
$w = $this->element->posx * 2;
|
$w = $this->element->posx * 2;
|
||||||
|
} else {
|
||||||
|
$w = $actualwidth;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($w) {
|
||||||
|
$w += 0.0001;
|
||||||
|
}
|
||||||
|
$pdf->setCellPaddings(0, 0, 0, 0);
|
||||||
$pdf->writeHTMLCell($w, 0, $x, $y, $content, 0, 0, false, true, $align);
|
$pdf->writeHTMLCell($w, 0, $x, $y, $content, 0, 0, false, true, $align);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue