in reply to PDF vs. HTML for invoice generation
I used Cairo to generate PDF. It is extremely fast and doesn't consume a lot of memory. It is not hard to use, but still you have to spend some time reading Cairo documentation.