30 require_once DOL_DOCUMENT_ROOT.
'/core/modules/fichinter/modules_fichinter.php';
31 require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
32 require_once DOL_DOCUMENT_ROOT.
'/core/lib/pdf.lib.php';
33 require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
34 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
60 public $update_main_doc_field;
71 public $phpmin = array(7, 0);
77 public $version =
'dolibarr';
102 public $marge_droite;
127 global $conf, $langs, $mysoc;
130 $this->
name =
'soleil';
131 $this->
description = $langs->trans(
"DocumentModelStandardPDF");
132 $this->update_main_doc_field = 1;
137 $this->page_largeur = $formatarray[
'width'];
138 $this->page_hauteur = $formatarray[
'height'];
139 $this->format = array($this->page_largeur, $this->page_hauteur);
145 $this->option_logo = 1;
146 $this->option_tva = 0;
147 $this->option_modereg = 0;
148 $this->option_condreg = 0;
149 $this->option_multilang = 1;
150 $this->option_draft_watermark = 1;
151 $this->watermark =
'';
154 $this->emetteur = $mysoc;
155 if (empty($this->emetteur->country_code)) {
156 $this->emetteur->country_code = substr($langs->defaultlang, -2);
160 $this->posxdesc = $this->marge_gauche + 1;
175 public function write_file($object, $outputlangs, $srctemplatepath =
'', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
178 global $user, $langs, $conf, $mysoc, $db, $hookmanager;
180 if (!is_object($outputlangs)) {
181 $outputlangs = $langs;
184 if (!empty($conf->global->MAIN_USE_FPDF)) {
185 $outputlangs->charset_output =
'ISO-8859-1';
189 $outputlangs->loadLangs(array(
"main",
"interventions",
"dict",
"companies"));
192 if ($object->statut == $object::STATUS_DRAFT && (!empty($conf->global->FICHINTER_DRAFT_WATERMARK))) {
193 $this->watermark = $conf->global->FICHINTER_DRAFT_WATERMARK;
196 if ($conf->ficheinter->dir_output) {
197 $object->fetch_thirdparty();
200 if ($object->specimen) {
201 $dir = $conf->ficheinter->dir_output;
202 $file = $dir.
"/SPECIMEN.pdf";
205 $dir = $conf->ficheinter->dir_output.
"/".$objectref;
206 $file = $dir.
"/".$objectref.
".pdf";
209 if (!file_exists($dir)) {
211 $this->error = $langs->transnoentities(
"ErrorCanNotCreateDir", $dir);
216 if (file_exists($dir)) {
218 if (!is_object($hookmanager)) {
219 include_once DOL_DOCUMENT_ROOT.
'/core/class/hookmanager.class.php';
223 $hookmanager->initHooks(array(
'pdfgeneration'));
224 $parameters = array(
'file'=>$file,
'object'=>$object,
'outputlangs'=>$outputlangs);
226 $reshook = $hookmanager->executeHooks(
'beforePDFCreation', $parameters, $object, $action);
228 $nblines = count($object->lines);
233 $heightforinfotot = 50;
234 $heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5);
235 $heightforfooter = $this->marge_basse + 8;
236 if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) {
237 $heightforfooter += 6;
239 $pdf->SetAutoPageBreak(1, 0);
241 if (class_exists(
'TCPDF')) {
242 $pdf->setPrintHeader(
false);
243 $pdf->setPrintFooter(
false);
247 if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) {
248 $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.
'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
249 $tplidx = $pdf->importPage(1);
254 $pdf->SetDrawColor(128, 128, 128);
256 $pdf->SetTitle($outputlangs->convToOutputCharset($object->ref));
257 $pdf->SetSubject($outputlangs->transnoentities(
"InterventionCard"));
258 $pdf->SetCreator(
"Dolibarr ".DOL_VERSION);
259 $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
260 $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref).
" ".$outputlangs->transnoentities(
"InterventionCard"));
262 $pdf->SetCompression(
false);
265 $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite);
269 if (!empty($tplidx)) {
270 $pdf->useTemplate($tplidx);
273 $this->
_pagehead($pdf, $object, 1, $outputlangs);
274 $pdf->SetFont(
'',
'', $default_font_size - 1);
275 $pdf->SetTextColor(0, 0, 0);
278 $tab_top_newpage = (!
getDolGlobalInt(
'MAIN_PDF_DONOTREPEAT_HEAD') ? 42 : 10);
280 $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
283 $notetoshow = empty($object->note_public) ?
'' : $object->note_public;
292 $pdf->SetFont(
'',
'', $default_font_size - 1);
293 $pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top,
dol_htmlentitiesbr($notetoshow), 0, 1);
294 $nexY = $pdf->GetY();
295 $height_note = $nexY - $tab_top;
298 $pdf->SetDrawColor(192, 192, 192);
299 $pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 1);
301 $tab_height = $tab_height - $height_note;
302 $tab_top = $nexY + 6;
307 $iniY = $tab_top + 7;
308 $curY = $tab_top + 7;
309 $nexY = $tab_top + 7;
311 $pdf->SetXY($this->marge_gauche, $tab_top);
312 $pdf->MultiCell(190, 5, $outputlangs->transnoentities(
"Description"), 0,
'L', 0);
313 $pdf->line($this->marge_gauche, $tab_top + 5, $this->page_largeur - $this->marge_droite, $tab_top + 5);
315 $pdf->SetFont(
'',
'', $default_font_size - 1);
317 $pdf->SetXY($this->marge_gauche, $tab_top + 5);
318 $text = $object->description;
319 if ($object->duration > 0) {
320 $totaltime =
convertSecondToTime($object->duration,
'all', $conf->global->MAIN_DURATION_OF_WORKDAY);
321 $text .= ($text ?
' - ' :
'').$langs->trans(
"Total").
": ".$totaltime;
326 $pdf->writeHTMLCell(180, 3, 10, $tab_top + 5, $outputlangs->convToOutputCharset($desc), 0, 1);
327 $nexY = $pdf->GetY();
329 $pdf->line($this->marge_gauche, $nexY, $this->page_largeur - $this->marge_droite, $nexY);
331 $nblines = count($object->lines);
334 for ($i = 0; $i < $nblines; $i++) {
335 $objectligne = $object->lines[$i];
337 $valide = empty($objectligne->id) ? 0 : $objectligne->fetch($objectligne->id);
338 if ($valide > 0 || $object->specimen) {
340 $pdf->SetFont(
'',
'', $default_font_size - 1);
341 $pdf->SetTextColor(0, 0, 0);
343 $pdf->setTopMargin($tab_top_newpage);
344 $pdf->setPageOrientation(
'', 1, $heightforfooter + $heightforfreetext + $heightforinfotot);
345 $pageposbefore = $pdf->getPage();
348 $curX = $this->posxdesc - 1;
351 if (empty($conf->global->FICHINTER_DATE_WITHOUT_HOUR)) {
352 $txt = $outputlangs->transnoentities(
"Date").
" : ".
dol_print_date($objectligne->datei,
'dayhour',
false, $outputlangs,
true);
354 $txt = $outputlangs->transnoentities(
"Date").
" : ".
dol_print_date($objectligne->datei,
'day',
false, $outputlangs,
true);
357 if ($objectligne->duration > 0) {
358 $txt .=
" - ".$outputlangs->transnoentities(
"Duration").
" : ".
convertSecondToTime($objectligne->duration);
360 $txt =
'<strong>'.dol_htmlentitiesbr($txt, 1, $outputlangs->charset_output).
'</strong>';
363 $pdf->startTransaction();
364 $pdf->writeHTMLCell(0, 0, $curX, $curY + 1,
dol_concatdesc($txt, $desc), 0, 1, 0);
365 $pageposafter = $pdf->getPage();
366 if ($pageposafter > $pageposbefore) {
367 $pdf->rollbackTransaction(
true);
368 $pageposafter = $pageposbefore;
370 $pdf->setPageOrientation(
'', 1, $heightforfooter);
371 $pdf->writeHTMLCell(0, 0, $curX, $curY,
dol_concatdesc($txt, $desc), 0, 1, 0);
372 $pageposafter = $pdf->getPage();
373 $posyafter = $pdf->GetY();
375 if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) {
376 if ($i == ($nblines - 1)) {
377 $pdf->AddPage(
'',
'',
true);
378 if (!empty($tplidx)) {
379 $pdf->useTemplate($tplidx);
382 $this->
_pagehead($pdf, $object, 0, $outputlangs);
384 $pdf->setPage($pageposafter + 1);
389 $pdf->commitTransaction();
392 $nexY = $pdf->GetY();
393 $pageposafter = $pdf->getPage();
394 $pdf->setPage($pageposbefore);
395 $pdf->setTopMargin($this->marge_haute);
396 $pdf->setPageOrientation(
'', 1, 0);
399 if ($pageposafter > $pageposbefore) {
400 $pdf->setPage($pageposafter);
401 $curY = $tab_top_newpage;
404 $pdf->SetFont(
'',
'', $default_font_size - 1);
407 while ($pagenb < $pageposafter) {
408 $pdf->setPage($pagenb);
410 $this->
_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1);
412 $this->
_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
414 $this->
_pagefoot($pdf, $object, $outputlangs, 1);
416 $pdf->setPage($pagenb);
417 $pdf->setPageOrientation(
'', 1, 0);
419 $this->
_pagehead($pdf, $object, 0, $outputlangs);
421 if (!empty($tplidx)) {
422 $pdf->useTemplate($tplidx);
425 if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
427 $this->
_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1);
429 $this->
_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
431 $this->
_pagefoot($pdf, $object, $outputlangs, 1);
434 if (!empty($tplidx)) {
435 $pdf->useTemplate($tplidx);
439 $this->
_pagehead($pdf, $object, 0, $outputlangs);
447 $this->
_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0);
448 $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
450 $this->
_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0);
451 $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
454 $this->
_pagefoot($pdf, $object, $outputlangs);
455 if (method_exists($pdf,
'AliasNbPages')) {
456 $pdf->AliasNbPages();
460 $pdf->Output($file,
'F');
463 $hookmanager->initHooks(array(
'pdfgeneration'));
464 $parameters = array(
'file'=>$file,
'object'=>$object,
'outputlangs'=>$outputlangs);
466 $reshook = $hookmanager->executeHooks(
'afterPDFCreation', $parameters, $this, $action);
468 $this->error = $hookmanager->error;
469 $this->errors = $hookmanager->errors;
472 if (!empty($conf->global->MAIN_UMASK)) {
473 @chmod($file, octdec($conf->global->MAIN_UMASK));
476 $this->result = array(
'fullpath'=>$file);
480 $this->error = $langs->trans(
"ErrorCanNotCreateDir", $dir);
484 $this->error = $langs->trans(
"ErrorConstantNotDefined",
"FICHEINTER_OUTPUTDIR");
502 protected function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0)
535 $this->
printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height + 1, 0, 0);
537 if (empty($hidebottom)) {
538 $pdf->SetXY(20, 230);
539 $pdf->MultiCell(80, 5, $outputlangs->transnoentities(
"NameAndSignatureOfInternalContact"), 0,
'L', 0);
541 $pdf->SetXY(20, 235);
542 $pdf->MultiCell(80, 25,
'', 1);
544 $pdf->SetXY(110, 230);
545 $pdf->MultiCell(80, 5, $outputlangs->transnoentities(
"NameAndSignatureOfExternalContact"), 0,
'L', 0);
547 $pdf->SetXY(110, 235);
548 $pdf->MultiCell(80, 25,
'', 1);
562 protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
564 global $conf, $langs;
568 $outputlangs->loadLangs(array(
"main",
"dict",
"companies",
"interventions"));
573 $pdf->SetTextColor(0, 0, 60);
574 $pdf->SetFont(
'',
'B', $default_font_size + 3);
576 $posx = $this->page_largeur - $this->marge_droite - 100;
577 $posy = $this->marge_haute;
579 $pdf->SetXY($this->marge_gauche, $posy);
582 $logo = $conf->mycompany->dir_output.
'/logos/'.$this->emetteur->logo;
583 if ($this->emetteur->logo) {
584 if (is_readable($logo)) {
586 $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height);
588 $pdf->SetTextColor(200, 0, 0);
589 $pdf->SetFont(
'',
'B', $default_font_size - 2);
590 $pdf->MultiCell(100, 3, $outputlangs->transnoentities(
"ErrorLogoFileNotFound", $logo), 0,
'L');
591 $pdf->MultiCell(100, 3, $outputlangs->transnoentities(
"ErrorGoToGlobalSetup"), 0,
'L');
594 $text = $this->emetteur->name;
595 $pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0,
'L');
598 $pdf->SetFont(
'',
'B', $default_font_size + 3);
599 $pdf->SetXY($posx, $posy);
600 $pdf->SetTextColor(0, 0, 60);
601 $title = $outputlangs->transnoentities(
"InterventionCard");
602 $pdf->MultiCell(100, 4, $title,
'',
'R');
604 $pdf->SetFont(
'',
'B', $default_font_size + 2);
607 $pdf->SetXY($posx, $posy);
608 $pdf->SetTextColor(0, 0, 60);
609 $pdf->MultiCell(100, 4, $outputlangs->transnoentities(
"Ref").
" : ".$outputlangs->convToOutputCharset($object->ref),
'',
'R');
612 $pdf->SetFont(
'',
'', $default_font_size);
615 $pdf->SetXY($posx, $posy);
616 $pdf->SetTextColor(0, 0, 60);
617 $pdf->MultiCell(100, 3, $outputlangs->transnoentities(
"Date").
" : ".
dol_print_date($object->datec,
"day",
false, $outputlangs,
true),
'',
'R');
619 if (!empty($object->ref_client)) {
621 $pdf->SetXY($posx, $posy);
622 $pdf->SetTextColor(0, 0, 60);
623 $pdf->MultiCell(100, 3, $outputlangs->transnoentities(
"RefCustomer") .
" : " .
dol_trunc($outputlangs->convToOutputCharset($object->ref_client), 65),
'',
'R');
627 if (empty($conf->global->MAIN_PDF_HIDE_CUSTOMER_CODE) && $object->thirdparty->code_client) {
629 $pdf->SetXY($posx, $posy);
630 $pdf->SetTextColor(0, 0, 60);
631 $pdf->MultiCell(100, 3, $outputlangs->transnoentities(
"CustomerCode").
" : ".$outputlangs->transnoentities($object->thirdparty->code_client),
'',
'R');
636 $carac_emetteur =
'';
638 $arrayidcontact = $object->getIdContact(
'internal',
'INTERREPFOLL');
639 if (count($arrayidcontact) > 0) {
640 $object->fetch_user($arrayidcontact[0]);
641 $carac_emetteur .= ($carac_emetteur ?
"\n" :
'').$outputlangs->transnoentities(
"Name").
": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs)).
"\n";
644 $carac_emetteur .=
pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty,
'', 0,
'source', $object);
648 $posx = $this->marge_gauche;
649 if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) {
650 $posx = $this->page_largeur - $this->marge_droite - 80;
655 if (empty($conf->global->MAIN_PDF_NO_SENDER_FRAME)) {
656 $pdf->SetTextColor(0, 0, 0);
657 $pdf->SetFont(
'',
'', $default_font_size - 2);
658 $pdf->SetXY($posx, $posy - 5);
659 $pdf->SetXY($posx, $posy);
660 $pdf->SetFillColor(230, 230, 230);
661 $pdf->MultiCell(82, $hautcadre,
"", 0,
'R', 1);
665 if (empty($conf->global->MAIN_PDF_HIDE_SENDER_NAME)) {
666 $pdf->SetXY($posx + 2, $posy + 3);
667 $pdf->SetTextColor(0, 0, 60);
668 $pdf->SetFont(
'',
'B', $default_font_size);
669 $pdf->MultiCell(80, 3, $outputlangs->convToOutputCharset($this->emetteur->name), 0,
'L');
670 $posy = $pdf->getY();
674 $pdf->SetFont(
'',
'', $default_font_size - 1);
675 $pdf->SetXY($posx + 2, $posy);
676 $pdf->MultiCell(80, 4, $carac_emetteur, 0,
'L');
681 $arrayidcontact = $object->getIdContact(
'external',
'CUSTOMER');
682 if (count($arrayidcontact) > 0) {
684 $result = $object->fetch_contact($arrayidcontact[0]);
688 if ($usecontact && ($object->contact->socid != $object->thirdparty->id && (!isset($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) || !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)))) {
689 $thirdparty = $object->contact;
691 $thirdparty = $object->thirdparty;
696 $carac_client =
pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, (isset($object->contact) ? $object->contact :
''), $usecontact,
'target', $object);
700 if ($this->page_largeur < 210) {
704 $posx = $this->page_largeur - $this->marge_droite - $widthrecbox;
705 if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) {
706 $posx = $this->marge_gauche;
710 if (empty($conf->global->MAIN_PDF_NO_RECIPENT_FRAME)) {
711 $pdf->SetTextColor(0, 0, 0);
712 $pdf->SetFont(
'',
'', $default_font_size - 2);
713 $pdf->SetXY($posx + 2, $posy - 5);
714 $pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
715 $pdf->SetTextColor(0, 0, 0);
719 $pdf->SetXY($posx + 2, $posy + 3);
720 $pdf->SetFont(
'',
'B', $default_font_size);
721 $pdf->MultiCell($widthrecbox, 4, $carac_client_name, 0,
'L');
723 $posy = $pdf->getY();
726 $pdf->SetFont(
'',
'', $default_font_size - 1);
727 $pdf->SetXY($posx + 2, $posy);
728 $pdf->MultiCell($widthrecbox, 4, $carac_client, 0,
'L');
742 protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
744 $showdetails =
getDolGlobalInt(
'MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
745 return pdf_pagefoot($pdf, $outputlangs,
'FICHINTER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark);
printRect($pdf, $x, $y, $l, $h, $hidetop=0, $hidebottom=0)
Rect pdf.
Parent class to manage intervention document templates.
Class to build interventions documents with model Soleil.
_pagehead(&$pdf, $object, $showaddress, $outputlangs)
Show top header of page.
write_file($object, $outputlangs, $srctemplatepath='', $hidedetails=0, $hidedesc=0, $hideref=0)
Function to build pdf onto disk.
_pagefoot(&$pdf, $object, $outputlangs, $hidefreetext=0)
Show footer of page.
__construct($db)
Constructor.
_tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0)
Show table for lines.
convertSecondToTime($iSecond, $format='all', $lengthOfDay=86400, $lengthOfWeek=7)
Return, in clear text, value of a number of seconds in days, hours and minutes.
print *****$script_file(".$version.") pid cd cd cd description as description
Only used if Module[ID]Desc translation string is not found.
if(!function_exists('dolEscapeXML')) convertBackOfficeMediasLinksToPublicLinks($notetoshow)
Convert links to local wrapper to medias files into a string into a public external URL readable on i...
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
getDolGlobalInt($key, $default=0)
Return dolibarr global constant int value.
dol_concatdesc($text1, $text2, $forxml=false, $invert=false)
Concat 2 descriptions with a new line between them (second operand after first one with appropriate n...
complete_substitutions_array(&$substitutionarray, $outputlangs, $object=null, $parameters=null, $callfunc="completesubstitutionarray")
Complete the $substitutionarray with more entries coming from external module that had set the "subst...
make_substitutions($text, $substitutionarray, $outputlangs=null, $converttextinhtmlifnecessary=0)
Make substitution into a text string, replacing keys with vals from $substitutionarray (oldval=>newva...
if(!function_exists('utf8_encode')) if(!function_exists('utf8_decode')) getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
dol_trunc($string, $size=40, $trunc='right', $stringencoding='UTF-8', $nodot=0, $display=0)
Truncate a string to a particular length adding '…' if string larger than length.
dol_htmlentitiesbr($stringtoencode, $nl2brmode=0, $pagecodefrom='UTF-8', $removelasteolbr=1)
This function is called to encode a string into a HTML string but differs from htmlentities because a...
dol_mkdir($dir, $dataroot='', $newmask='')
Creation of a directory (this can create recursive subdir)
pdf_getPDFFontSize($outputlangs)
Return font size to use for PDF generation.
pdf_getFormat(Translate $outputlangs=null, $mode='setup')
Return array with format properties of default PDF format.
pdf_getHeightForLogo($logo, $url=false)
Return height to use for Logo onto PDF.
pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_basse, $marge_gauche, $page_hauteur, $object, $showdetails=0, $hidefreetext=0, $page_largeur=0, $watermark='')
Show footer of page for PDF generation.
pdf_getSubstitutionArray($outputlangs, $exclude=null, $object=null, $onlykey=0)
Return array of possible substitutions for PDF content (without external module substitutions).
pdf_pagehead(&$pdf, $outputlangs, $page_height)
Show header of page for PDF generation.
pdf_getPDFFont($outputlangs)
Return font name to use for PDF generation.
pdf_build_address($outputlangs, $sourcecompany, $targetcompany='', $targetcontact='', $usecontact=0, $mode='source', $object=null)
Return a string with full address formated for output on documents.
pdf_getInstance($format='', $metric='mm', $pagetype='P')
Return a PDF instance object.
pdfBuildThirdpartyName($thirdparty, Translate $outputlangs, $includealias=0)
Returns the name of the thirdparty.
if(preg_match('/crypted:/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
$conf db name
Only used if Module[ID]Name translation string is not found.
$conf db
API class for accounts.