在python中从文本文件生成pdf
有没有办法从 txt 创建 pdf 文件,也许在 ReportLab 中?制作这样的
+------+-------+------------+
| Name | Age | Nickname |
+======+=======+============+
| 107 | Ella | Fitzgerald |
+------+-------+------------+
| 108 | Louis | Armstrong |
+------+-------+------------+
| 109 | Miles | Davis |
+------+-------+------------+
| 110 | Benny | Goodman |
+------+-------+------------+
谢谢。
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 |
+------+-------+------------+
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
ReportLab 是一个选项。 LaTeX 是另一种选择。
ReportLab is an option. LaTeX is another option.
EMACS 组织模式使这项任务变得极其简单。 Org 可以轻松地以纯 ASCII 格式设置表格。任何带“|”的行因为第一个非空白字符被视为表的一部分。 '|'也是列分隔符。
Cc Ce p (org-export-as-pdf)
导出为 LaTeX,然后处理为 PDF。
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.
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
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