10.0.0 - Logo on the first page only

Hello everybody,
After migration from 9.0.3 to 10.0.0, invoice and proposals only shows company logo on the first page of the PDF, when using azur and/or crabe.

Is it a bug or I missed something with the new parameters ?

Thx a lot for your help

Hello,

please can you tell us your system environement.

my suggestions:

  1. check the file permissions
  2. check the PHP version
  3. activate the modules Debug Log & Debug Bar and look for messages

After this I would recommend to run the setup again.

And if that does not help
look on GitHub https://github.com/Dolibarr/dolibarr/issues
and report that bug.

Hello com4WEB,
thank you a lot for your reply.

  1. File permissions are OK
  2. PHP is 7.3.7 (also tried 7.2.19)
  3. Done. No strange messages or errors

The standard company logo is a png image (148k) with a transparent background. Also tried with the same compressed png image (43k) with same result.
I got it working by converting the logo to a 75k jpg, but unfortunately with no transparent background (not supported by jpg).

Before opening an issue, could someone confirm the same behaviour ?
Thx for your cooperation.

Hello,

I think you must look into GD Lib of PHP

-> https://www.php.net/manual/en/book.image.php

and have to activate PNG Support.

Best regards
Udo Tamm
com4WEB.de / dolibit.de

Thank you for your reply, but I don’t think that the problem is in there. The logo is correctly placed on the first page (PNG or JPG), but on the second page it gets placed only if the image is in JPG format.
So if it’s placed on the first page, GD config should be fine here…

Could someone please test something similar ?
Use a PNG image for your logo and try to generate a 2 or more pages invoice ?

Thx a lot.

Actually, this is a described TCPDF issue (see https://github.com/tecnickcom/tc-lib-pdf/issues/56).

I don’t know whether this is the most appropriate solution, but as a workaround, you can modify file htdocs/includes/tecnickcom/tcpdf/pcpdf.php line 6848 from
if (!@TCPDF_STATIC::file_exists($file)) {
to
if (!@TCPDF_STATIC::file_exists($file) && !in_array($file, $this->imagekeys)) {

that way, already seen files (and processed in a sort of cache) won’t be ignored.
Sincerely,
Marc

2 Likes

Hi Marc,
you used your first post to resolve my issue. THANK YOU VERY MUCH!

After modifying the file as you wrote, the logo png image appears correctly on the additional pages also.

For the future, I imagine we have to wait an official commit on the tcpdf library.
For the present, thank you very much for your time and for your solution.

Bye Kess

from version 11.0 it is line 6880.