32require_once NOALYSS_INCLUDE.
'/tfpdf/tfpdf.php';
69 public function __construct ( $orientation =
'P', $unit =
'mm', $format =
'A4')
73 parent::__construct($orientation, $unit, $format);
74 $this->AddFont(
'DejaVu',
'',
'DejaVuSans.ttf',
true);
75 $this->AddFont(
'DejaVu',
'I',
'DejaVuSans-Oblique.ttf',
true);
76 $this->AddFont(
'DejaVu',
'B',
'DejaVuSans-Bold.ttf',
true);
77 $this->AddFont(
'DejaVu',
'BI',
'DejaVuSans-BoldOblique.ttf',
true);
78 $this->AddFont(
'DejaVuCond',
'',
'DejaVuSansCondensed.ttf',
true);
79 $this->AddFont(
'DejaVuCond',
'B',
'DejaVuSansCondensed-Bold.ttf',
true);
80 $this->AddFont(
'DejaVuCond',
'I',
'DejaVuSansCondensed-Oblique.ttf',
true);
81 $this->AddFont(
'DejaVuCond',
'BI',
'DejaVuSansCondensed-BoldOblique.ttf',
true);
89 return $this->lMargin;
93 return $this->bMargin;
98 return $this->tMargin;
102 return $this->rMargin;
106 return $this->DefOrientation;
114 return $this->DefPageSize;
124 if ( $this->GetStringWidth($p_text) <= $p_colSize)
return 1;
126 $aWords=explode(
' ',$p_text);
127 $nb_words=count($aWords);
130 for (
$i=0;
$i < $nb_words;
$i++){
138 if ( $this->GetStringWidth(
$string) >= $p_colSize) {
158 $size=count($this->cells);
161 if ($this->cells[
$i]->
type ==
'M' )
169 $sizetext=$this->GetStringWidth($this->cells[
$i]->text);
175 $height=$this->cells[
$i]->height*
$nb_row;
178 if ($height >= $this->
h)
return false;
180 if ( $y + $height > ($this->
h - $this->bMargin -7 ))
218 $size=count($this->cells);
220 if (
$size == 0 )
return;
239 $tmp=$this->GetY()-$y_m;
240 if (
$tmp > $this->bigger) $this->bigger=
$tmp;
241 $this->SetXY($x_m,$y_m);
246 parent::Cell(
$a->width,
260 $this->cells=array();
264 $size=count($this->cells);
265 $this->cells[
$size]=$Ce;
285 if ( $this->bigger==0)
288 parent::Ln($this->bigger);
303 $this->SetFillColor(239, 239, 255);
306 $this->SetFillColor(255, 255, 255);
noalyss_str_replace($search, $replace, $string)
return false Description text align
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