19 require_once(BASE.
"wcmf/3rdparty/fpdf/fpdi.php");
20 require_once(BASE.
"wcmf/lib/util/class.Message.php");
29 class PDF extends FPDI
40 $this->useTemplate($this->tpl);
47 $this->_pageStarted =
true;
48 $this->_pageEnded =
false;
55 $this->_pageEnded =
true;
56 $this->_pageStarted =
false;
80 $this->SetY($units+$this->GetY());
88 $this->SetX($units+$this->GetX());
99 $lines = split(
"\n", $text);
100 foreach ($lines as $line)
101 $nbLines += $this->
NbLines($width, $line);
117 if($this->GetY()+$h>$this->PageBreakTrigger)
119 $this->AddPage($this->CurOrientation);
131 $cw=&$this->CurrentFont[
'cw'];
133 $w=$this->w-$this->rMargin-$this->x;
134 $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
135 $s=str_replace(
"\r",
'',$txt);
137 if($nb>0 and $s[$nb-1]==
"\n")
numberOfLines($width, $text)