32require_once NOALYSS_INCLUDE.
'/tfpdf/tfpdf.php';
70 public function __construct ( $orientation =
'P', $unit =
'mm', $format =
'A4')
74 parent::__construct($orientation, $unit, $format);
75 $this->AddFont(
'DejaVu',
'',
'DejaVuSans.ttf',
true);
76 $this->AddFont(
'DejaVu',
'I',
'DejaVuSans-Oblique.ttf',
true);
77 $this->AddFont(
'DejaVu',
'B',
'DejaVuSans-Bold.ttf',
true);
78 $this->AddFont(
'DejaVu',
'BI',
'DejaVuSans-BoldOblique.ttf',
true);
79 $this->AddFont(
'DejaVuCond',
'',
'DejaVuSansCondensed.ttf',
true);
80 $this->AddFont(
'DejaVuCond',
'B',
'DejaVuSansCondensed-Bold.ttf',
true);
81 $this->AddFont(
'DejaVuCond',
'I',
'DejaVuSansCondensed-Oblique.ttf',
true);
82 $this->AddFont(
'DejaVuCond',
'BI',
'DejaVuSansCondensed-BoldOblique.ttf',
true);
90 return $this->lMargin;
94 return $this->bMargin;
99 return $this->tMargin;
103 return $this->rMargin;
107 return $this->DefOrientation;
115 return $this->DefPageSize;
125 if ( $this->GetStringWidth($p_text) <= $p_colSize)
return 1;
127 $aWords=explode(
' ',$p_text);
128 $nb_words=count($aWords);
131 for (
$i=0;
$i < $nb_words;
$i++){
139 if ( $this->GetStringWidth(
$string) >= $p_colSize) {
159 $size=count($this->cells);
162 if ($this->cells[
$i]->
type ==
'M' )
170 $sizetext=$this->GetStringWidth($this->cells[
$i]->text);
179 if (
$height >= $this->
h)
return false;
181 if ( $y +
$height > ($this->
h - $this->bMargin -7 ))
219 $size=count($this->cells);
221 if (
$size == 0 )
return;
240 $tmp=$this->GetY()-$y_m;
241 if (
$tmp > $this->bigger) $this->bigger=
$tmp;
242 $this->SetXY($x_m,$y_m);
247 parent::Cell(
$a->width,
261 $this->cells=array();
265 $size=count($this->cells);
266 $this->cells[
$size]=$Ce;
286 if ( $this->bigger==0)
289 parent::Ln($this->bigger);
304 $this->SetFillColor(239, 239, 255);
307 $this->SetFillColor(255, 255, 255);
noalyss_str_replace($search, $replace, $string)
h( $row[ 'oa_description'])
foreach($array as $idx=> $m) $w
A Cellule is a cell to print.
__construct($w, $h, $txt, $border, $ln, $align, $fill, $link, $type)
API for creating PDF, unicode, based on tfpdf.
line_new($p_step=null)
Print all the cell stored and call Ln (new line)
is_fill($p_step)
If the step is even then return 1 and set the backgroup color to blue , otherwise returns 0,...
check_page_add()
Check if a page must be added due a MultiCell.
LongLine($w, $h, $txt, $border=0, $align='', $fill=false)
write_cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='')
count_nb_row($p_text, $p_colSize)
Count the number of rows a p_text will take for a multicell.
print_row()
print the current array of cell and reset it , if different colors are set on the same row you have t...
__construct( $orientation='P', $unit='mm', $format='A4')
if(count($array)==0) $size