0

是否有从 txt 创建 pdf 文件的解决方案,也许在 ReportLab 中?像这样生产

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

谢谢。

4

3 回答 3

3

ReportLab 是一个选项。LaTeX 是另一种选择。

于 2011-07-29T06:56:42.497 回答
0

Pisa 从 html 生成。它非常易于使用。

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)
于 2011-07-29T08:04:10.430 回答
0

EMACS org 模式使这项任务变得非常简单。Org 可以轻松地以纯 ASCII 格式格式化表格。任何带有“|”的行 因为第一个非空白字符被认为是表的一部分。'|' 也是列分隔符。

Cc Ce p (org-export-as-pdf) 导出为 LaTeX,然后处理为 PDF。

于 2011-07-29T07:12:25.927 回答