I need more info in order to give you a proper solution. Please enable debugging in WordPress and tell me which errors you get.
Also please add
$mpdf->showImageErrors = true;
$mpdf->debug = true;
to file abstract-bewpi-document.php on line 73.
HI, im having the same problem.
the file is uploading to my uploads directory (in my case ‘wp-content/’.’files’ )
the error i get is.
mPDF error: IMAGE Error (data:image/png;base64,):
Did you manage to fix the problem? Please try the new update. It should be fixed.
No I haven’t managed to resolve it yet. It’s not a plugin conflict either.
Please try the code on line 344 and comment out the code on 346 in file abstract-bewpi-invoice.php. Hard to say what’s going wrong.
How do you mean “try the code on line 344”
Do you mean comment out 346 and see if it works?
If you don’t know how to change the code, then send me the logo you are using.
I know how to change the code, just don’t understand your response.
The code on line 344 in the file I mentioned get’s the relative path for the logo. You can try this code without base64 encoding the image (line 346).
If it doesn’t work either, please try without relative path solution and without base64 encoding. So just use the absolute path from the option.
Ah ok, sorry I understand you now. I’ll give it a try
Did you get it to work? Let me know so I can close this thread.
deb
(@debendra)
I have uncommented line 344 and commented 346 but still logo not showing, i did this as well:$mpdf->showImageErrors = true;
$mpdf->debug = true;
during checkout it shows unexpected error <
How shall I let it work.. ??
Hi Bas, I’m still having trouble. Its really strange when i go into Woo backend and generate invoice it shows up perfectly its only in the email to the customer upon ordering that the logo doesn’t show.
That’s strange indeed. Please enable debugging and try to use the relative path. Let me know if it works.
I have same problem but all I needed to do is switch base64 encoding, as mentioned above. To do this:
go to this folder:
wp-content/plugins/woocommerce-pdf-invoices/includes/abstracts
find this file: ‘abstract-bewpi-invoice.php’
go to line: 344. add a comment //
go to line: 347. remove the comment //
code snippet below:
// get the relative path due to slow generation of invoice.
// $image_url = '..' . str_replace( get_site_url(), '', $image_url );
// try base64 encoding with or without relative path if MPDF gives images errors.
$image_url = image_to_base64( $image_url );
This worked for me. Problem is when you update PDF Invoices it will over write this change. Could there be a toggle option within the settings instead?
also note that previously generated invoices will still show the “X” instead of image even after this change, you have to CANCEL then CREATE them again for it to work.