Table of Contents
BluePrint: PDF Generation
This page is a collection of notes on PDF generation that were previously scatter around a number of other pages.
ReportLab
For more formal reports (which can also be retrieved via webservices using the PDF representation of the REST Controller), we currently use ReportLab. This also supports Graphics (via PIL)
How to set up a new PDF file
You need to edit your pdf-defs.tcl file to include the new type in pdf_generate_pdf. Also create a new pdf-xxx.py Python file, and set it up as you like it. That's basically it.
- http://www.reportlab.com/software/opensource/
- http://www.reportlab.com/software/opensource/rl-toolkit/ (open source version)
OCR
- BluePrintOCR
- BluePrint/OCRIntegration
- UserGuidelines/OCR
PDF Tasks
From Haiti Response - are these still current?
- Fix the base PDF generation in
models/01_RESTlike_controller.py
'sexport_pdf()
as they currently look awful (& hence aren't exposed to users by hiding it inviews/formats.html
)!- /module/resource.pdf
- Provide a Filter option exposed to users so they can print just the Contacts for a particular Organisation
- Ideally a generic routine, but then a custom one can be added via
response.s3.formats.pdf
variable being set in the Controller before invoking theshn_rest_controller()
to make it really pretty
- Ideally a generic routine, but then a custom one can be added via
See:
- https://bugs.launchpad.net/sahana/+bug/508654
- "generate a contact list for specific orgs as a PDF"
- Data Analysis, Visualisation and Reporting
- We currently use Geraldo for PDF creation, but it has issues, so we should consider either switching to Pisa or dropping down to raw ReportLab (with our own custom classes on top).
- We do this already for the OCR PDF generation.
- We currently use Geraldo for PDF creation, but it has issues, so we should consider either switching to Pisa or dropping down to raw ReportLab (with our own custom classes on top).
Other Tools
- Pisa uses ReportLab to generate PDF from HTML
- jsPDF uses pure JavaScript to create PDFs
- Geraldo builds on ReportLab, and we used to use this, but no longer
- Use S3XRC & hence XSLT to generate XML-FO which can be converted to PDF
Last modified
13 years ago
Last modified on 01/08/12 21:28:15
Note:
See TracWiki
for help on using the wiki.