Skip to content

Repository files navigation

Open source implementation of RML (Report Markup Language) from ReportLab

RML User Guide (or beginner tutorial)

Not all tags are supported, but most of them work.

Install

pip install trml2pdf

Examples

Create a PDF file:

importtrml2pdfprinttrml2pdf.parseString(file('file.rml','r').read())

If you are using this for Django you can dynamically create an .rml file with the template system and then render it.

fromdjango.template.loaderimportget_templatefromdjango.template.contextimportContextdata= {'key1': 'foo'}
template=get_template('template.rml')
context=Context(data)
xmlstring=template.render(context)
pdfstr=trml2pdf.parseString(xmlstring)

About

open source implementation for RML language (markup language for PDF generation)

Resources

Stars

0 stars

Watchers

8 watching

Forks

Releases

Packages

Contributors

Languages