Addition of additional logos to Footer Section of Invoice

Hi,

I am trying to add an additional logo to the Footer section of invoices.

I have altered the clean.js file as well as updating the invoice_designs table in the database.

Am I following the correct steps?

Also, in which file can I add a new logo2 variable to display at this position on invoices.

The additional logo feature would be q requirement for most clients we would add.

Best Regards

Another method to add logos is to create a custom design and add the logo in base64 format. Check out the images tab here for examples: http://pdfmake.org/playground.html

From your post it sounds like you may be reselling the app. Please keep in mind our open-source license requires our brand remain visible. If you’d like to white label the app consider joining our reseller program.

https://github.com/invoiceninja/invoiceninja#affiliates-programs

Hi Hillel,

Thank you for your reply.

I will have a look at pdfmake.

Is it possible to embed the base64 image directly in the custom js template file instead of a standard variable?

Also, when I add the custom template, what steps are necessary to make the template appear as a new option in the app?

I have a reseller account so I am trying to carry out some changes applicable to clients.

Thanks,

Declan

Yes, you should be able to embed the image directly in the template.

If you change a template you can refresh it in the database by calling php artisan db:seed --class=PaymentLibrariesSeeder and then adding ?clear_cache=true to clear the application cache.

Great, thanks Hillel. I will carry out those steps.
Do I just need to place the image in the /public/images folder or is there any additional steps so that the image is recognised by the app?

If you use a base64 version of the logo it would only exist in the template.

Hi Hillel,

I have added a base64 image and additionally added it to the Customize editor but now I get a white screen instead of displaying the template.

Would this be a memory related issue?

I’m not sure I understand “I have added a base64 image and additionally added it to the Customize editor”, you should just need to add the base64 text in the editor. You can review the Photo template for an example.

Thanks Hillel.
I updated the template .js file, invoice_designs Database table and Customize Editor , because the Customize Editor would not allow me to update initially.

But after updating through the Customize Editor I can no longer access the Editor, maybe due to the size of the base64 text.

I am running a MySQL database which throws an error with the “php artisan db:seed --class=PaymentLibrariesSeeder” command. Is there a workaround for this to allow this command?

Sorry for the depth of questions but if I can overcome these few details it will be highly beneficial for the addition of new clients.

This is an example of the Whitescreen / Non Display that I receive after any updates using the Customize Editor

Whitescreen on update using Customize Editor

My guess would be the template is invalid. The app should check for errors though before saving, are there any errors in your browser’s console.

Hi,

Within the Customize Editor.

I have added the base64 image to the end of the Custom Template at the end of the Content Section.
This means that it displays at the end of the Invoice Content.

However I need it do display in the Footer Section. When I add the code to the Footer Section editor, the image does not display in the Footer.

Is there a reason why it will not display from the Footer Section code.

I have attached a screenshot of the Editor.
Customizer Footer Editor Code

@

I think the image may be getting cut off, I was able to make it display using a negative margin.

{
  "columns": [
    {
      "text": "$invoiceFooter",
      "alignment": "left"
    },
    {
      "image": "data:image/jpeg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAAyAAD/7QAsUGhvdG9zaG9wIDMuMAA4QklNBCUAAAAAABAAAAAAAAAAAAAAAAAAAAAA/+4AIUFkb2JlAGTAAAAAAQMAEAMDBgkAAAW8AAALrQAAEWf/2wCEAAgGBgYGBggGBggMCAcIDA4KCAgKDhANDQ4NDRARDA4NDQ4MEQ8SExQTEg8YGBoaGBgjIiIiIycnJycnJycnJycBCQgICQoJCwkJCw4LDQsOEQ4ODg4REw0NDg0NExgRDw8PDxEYFhcUFBQXFhoaGBgaGiEhICEhJycnJycnJycnJ//CABEIAGQAlgMBIgACEQEDEQH/xADtAAABBQEBAAAAAAAAAAAAAAAAAQIDBAUGBwEBAAMBAQEAAAAAAAAAAAAAAAIDBAUBBhAAAQQCAQMDBQEAAAAAAAAAAgABAwQRBRIQIBMwIQYxIiMUFUARAAIBAgMFAwgHBwUBAAAAAAECAwARIRIEMUFRYROhIkIgcYGRsdFSIzDBMpKyFAVA4WJyM0MkUPGiU3OTEgABAgQBCQYEBwAAAAAAAAABEQIAITESAyBBUWFxkaGxIhAwgdEyE8HxYnLw4UJSgiMUEwEAAgIBAwQCAwEBAAAAAAABABEhMVFBYXEQgZGhILEwwdHw8f/aAAwDAQACEQMRAAAA9ScqiDlGjgRUUcqSCOVfTEeETZI/TABQBHCxAiDmcvz1O3rM7i7HG29J1nGW6c/ZO4i1ry9ZZwJOzk2Gc11N8YVe6FsZKEQqwR8v0vnEpz4isza7FaovCjNThxulztSxiz6597PwkfQ99R6vxT0S7N2yu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L5o/BAVDYFa5xT2qVhDQIAA5pB+5aemryoxhX0jk3pALPvUXhzAK5y/XUnskCEqEqMLSHNUwwLAQBRotLMeIdlDn5FpRZUUm5R2ZJ7EpNZRMobAO5K5hOAUuBYHYG+8SddNHz0+EKEOCcKzlT1BZYb4uB90OpYUAVM2rcL3vCknNK+bjWGKs6bZa9oVhmRdpg/YWAAlUVJkcjdXD11Lgke0VcU2MbHfygaFKWEnTL5GJZzMyGuGMPMbSQlbPagPOZaKOHjusEyaLtXgeW3iK4+oDc4bNYnwcKiQaks/Caxh5wK7kdeZvb3LEJhAMqbKrhAqim522Qv5gPgqp9FxlL7mnZpXi3MxIMgDkG/ug65qHbsEF8zXvjwBFAU4jmwArRmKjV6XLdNd1TvoiF1X5vX/fMHBChWDvd+4paeJz4FDgzLjs70CdhHznQBjzv7Sxo8bd2NfcZmYNWs8RxQGYGe1+olGV9n7Z+0UPFyYwlYvmDNJctGQPGwnyQAWPv0haPhQ4abtsUxZfaFBalqvypK8pGizJpYO+aShBw+h2xgHf3CNeSAXzRnTRxS/szKo3P+IMAszsGE7iUiOwZy99tXZg3BCqz2L+qH0gU09RzxfaMDrstvwgKoDsPRrCLj7jcKSy6oH5pLZC0I+L/UPAvRNDQUa9oMU7aNedH3NWIKBWuO+m4lsAS60VfopKsCajNR6AT7l8D418EaQCisod0YIUK9U/PBh6loQegqKly/QfkBmNzMzM/i+jOk/9k="
    }
  ],
  "margin": [
    0,
    -80,
    0,
    0
  ]
}

Hi Hillel,

Thanks for your reply. I was able to display your image in the Customize Editor.

However, when I saved the Template, I received the Updated Successfully message, but the Template disappeared from view as before and is no longer available.
This app is set up on a Shared Hosting package. Are there particular requirements for hosting the app with regard to versions of PHP and MySQL, allocated memory etc?
The version of Invoice Ninja is v2.4.7. Should I update to the latest version?

Thanks,

Declan.

I’m not sure, in my testing it works correctly after saving.

You may way to try it on invoiceninja.com.

Hi Hillel,

I set up an account on invoiceninja.com and that worked. thanks for your assistance.

Thanks again,

Declan.