lib/FPDF/src/fpdf.php 1 location
|
@@ 626-631 (lines=6) @@
|
623 |
|
{
|
624 |
|
if(!isset($this->CurrentFont))
|
625 |
|
$this->Error('No font has been set');
|
626 |
|
if($align=='R')
|
627 |
|
$dx = $w-$this->cMargin-$this->GetStringWidth($txt);
|
628 |
|
elseif($align=='C')
|
629 |
|
$dx = ($w-$this->GetStringWidth($txt))/2;
|
630 |
|
else
|
631 |
|
$dx = $this->cMargin;
|
632 |
|
if($this->ColorFlag)
|
633 |
|
$s .= 'q '.$this->TextColor.' ';
|
634 |
|
$s .= sprintf('BT %.2F %.2F Td (%s) Tj ET',($this->x+$dx)*$k,($this->h-($this->y+.5*$h+.3*$this->FontSize))*$k,$this->_escape($txt));
|
ufpdf/ufpdf.php 1 location
|
@@ 136-141 (lines=6) @@
|
133 |
|
if($txt!='')
|
134 |
|
{
|
135 |
|
$width = $this->GetStringWidth($txt);
|
136 |
|
if($align=='R')
|
137 |
|
$dx=$w-$this->cMargin-$width;
|
138 |
|
elseif($align=='C')
|
139 |
|
$dx=($w-$width)/2;
|
140 |
|
else
|
141 |
|
$dx=$this->cMargin;
|
142 |
|
if($this->ColorFlag)
|
143 |
|
$s.='q '.$this->TextColor.' ';
|
144 |
|
$txtstring=$this->_escapetext($txt);
|