152 public function write_file(
$object, $outputlangs, $srctemplatepath =
'', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
155 global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblines;
157 dol_syslog(
"write_file outputlangs->defaultlang=".(is_object($outputlangs) ? $outputlangs->defaultlang :
'null'));
159 if (!is_object($outputlangs)) {
160 $outputlangs = $langs;
164 $outputlangs->charset_output =
'ISO-8859-1';
168 $outputlangs->loadLangs(array(
"main",
"bills",
"products",
"dict",
"companies"));
171 global $outputlangsbis;
172 $outputlangsbis =
new Translate(
'', $conf);
174 $outputlangsbis->loadLangs(array(
"main",
"bills",
"products",
"dict",
"companies"));
177 $nblines = (is_array(
$object->lines) ? count(
$object->lines) : 0);
184 if ($conf->asset->dir_output.
'/asset') {
189 $dir = $conf->asset->dir_output.
'/asset';
190 $file = $dir.
"/SPECIMEN.pdf";
193 $dir = $conf->asset->dir_output.
'/asset/'.$objectref;
194 $file = $dir.
"/".$objectref.
".pdf";
196 if (!file_exists($dir)) {
198 $this->error = $langs->transnoentities(
"ErrorCanNotCreateDir", $dir);
203 if (file_exists($dir)) {
205 if (!is_object($hookmanager)) {
206 include_once DOL_DOCUMENT_ROOT.
'/core/class/hookmanager.class.php';
209 $hookmanager->initHooks(array(
'pdfgeneration'));
210 $parameters = array(
'file' => $file,
'object' =>
$object,
'outputlangs' => $outputlangs);
212 $reshook = $hookmanager->executeHooks(
'beforePDFCreation', $parameters,
$object, $action);
215 $nblines = (is_array(
$object->lines) ? count(
$object->lines) : 0);
220 $pdf->SetAutoPageBreak(1, 0);
222 $heightforinfotot = 50;
223 $heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5);
224 $heightforfooter = $this->marge_basse + (!
getDolGlobalString(
'MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS') ? 12 : 22);
226 if (class_exists(
'TCPDF')) {
227 $pdf->setPrintHeader(
false);
228 $pdf->setPrintFooter(
false);
234 $logodir = $conf->mycompany->dir_output;
235 if (!empty($conf->mycompany->multidir_output[
$object->entity])) {
236 $logodir = $conf->mycompany->multidir_output[
$object->entity];
238 $pagecount = $pdf->setSourceFile($logodir .
'/' .
getDolGlobalString(
'MAIN_ADD_PDF_BACKGROUND'));
239 $tplidx = $pdf->importPage(1);
244 $pdf->SetDrawColor(128, 128, 128);
246 $pdf->SetTitle($outputlangs->convToOutputCharset(
$object->ref));
247 $pdf->SetSubject($outputlangs->transnoentities(
"PdfTitle"));
248 $pdf->SetCreator(
"Dolibarr ".DOL_VERSION);
249 $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
250 $pdf->SetKeyWords($outputlangs->convToOutputCharset(
$object->ref).
" ".$outputlangs->transnoentities(
"PdfTitle").
" ".$outputlangs->convToOutputCharset(
$object->thirdparty->name));
252 $pdf->SetCompression(
false);
256 $cert = empty($user->conf->CERTIFICATE_CRT) ?
'' : $user->conf->CERTIFICATE_CRT;
264 'Name' => $this->emetteur->name,
265 'Location' =>
getCountry($this->emetteur->country_code, 0),
267 'ContactInfo' => $this->emetteur->email
269 $pdf->setSignature($cert, $cert, $this->emetteur->name,
'', 2, $info);
273 $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite);
277 if (!empty($tplidx)) {
278 $pdf->useTemplate($tplidx);
282 $top_shift = $this->
_pagehead($pdf,
$object, 1, $outputlangs, $outputlangsbis);
283 $pdf->SetFont(
'',
'', $default_font_size - 1);
284 $pdf->MultiCell(0, 3,
'');
285 $pdf->SetTextColor(0, 0, 0);
287 $tab_top = 90 + $top_shift;
288 $tab_top_newpage = (!
getDolGlobalInt(
'MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
289 $tab_height = 130 - $top_shift;
290 $tab_height_newpage = 150;
292 $tab_height_newpage -= $top_shift;
295 $nexY = $tab_top - 1;
298 $notetoshow = empty(
$object->note_public) ?
'' :
$object->note_public;
300 $extranote = $this->getExtrafieldsInHtml(
$object, $outputlangs);
301 if (!empty($extranote)) {
305 $pagenb = $pdf->getPage();
309 $tab_width = $this->page_largeur - $this->marge_gauche - $this->marge_droite;
310 $pageposbeforenote = $pagenb;
317 $pdf->startTransaction();
319 $pdf->SetFont(
'',
'', $default_font_size - 1);
320 $pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top,
dol_htmlentitiesbr($notetoshow), 0, 1);
322 $pageposafternote = $pdf->getPage();
323 $posyafter = $pdf->GetY();
325 if ($pageposafternote > $pageposbeforenote) {
326 $pdf->rollbackTransaction(
true);
329 while ($pagenb < $pageposafternote) {
332 if (!empty($tplidx)) {
333 $pdf->useTemplate($tplidx);
339 $pdf->setTopMargin($tab_top_newpage);
341 $pdf->setPageOrientation(
'', 1, $heightforfooter + $heightforfreetext);
345 $pdf->setPage($pageposbeforenote);
346 $pdf->setPageOrientation(
'', 1, $heightforfooter + $heightforfreetext);
347 $pdf->SetFont(
'',
'', $default_font_size - 1);
348 $pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top,
dol_htmlentitiesbr($notetoshow), 0, 1);
349 $pageposafternote = $pdf->getPage();
351 $posyafter = $pdf->GetY();
353 if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) {
354 $pdf->AddPage(
'',
'',
true);
357 $pdf->setPage($pageposafternote);
358 $pdf->setTopMargin($tab_top_newpage);
360 $pdf->setPageOrientation(
'', 1, $heightforfooter + $heightforfreetext);
366 $i = $pageposbeforenote;
367 while ($i < $pageposafternote) {
371 $pdf->SetDrawColor(128, 128, 128);
373 if ($i > $pageposbeforenote) {
374 $height_note = $this->page_hauteur - ($tab_top_newpage + $heightforfooter);
375 $pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1);
377 $height_note = $this->page_hauteur - ($tab_top + $heightforfooter);
378 $pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1);
382 $pdf->setPageOrientation(
'', 1, 0);
389 $pdf->setPage($pageposafternote);
390 if (!empty($tplidx)) {
391 $pdf->useTemplate($tplidx);
396 $height_note = $posyafter - $tab_top_newpage;
397 $pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1);
399 $pdf->commitTransaction();
400 $posyafter = $pdf->GetY();
401 $height_note = $posyafter - $tab_top;
402 $pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1);
405 if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) {
407 $pdf->AddPage(
'',
'',
true);
410 $pdf->setPage($pageposafternote);
411 if (!empty($tplidx)) {
412 $pdf->useTemplate($tplidx);
418 $posyafter = $tab_top_newpage;
422 $tab_height = $tab_height - $height_note;
423 $tab_top = $posyafter + 6;
432 $pdf->startTransaction();
433 $this->
pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop);
434 $pdf->rollbackTransaction(
true);
436 $nexY = $tab_top + $this->tabTitleHeight;
439 $pageposbeforeprintlines = $pdf->getPage();
440 $pagenb = $pageposbeforeprintlines;
441 for ($i = 0; $i < $nblines; $i++) {
443 $pdf->SetFont(
'',
'', $default_font_size - 1);
444 $pdf->SetTextColor(0, 0, 0);
446 $pdf->setTopMargin($tab_top_newpage);
447 $pdf->setPageOrientation(
'', 1, $heightforfooter + $heightforfreetext + $heightforinfotot);
448 $pageposbefore = $pdf->getPage();
450 $showpricebeforepagebreak = 1;
455 $pdf->startTransaction();
458 $pageposafter = $pdf->getPage();
460 if ($pageposafter > $pageposbefore) {
461 $pdf->rollbackTransaction(
true);
462 $pdf->setPageOrientation(
'', 1, $heightforfooter);
466 $pageposafter = $pdf->getPage();
467 $posyafter = $pdf->GetY();
469 if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) {
470 if ($i == ($nblines - 1)) {
471 $pdf->AddPage(
'',
'',
true);
472 if (!empty($tplidx)) {
473 $pdf->useTemplate($tplidx);
475 $pdf->setPage($pageposafter + 1);
481 $showpricebeforepagebreak = 1;
483 $showpricebeforepagebreak = 0;
487 $pdf->commitTransaction();
491 $nexY = $pdf->GetY();
492 $pageposafter = $pdf->getPage();
493 $pdf->setPage($pageposbefore);
494 $pdf->setTopMargin($this->marge_haute);
495 $pdf->setPageOrientation(
'', 1, 0);
498 if ($pageposafter > $pageposbefore && empty($showpricebeforepagebreak)) {
499 $pdf->setPage($pageposafter);
500 $curY = $tab_top_newpage;
503 $pdf->SetFont(
'',
'', $default_font_size - 1);
510 $nexY = max($pdf->GetY(), $nexY);
514 if (!empty(
$object->lines[$i]->array_options)) {
515 foreach (
$object->lines[$i]->array_options as $extrafieldColKey => $extrafieldValue) {
519 $nexY = max($pdf->GetY(), $nexY);
531 'outputlangs' => $outputlangs,
532 'hidedetails' => $hidedetails
534 $reshook = $hookmanager->executeHooks(
'printPDFline', $parameters, $this);
539 $prev_progress =
$object->lines[$i]->get_prev_progress(
$object->id);
540 if ($prev_progress > 0 && !empty(
$object->lines[$i]->situation_percent)) {
541 if (isModEnabled(
"multicurrency") &&
$object->multicurrency_tx != 1) {
542 $tvaligne = $sign *
$object->lines[$i]->multicurrency_total_tva * (
$object->lines[$i]->situation_percent - $prev_progress) /
$object->lines[$i]->situation_percent;
544 $tvaligne = $sign *
$object->lines[$i]->total_tva * (
$object->lines[$i]->situation_percent - $prev_progress) /
$object->lines[$i]->situation_percent;
547 if (isModEnabled(
"multicurrency") &&
$object->multicurrency_tx != 1) {
548 $tvaligne = $sign *
$object->lines[$i]->multicurrency_total_tva;
550 $tvaligne = $sign *
$object->lines[$i]->total_tva;
554 $localtax1ligne =
$object->lines[$i]->total_localtax1;
555 $localtax2ligne =
$object->lines[$i]->total_localtax2;
556 $localtax1_rate =
$object->lines[$i]->localtax1_tx;
557 $localtax2_rate =
$object->lines[$i]->localtax2_tx;
558 $localtax1_type =
$object->lines[$i]->localtax1_type;
559 $localtax2_type =
$object->lines[$i]->localtax2_type;
572 $vatrate = (string)
$object->lines[$i]->tva_tx;
575 if ((!isset($localtax1_type) || $localtax1_type ==
'' || !isset($localtax2_type) || $localtax2_type ==
'')
576 && (!empty($localtax1_rate) || !empty($localtax2_rate))) {
578 $localtax1_type = isset($localtaxtmp_array[0]) ? $localtaxtmp_array[0] :
'';
579 $localtax2_type = isset($localtaxtmp_array[2]) ? $localtaxtmp_array[2] :
'';
583 if ($localtax1_type && $localtax1ligne != 0) {
584 if (empty($this->localtax1[$localtax1_type][$localtax1_rate])) {
585 $this->localtax1[$localtax1_type][$localtax1_rate] = $localtax1ligne;
587 $this->localtax1[$localtax1_type][$localtax1_rate] += $localtax1ligne;
590 if ($localtax2_type && $localtax2ligne != 0) {
591 if (empty($this->localtax2[$localtax2_type][$localtax2_rate])) {
592 $this->localtax2[$localtax2_type][$localtax2_rate] = $localtax2ligne;
594 $this->localtax2[$localtax2_type][$localtax2_rate] += $localtax2ligne;
598 if ((
$object->lines[$i]->info_bits & 0x01) == 0x01) {
601 if (!isset($this->tva[$vatrate])) {
602 $this->tva[$vatrate] = 0;
604 $this->tva[$vatrate] += $tvaligne;
606 $nexY = max($nexY, $posYAfterImage);
610 $pdf->setPage($pageposafter);
611 $pdf->SetLineStyle(array(
'dash' =>
'1,1',
'color' => array(80, 80, 80)));
613 $pdf->line($this->marge_gauche, $nexY, $this->page_largeur - $this->marge_droite, $nexY);
614 $pdf->SetLineStyle(array(
'dash' => 0));
618 while ($pagenb < $pageposafter) {
619 $pdf->setPage($pagenb);
620 if ($pagenb == $pageposbeforeprintlines) {
621 $this->
_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, $hidetop, 1,
$object->multicurrency_code, $outputlangsbis);
623 $this->
_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1,
$object->multicurrency_code, $outputlangsbis);
627 $pdf->setPage($pagenb);
628 $pdf->setPageOrientation(
'', 1, 0);
634 if (isset(
$object->lines[$i + 1]->pagebreak) &&
$object->lines[$i + 1]->pagebreak) {
635 if ($pagenb == $pageposafter) {
636 $this->
_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, $hidetop, 1,
$object->multicurrency_code, $outputlangsbis);
638 $this->
_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1,
$object->multicurrency_code, $outputlangsbis);
643 if (!empty($tplidx)) {
644 $pdf->useTemplate($tplidx);
654 if ($pagenb == $pageposbeforeprintlines) {
655 $this->
_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, $hidetop, 0,
$object->multicurrency_code, $outputlangsbis);
656 $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
658 $this->
_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0,
$object->multicurrency_code, $outputlangsbis);
659 $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
678 if (method_exists($pdf,
'AliasNbPages')) {
679 $pdf->AliasNbPages();
684 $pdf->Output($file,
'F');
687 $hookmanager->initHooks(array(
'pdfgeneration'));
688 $parameters = array(
'file' => $file,
'object' =>
$object,
'outputlangs' => $outputlangs);
690 $reshook = $hookmanager->executeHooks(
'afterPDFCreation', $parameters, $this, $action);
692 $this->error = $hookmanager->error;
693 $this->errors = $hookmanager->errors;
698 $this->result = array(
'fullpath' => $file);
702 $this->error = $langs->transnoentities(
"ErrorCanNotCreateDir", $dir);
706 $this->error = $langs->transnoentities(
"ErrorConstantNotDefined",
"ASSET_OUTPUTDIR");
797 protected function _pagehead(&$pdf,
$object, $showaddress, $outputlangs, $outputlangsbis =
null)
799 global $conf, $langs;
802 $outputlangs->loadLangs(array(
"main",
"bills",
"propal",
"companies"));
810 pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur,
'mm', $conf->global->FACTURE_DRAFT_WATERMARK);
813 $pdf->SetTextColor(0, 0, 60);
814 $pdf->SetFont(
'',
'B', $default_font_size + 3);
818 $posy = $this->marge_haute;
819 $posx = $this->page_largeur - $this->marge_droite - $w;
821 $pdf->SetXY($this->marge_gauche, $posy);
825 if ($this->emetteur->logo) {
826 $logodir = $conf->mycompany->dir_output;
827 if (!empty($conf->mycompany->multidir_output[
$object->entity])) {
828 $logodir = $conf->mycompany->multidir_output[
$object->entity];
831 $logo = $logodir.
'/logos/thumbs/'.$this->emetteur->logo_small;
833 $logo = $logodir.
'/logos/'.$this->emetteur->logo;
835 if (is_readable($logo)) {
837 $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height);
839 $pdf->SetTextColor(200, 0, 0);
840 $pdf->SetFont(
'',
'B', $default_font_size - 2);
841 $pdf->MultiCell($w, 3, $outputlangs->transnoentities(
"ErrorLogoFileNotFound", $logo), 0,
'L');
842 $pdf->MultiCell($w, 3, $outputlangs->transnoentities(
"ErrorGoToGlobalSetup"), 0,
'L');
845 $text = $this->emetteur->name;
846 $pdf->MultiCell($w, 4, $outputlangs->convToOutputCharset($text), 0,
'L');
850 $pdf->SetFont(
'',
'B', $default_font_size + 3);
851 $pdf->SetXY($posx, $posy);
852 $pdf->SetTextColor(0, 0, 60);
853 $title = $outputlangs->transnoentities(
"PdfTitle");
856 $title .= $outputlangsbis->transnoentities(
"PdfTitle");
858 $pdf->MultiCell($w, 3, $title,
'',
'R');
860 $pdf->SetFont(
'',
'B', $default_font_size);
863 $pdf->SetXY($posx, $posy);
864 $pdf->SetTextColor(0, 0, 60);
865 $textref = $outputlangs->transnoentities(
"Ref").
" : ".$outputlangs->convToOutputCharset(
$object->ref);
866 if (
$object->status == $object::STATUS_DRAFT) {
867 $pdf->SetTextColor(128, 0, 0);
868 $textref .=
' - '.$outputlangs->transnoentities(
"NotValidated");
870 $pdf->MultiCell($w, 4, $textref,
'',
'R');
873 $pdf->SetFont(
'',
'', $default_font_size - 2);
884 if (!empty(
$object->project->ref)) {
886 $pdf->SetXY($posx, $posy);
887 $pdf->SetTextColor(0, 0, 60);
888 $pdf->MultiCell($w, 3, $outputlangs->transnoentities(
"Project").
" : ".(empty(
$object->project->title) ?
'' :
$object->projet->title),
'',
'R');
894 if (!empty(
$object->project->ref)) {
895 $outputlangs->load(
"projects");
897 $pdf->SetXY($posx, $posy);
898 $pdf->SetTextColor(0, 0, 60);
899 $pdf->MultiCell($w, 3, $outputlangs->transnoentities(
"RefProject").
" : ".(empty(
$object->project->ref) ?
'' :
$object->project->ref),
'',
'R');
904 $pdf->SetXY($posx, $posy);
905 $pdf->SetTextColor(0, 0, 60);
907 $title = $outputlangs->transnoentities(
"Date");
909 $title .=
' - '.$outputlangsbis->transnoentities(
"Date");
911 $pdf->MultiCell($w, 3, $title.
" : ".
dol_print_date(
$object->date_acquisition,
"day",
false, $outputlangs),
'',
'R');
913 if (
$object->thirdparty->code_client) {
915 $pdf->SetXY($posx, $posy);
916 $pdf->SetTextColor(0, 0, 60);
917 $pdf->MultiCell($w, 3, $outputlangs->transnoentities(
"CustomerCode").
" : ".$outputlangs->transnoentities(
$object->thirdparty->code_client),
'',
'R');
922 $arrayidcontact =
$object->getIdContact(
'internal',
'SALESREPFOLL');
923 if (count($arrayidcontact) > 0) {
924 $usertmp =
new User($this->db);
925 $usertmp->fetch($arrayidcontact[0]);
927 $pdf->SetXY($posx, $posy);
928 $pdf->SetTextColor(0, 0, 60);
929 $pdf->MultiCell($w, 3, $outputlangs->transnoentities(
"SalesRepresentative").
" : ".$usertmp->getFullName($langs),
'',
'R');
937 $current_y = $pdf->getY();
939 if ($current_y < $pdf->getY()) {
940 $top_shift = $pdf->getY() - $current_y;
950 $posx = $this->marge_gauche;
952 $posx = $this->page_largeur - $this->marge_droite - 80;
960 $pdf->SetTextColor(0, 0, 0);
961 $pdf->SetFont(
'',
'', $default_font_size - 2);
962 $pdf->SetXY($posx, $posy - 5);
963 $pdf->MultiCell(66, 5, $outputlangs->transnoentities(
"BillFrom").
":", 0,
'L');
964 $pdf->SetXY($posx, $posy);
965 $pdf->SetFillColor(230, 230, 230);
966 $pdf->MultiCell($widthrecbox, $hautcadre,
"", 0,
'R', 1);
967 $pdf->SetTextColor(0, 0, 60);
970 $pdf->SetXY($posx + 2, $posy + 3);
971 $pdf->SetFont(
'',
'B', $default_font_size);
972 $pdf->MultiCell($widthrecbox - 2, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0,
'L');
973 $posy = $pdf->getY();
976 $pdf->SetXY($posx + 2, $posy);
977 $pdf->SetFont(
'',
'', $default_font_size - 1);
978 $pdf->MultiCell($widthrecbox - 2, 4, $carac_emetteur, 0,
'L');
982 $arrayidcontact =
$object->getIdContact(
'external',
'BILLING');
983 if (count($arrayidcontact) > 0) {
985 $result =
$object->fetch_contact($arrayidcontact[0]);
989 if (
$object->contact->socid !=
$object->thirdparty->id && (!isset($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) ||
getDolGlobalString(
'MAIN_USE_COMPANY_NAME_OF_CONTACT'))) {
990 $thirdparty =
$object->contact;
992 $thirdparty =
$object->thirdparty;
995 if (is_object($thirdparty)) {
1003 if ($this->page_largeur < 210) {
1007 $posy += $top_shift;
1008 $posx = $this->page_largeur - $this->marge_droite - $widthrecbox;
1010 $posx = $this->marge_gauche;
1014 $pdf->SetTextColor(0, 0, 0);
1015 $pdf->SetFont(
'',
'', $default_font_size - 2);
1016 $pdf->SetXY($posx + 2, $posy - 5);
1017 $pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities(
"BillTo").
":", 0,
'L');
1018 $pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
1021 $pdf->SetXY($posx + 2, $posy + 3);
1022 $pdf->SetFont(
'',
'B', $default_font_size);
1023 $pdf->MultiCell($widthrecbox, 2, $carac_client_name, 0,
'L');
1025 $posy = $pdf->getY();
1028 $pdf->SetFont(
'',
'', $default_font_size - 1);
1029 $pdf->SetXY($posx + 2, $posy);
1030 $pdf->MultiCell($widthrecbox, 4, $carac_client, 0,
'L');
1033 $pdf->SetTextColor(0, 0, 0);