Thursday, March 30, 2006

XSL:FO processing

I'm looking into using Formatting Objects lately for the MoneyJar project. Nothing is useful until it is possible to show the monetary amounts on an invoice for customers. :)

The problem here is again that there are many standards, each with pro's and cons, some of them much work to implement, others very easy but difficult to use for others... and the list goes on...

So I am doing some research in the area of XSL:FO and maybe write or extend another little editor around that. There is an editor on SourceForge called FAO, but I don't think it is very intuitive for people to use. I had lots of problems using it because I don't understand XSL:FO in the first place. Also, I don't think many other developers are willing to trawl through 400 pages of XSL:FO documentation in order to write a quick template for something.

XSL:FO is specifically created for the "printing" industry. I'm basically not doing anything else than rendering PDF at the moment based on a full "xsl:fo" document, but this final "xsl:fo" document is generated through an XSL-XML pipeline as well. So, the invoice generator I have set up prints itself in an XML format. This XML is forwarded towards the XSLT-engine, where it generates "xsl:fo". The final "xsl:fo" is then converted into PDF.

Yes, this costs processing power, but so does C + files + ASCII and the latter solution is much more error-prone. The best layout & printing capabilities of the latter is nothing compared to the powerful layout capabilities of XSL:FO + XSLT + XML, not to mention its portability to other document formats. Plus that if you have a printing press set up that accepts PDF to be printed and mailed into envelopes, there should be a solution out there that can automate this without the need to purchase an expensive package. So there you go, I'm sold!

So, if you know of a 'complete' editor for XSL:FO that does it all and is WYSIWYG and can be used to 'drag' element data or attributes into a view of some kind, that would be totally awesome :).

No comments: