How can i change the logo size in pdf?

Hi to all,

i have downloaded my logo as a png file.

In all pdf documents, dolibarr has stretch the logo size so it looks very diffuse.
How can i change the logo size in the pdf Template?

I know i need to change all templates separately.
e.g. for the propal i need to change the pdf_azur.modules.php .

I´m not a perfect coder. i think i need to change this lines:

$logo=$conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo; if ($this->emetteur->logo) { if (is_readable($logo)) { $height=pdf_getHeightForLogo($logo); $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto)

but how?

i want a size of 300 x 59 px.

thanks for your help!

regards

Hello, were you able to do it? I need the same thing…

Take a look here:

Disclaimer: Not tested by me.

Best regards

https://github.com/Dolibarr/dolibarr/compare/adc96cc826e9...0254edb4268d

Best regards

And here another one:

www.dolibarr.org/t/invoice-layout-changes-to-php/10148/3

Best regards

Please check the screenshot for the file, code and the versions I have tested it on.

Hope it helps.

Hello @Michael001 @osek2112

In Dolibarr ver. 15.0.2 you can change logo size of pdf on the,
SetupPDF → Height for logo on PDF

Best regards

1 Like