4 alternative invoice pdf templates

Sending my thanks to all the Dolibarr developers I want to share 4 alternative invoice pdf templates.

As this forum won’t let me upload php files or archives, I share the github URL of my pull request where you can find the 4 templates and can copy them to your server, (click on the grey link 'github.com/Dolibarr/dolibarr.’ from below, not on the blue link):

Apart from some visual improvements, I reordered the columns, setting them in the most commonly used order: Product Description, Quantity, Unit Price, Taxes, Total Excluding Taxes.

3 Likes

Two of the templates also include an additional column: taxes amount per line, which is expected in some countries:

Two of the templates, the ones ending in ‘wt’ (which stands for ‘without table’), have a more modern look, as they only include the horizontal lines, which are enough to display a clear list of products and prices. This design is also adopted by many other well-known ERP applications:

All the templates also contain the following commented lines:

// Add background image
//$pdf->Image(DOL_DOCUMENT_ROOT.'/core/modules/facture/doc/background1.png', 26, 90, 160, 110);
//$pdf->Image(DOL_DOCUMENT_ROOT.'/core/modules/facture/doc/background2.png', 56, 100, 100, 100);

If you uncomment one of the lines, you can add an image as background for the table of prices, as can be seen in the examples below. This can be useful if someone wants to include a highly transparent version of their logo or of a pattern, as background for the invoice, in order to personalize it. (The two png images are free for commercial use without attribution, as they are taken from pixabay.com).

The two sample backgrounds:

The column headers: ‘Quantity’, ‘Unit Price’, ‘Taxes’, ‘Taxes Amount’, ‘Total Excl. Tax’ are handwritten in the pdf template, so, if someone needs them in French/German, etc. the easiest way is to replace them with their French/German translation, directly in the pdf templates.

To use all the templates you have to place them in ‘dolibarr_root_directory/core/modules/facture/doc’. Then don’t forget to go to Home > Setup > Modules/Applications > Invoices > click on the Setup wheel, then activate all the 4 pdf templates using the switch in the Status column, under ‘Invoice documents models’.

I couldn’t list all the images in one post. Since I’m a new user, the forum won’t let me.

2 Likes

Thanks so much for this :slight_smile:

Hi,

Thanks for that !
Can you put htem here in .zip ?

No, this forum won’t let me post any type of archive here. I posted them as a zip archive at the bottom of the pull request thread. You can download the zip from there:


Replace the background images with any image that you like after you make it highly transparent (about 10% opacity). Both the pdf templates and the background images have to be placed in the ‘dolibarr_root_directory/core/modules/facture/doc’ directory, then you have to enable each template in ‘Home > Setup > Modules/Applications > Invoices > Setup’. Afterwards, you can just select the templates on the invoice card, instead of selecting the default ‘crabe’ template, when generating the pdf invoice.

3 Likes

Hi,

Normally zip are allowed in the forum.

pdf_templates.zip (765.8 KB)

No, new users like me are not allowed to upload zip archives or other types of archives.
I’ve just tried again to upload a zip archive and I received:
‘Sorry, new users can not upload attachments.’

Hi,

Yes sorry, when you are below 10 messages…
I have updated your profil, you should be able now

1 Like

This really Helps. thank you