Jump to content

[solved] Error invoices .PDF


Recommended Posts

I do not understand why I get the double slash / / in the path of the logo of the bill ... I can notchange this setting?

 

FPDF error: Alpha channel not supported: /web/htdocs/www.xxxxxxxx.xx/home/img//logo_invoice.jpg

 

 

regards

Max

Link to comment
Share on other sites

it is because the PDF.php file uses code like this which concatenates /img/ and /logo_invoice.jpg

$this->Image(_PS_IMG_DIR_.'/logo_invoice.jpg', 10, 8, 0, 15, 'PNG');

 

just update the class file PDF.php so that logo_invoice.jpg no longer has the / in the beginning.

Link to comment
Share on other sites

if (file_exists(_PS_IMG_DIR_.'logo_invoice.jpg'))

{

if ($this->_isPngFile(_PS_IMG_DIR_.'logo_invoice.jpg'))

$this->Image(_PS_IMG_DIR_.'logo_invoice.jpg', 10, 8, 0, 15, 'PNG');

else

$this->Image(_PS_IMG_DIR_.'logo_invoice.jpg', 10, 8, 0, 15);

}

elseif (file_exists(_PS_IMG_DIR_.'logo.jpg'))

{

if ($this->_isPngFile(_PS_IMG_DIR_.'logo.jpg'))

$this->Image(_PS_IMG_DIR_.'logo.jpg', 10, 8, 0, 15, 'PNG');

else

$this->Image(_PS_IMG_DIR_.'logo.jpg', 10, 8, 0, 15);

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...