which version of reportlab do you prefer?
I have the following ReportLab code:
The first thing to notice about this code is that if we want to save the PDF, we need to supply a file name to the Canvas object. This can be an absolute path or a relative path. In this example, it should create the PDF in the same location that you run the script from. The next piece of the puzzle is the drawString method. This will draw text wherever you tell it to. When using the canvas object, it starts at the bottom left of the page, so for this example, we told it to draw the string 100 points from the left margin and 750 points from the bottom of the page (1 point = 1/72 inch). You can change this default in the Canvas constructor by passing a zero to the bottomup keyword argument. However, I’m not exactly sure what will happen if you do that as the Reportlab user guide isn’t clear on this topic. I think it will change the start point to the top left though. The final piece in the code above is to save your PDF.
easy_install ReportLab works for me.
ReportLab is both the name of a Python-based PDF generation toolkit, and the company that created it. Some functions need the Python Imaging Library (PIL).
All those presents are wonderful, but now you have to write thank-you letters. Never fear, ReportLab's here! Use this wizard to crank out the letters quickly. I wanted to generate a simple booking confirmation PDF. Below is the result. ReportLab is certainly powerful enough to create these kind of docs. It is very flexible, but this flexibiliy comes at the price of some verbosity. I created a simple wrapper module to meet my requirements and perhaps yours. If you are a diver, book your next scuba holiday on web2py at . :) ReportLab builds solutions to generate PDFs, fast. We have our own very capable software library that can build custom PDF documents with dynamic content for users. We hope this tool serves as a simple example of what we do. Visit to see more examples of work we have done for our clients. You can login to our demo page, by clicking or on the tab in the above menu, to see a range of companies who have trusted ReportLab for generating their documents, and to experience how our system works.This demo site provides you with ReportLab’s Enterprise-level solutions you can try from your desktop.
Everything in it is proven technology; elements have been in production use in high volume environments for major financial institutions and others reputable organisations.
This time I needed a lot of the capabilities of ReportLab. I needed to generate PDFs (this is not a web-based project), I needed to generate charts, and I wanted the reports I was generating to contain various types of text objects in addition to the charts and such.