Hi Chad,
Thanks for your suggestions.
In my case, I can access to the error log but I have not a shell where to place line commands.
You are absolutely right with all your considerations!!!! Anyhow, what I have understood is that Composer download the desired package and add the correct namespace to be used to load the desired class......so....I guess that could be done manually as very very last choice...
By looking better at the error log, I found that my mistake was not in loading the tcpdf class, but, instead, I noticed that the class not found were actually loaded INSIDE the tcpdf.php file. So, here is the complete procedure I've followed to get rid of the error, just in case someone else should have troubles with using Composer.
1) I have placed the tcpdf folder inside vendor.
2) Inside composer/autoload_namespaces I have created an entry (inside the returned array) FOR EACH class that tcpdf uses, that is:
'tcpdf' => array($vendorDir . '/'), //means look for tcpdf dir inside vendor
'tcpdf_static' => array($vendorDir . '/tcpdf/include') // means look for tcpdf_static.php inside vendor/tcpdf/include
'tcpdf_colors' => array($vendorDir . '/tcpdf/include')
'tcpdf_filters' => array($vendorDir . '/tcpdf/include')
'tcpdf_font_data' => array($vendorDir . '/tcpdf/include')
'tcpdf_fonts' => array($vendorDir . '/tcpdf/include')
'tcpdf_images' => array($vendorDir . '/tcpdf/include')
3) Inside the tcpdf.php file I have included the following:
namespace tcpdf;
use tcpdf_static;
use tcpdf_colors;
...etc (for each tcpdf class defined above)
4) Inside my model I have
use tcpdf/tcpdf
And now the tcpdf class and all its sub-class are loaded correctly.
Elena