• Resolved RosscoGC

    (@rosscogc)


    Hi Bas

    I have had an issue lately with a new website that I am using your invoice plugin on, no matter what I do I cannot get the logo to display on the invoice. I have tried updating to latest version of the plugin and even copying the plugin from other sites I know it works on. its got me buggered.. any ideas? It just displays a red x in place of the logo. I have tried different file types, sizes etc and nothing works.

    Link to invoice header screen shot > Link

    https://www.ads-software.com/plugins/woocommerce-pdf-invoices/

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author Bas Elbers

    (@baaaaas)

    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,):

    Plugin Author Bas Elbers

    (@baaaaas)

    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.

    Plugin Author Bas Elbers

    (@baaaaas)

    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?

    Plugin Author Bas Elbers

    (@baaaaas)

    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.

    Plugin Author Bas Elbers

    (@baaaaas)

    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

    Plugin Author Bas Elbers

    (@baaaaas)

    Did you get it to work? Let me know so I can close this thread.

    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.. ??

    Thread Starter RosscoGC

    (@rosscogc)

    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.

    Plugin Author Bas Elbers

    (@baaaaas)

    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.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Logo not showing on invoice’ is closed to new replies.