Creating PDF Invoices - Are there any templating solutions? [closed] Creating PDF Invoices - Are there any templating solutions? [closed] linux linux

Creating PDF Invoices - Are there any templating solutions? [closed]


Try this... create a blank invoice with Word (or whatever you want) and save it as a PDF.

Then use a PDF library to modify the PDF (insert the text at particular coordinates). We do this in the Microsoft world and it is extremely easy.

The biggest benefit is that we can use our own tools to create and modify the template. If we want to add some static text, we just crank open Word, make the change and save it to a PDF file (that is being used as a template).

For Microsoft, we use iTextSharp which is actually a C# port of the original Java version of iText


Additionally...

You can use Adobe Acrobat to insert fields in the PDF (address, phone, invoice number, line item 1, line item 2, etc...) and then use iText/iTextSharp to populate these fields at run time.

This is, in more detail, what we do... and it is extremely easy.


The normal way is to install (La)TeX (probably already on the linux box) and run pdflatex to get the pdfs. You can also use Apache FOP, if you prefer xslt and xsl-fo.

If the number of invoices to create is low you might want to use open-office (directly or as a toolkit).

If you want high-precision positioning and low-level access, a low-level pdf library (I don't know if iTextSharp works with mono) might be what you want.

I would try out LaTeX first, because it allows you to get results with the least effort.


We use Reportlab with Python. If you look around there are a load of ready-made forms/invoices/etc.