When it comes to generating a PDF from a web app, too many people seem to just take FPDF and fiddle with a whole lot of write(x,y) and y+10 calls. Ugh. That is just aweful.
Back when we were writing desktop apps, supposedly there were things like Crystal Reports. There seem to be a couple ones that have things like PHP clients for web usage (and most seem to be able to access a database directly) – Pentaho, Jaspersoft, BIRT.
I don’t have experience with any of them, but when I look at YouTube videos, I see things like “Eclipse” plugins generating pretty ugly looking tables.
I suppose it is perfectly feasible to work with them, though I shy away from the complexity and unsexiness.
There is a thing called FO-XML. It seems like pretty sophisticated stuff, but I’m not about to start learning a new XML language.
It seems there is an opportunity to do this by using HTML and CSS for paged media.
DocRaptor provides PrinceXML as a cloud service.