When I last looked at XSL-FO in 2014 it really looked like the writing was on the wall, that CSS Paged Media was going to be the end of XSL-FO by offering a much better product. Yet now in 2019 it’s still here and surprisingly CSS Paged Media hasn’t really taken off. I put this down to lack of full support in the major browsers, and tools like Prince XML, which like the commercial XSL-FO renderers before it, are expensive and niche ($3800 USD per server at time of writing). That and XSL-FO is a mature and established language and toolset that does a job well.
For the guys that can’t afford these prices, they often make do with the likes of WKhtmlToPDF or the many wrappers for it like Rotativa in .Net or Java WKhtmlToPDF Wrapper. But could XSL-FO be a better option?
Use cases for XSL-FO
When should we be using XSL-FO over other tools? This is a good question to ask yourself, if you are doing a simple 1 page document with some variables, then XSL-FO is probably a sledge hammer to crack a nut. But anything more complex than that and it’s still the best solution in my book for data driven transaction documents. I’ve used it for some of the following:
- Insurance Policy Documents
- Insurance Certificates
- Customer Statements
- Customer Bills
Hows the XSL-FO eco-system doing?
So assuming your still with me and thinking of giving XSL-FO a go for your next documents project, how is the eco-system doing? Well it’s alive and kicking, the main vendors are still updating and supporting their XSL-FO rendering engines. With the three main players all having an update in the last 12 months. In fact Antenna House updated their formatter only 2 days ago.
Last updated in October 2018 with the release of XEP 4.28 prices currently start at $4750 USD.
Last updated in May 2018 with the release of Apache FOP 2.3 and is still free.
Antenna House Formatter
Last updated in April 2019 with the release of Formatter V6.6 MR5 prices currently starts at $5000 USD.
Which should I use?
I’d recommend Apache FOP as the starting point, and if you need more advanced features take a look at the commercial vendors. I think you’ll be surprised at what it can do.
So how do I go about getting starting with XSL-FO today. Well not so long ago I’d have directed you to w3schools, but they’ve taken the XSL-FO content down and the old Dave Pawson site also seems to have gone. RenderX still have some good content on their site, see the RenderX XSL-FO Tutorial, and there is still the books on Amazon:
Of the two books, “Definitive XSL-FO” is the easiest to follow. I’ll be adding some getting started blog posts to show XSL-FO in the modern era in the coming months, so watch this space.
XSL-FO still looks to be the best fit for complex data driven documents, give it a try today.