The other day I had an interesting task I needed to complete with Reportlab. I needed to create a PDF in landscape orientation that had to be rotated 90 degrees when I saved it. To make it easier to lay out the document, I created a class with a flag that allows me to save it in landscape orientation or flip it into portrait. In this article, we’ll take a look at my code to see what it takes. If you’d like to follow along, I would recommend downloading a copy of Reportlab and pyPdf (or pyPdf2). (more…)