(The subject is in german, it means something like “quotemanagement 2.0”)

At Liip, we're using Confluence, the Wiki from Atlassian, as our central knowledge tool. It contains company information almost anything from serversetups to hints about software, client projects information, weekly reports from everyone and even internal management communication. Confluence is really awesome, offers a ton of plugins for almost everything, is extendable, supports tags, has a soap-interface and on top of it, is really easy to use for everyone. You still have to keep some order like with every wiki, otherwise chaos will reign sooner than later, but it has features, which help you keep doing that. And last but not least, it uses the LiveSearch code we developed some time ago :)

But enough of all the praise (and I didn't get paid for that), back to the real reason of this blogpost. As every real company, we have to write letters, offers, bids, quotes, invoices day-in day-out. And as maybe most companies we did that with OpenOffice or the other Office Suite. That worked with a “centralized” and homogenous setup, but now we're sometimes together working in Zurich and Fribourg on the same offer, have mac, windows and linux to support and try to be even more stringent on the Corporate Identity stuff. And after having worked with the separation of content and design like in HTML/CSS XML/XSLT since ages, I was really not happy about how it worked in the office suites and felt like in another IT age. Maybe I didn't grasp the office suites, but when I work on a text, I'd like to concentrate on that text and not having to fight with the design of that letter/offer.. I wished good old LaTeX back.

But Confluence and its extensible and open framework to the rescue, we actually found a solution, which comes quite close to those goo' ol' days. In short: Write your letter/proposal/whatever in Confluence, hit the print button, some PHP/SOAP/XSLT/FOP magic happens and you have your perfectly styled letter as PDF, which you can either print or send to your client. This brings us all the advantages of a Wiki (searchable, collaboration, versioning) and the same design on every computer (and no further grey hair for the people actually writing that stuff)

A short example:

The wiki code: wiki2pdf.txt

HTML View in the wiki: wiki2pdf.png

The PDF of it: wiki2pdf.pdf

And the really cool thing, I can mount the wiki via WebDAV and write that letter with my preferred text editor :)

Technically, we insert on each wiki page a link to the PDF version, which is a little PHP script. That script fetches the right Wiki Page via the SOAP interface of Confluence as rendered HTML, so we don't have to bother with Wiki Markup but get almos) XML-well-formed HTML. After some cleanup (it's unfortunately only almost XML compliant, especially if you use 3rd party plugins) we transform the HTML via a XSLT stylesheet to XSL:FO. The FO is then sent to Apache FOP, which produces the actual PDF. FOP made some big progresses lately and the 0.93 version brought some very useful improvements compared to the old 0.2x series. Additionally we added some options to the generator, so that you can have the PDF with the Liip Logo (included as SVG) or not (for printing) and with the right address (Fribourg or Zurich) on top.

The main task in such a setup is still writing the XSL:FO stuff. It's mainly manual work with way too many options (in the FO specs), but the result justifies the means. That is: no more fiddling with design issues in the future.. And yes, we could have done all this in Java as a Confluence Plugin, but that was the part where my personal know-how ended :)

PS: In the meantime, we even write the invoices this way. They are automatically exported to the wiki from our accounting tool in almost the same way as described above.