During my vacation in Italy I have written as small MarkDown to PDF converter that we use for our letters and invoices here at Nelmio. For this purpose I have used FOP, Apache’s open source implementation of XSL-FO. I consider XSL-FO to be the easiest method to programmatically generate PDFs while remaining in total control of the produced result. Plus: it always gives me the opportunity to play with one of my fetish languages: XSLT.
While fiddling around my stylesheets I came across an XSLT element which I had never used before, the <xsl:attribute -set></xsl:attribute>. It proved itself quite useful and I wish I would have known about it in my previous work with XSLT.