Generating reports and invoices in the 21th century

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.

WeasyPrint can render such CSS to PDF. It has some limitations (no markup in page margins), as does the official spec. There are competing extensions to the spec by W3C and WhatWG.

Meanwhile, commercial alternatives to WeasyPrint like PrinceXML (also Antenna House]( have their own custom CSS extensions.

DocRaptor provides PrinceXML as a cloud service.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s