Hello
Can someone help me please
I am in the process of creating my own PDF documents and would like the name of the creator of the document in the sender field.
unfortunately I don’t know where to find this name and then add it to my document.
many think for the help
greetings Aba
Hi
Do you create the PDF template by yourself ?
Or just want to find the option to enable ?
Hello and thank you for your answer.
I edit the existing php files to generate the pdf.
what I’m looking for is something like
$ object => fetch_user ()
so that the first name and surname can be output in the pdf.
Thanks for your help
Hello, you already have a global $user variable that store the current user object.
But be careful if you edit the core files because you will lose your changes if you update your dolibarr version (unless using git obviously but that’s another story).
Hello and thanks for the answer
Now either I am doing something wrong with the question or the error lies with me.
When I query the global user nothing comes. No output but no error either.
thats how i tray
// Show proposel editor
$pdf->SetFont('', '', $default_font_size -3);
$pdf->SetXY($posx +2, $posy -1);
$pdf->MultiCell(66, 5, $langs->trans("CreatedBy")." : ".$outputlangs->convToOutputCharset($this->emetteur->user), '', 'L');
$posy = $pdf->getY();
1 Like