Take the 2-minute tour ×

Is there a solution to create pdf file from txt, maybe in ReportLab? To produce like this

| Name |  Age  |  Nickname  |
| 107  |  Ella | Fitzgerald |
| 108  | Louis | Armstrong  |
| 109  | Miles |   Davis    |
| 110  | Benny |  Goodman   |


share|improve this question

3 Answers 3

up vote 2 down vote accepted

ReportLab is an option. LaTeX is another option.

share|improve this answer
yes I already test the Reportlab, but is there any sample of source to import the whole text files into pdf? Thanks in advance –  kuslahne Jul 30 '11 at 2:09

EMACS org mode make this task exceedingly simple. Org makes it easy to format tables in plain ASCII. Any line with ‘|’ as the first non-whitespace character is considered part of a table. ‘|’ is also the column separator.

C-c C-e p (org-export-as-pdf) Export as LaTeX and then process to PDF.

share|improve this answer

Pisa generates from html. It's very easy to use.

http://www.xhtml2pdf.com/ http://www.20seven.org/journal/2008/11/pdf-generation-with-pisa-in-django.html http://antydba.blogspot.com/search/label/django%20pisa%20html2pdf%20polskie%20czcionki

import ho.pisa as pisa
import cStringIO as StringIO

result = StringIO.StringIO()
pdf = pisa.pisaDocument(StringIO.StringIO("<table><tr><td>test test</td></tr></table>"), result)
share|improve this answer
according to link Python, virtualenv and dependencies Install Python 2.6.x or 2.7.x. Installation steps depends on yours operating system. I am currently using Python 2.5.x –  kuslahne Jul 30 '11 at 2:07

Your Answer


