in reply to PDF vs. HTML for invoice generation
You may have read that I recently asked a question on PDF generation. My requirements are different from yours, in that I need precise placement of lots of graphics, where as you want mostly text, but we can probably share some of the same solutions.
I would agree with you that the PDF modules are not easy to use. I also found them buggy, but then my needs are complex.
After asking the question and reading the responses, I have decided to take the route of generating SVG using a template, and then converting the template to PDF using inkscape's svg2pdf tool. I think that solution might suit you as well.
You can 'draw' your invoice in inkscape or suchlike, and get the layout just right complete with your company logo. You put random place holder text for where the invoice text will be. Once you have finished, you save the SVG, which will be easy to understand XML, and replace the place holder text with template tags. From there it should be fairly easy to feed the template into your favourite templating library, and convert the resultant SVG to PDF.
|
|---|