【发布时间】:2012-06-25 12:18:08
【问题描述】:
我在 linux 上使用 rst2pdf 0.92,我试图将 html 嵌入到 list-table 指令中,如 Dimitri Christodoulou's blog 所示。 Robert Alsina 提到他已经将此功能集成到rst2pdf 0.90 中。
我正在尝试构建每个单元格包含多个文本行的发票,控制换行符位置的最简单方法似乎是使用 <br> 标记。这是我的test.rst 文件:
Invoice for Services Rendered
=============================
.. list-table::
:widths: 50 50
:header-rows: 0
* - .. raw:: html
<p>My Name Here<br>My address here<br>City, State, Zip<br>Ph: 214-555-1212<br></p>
- **INVOICE**
* - This is a test
- .. raw:: html
<p>Invoice #20120622001<br>Date: 25 June 2012<br></p>
使用rst2pdf -o test.pdf test.rst 可以毫无问题地编译成pdf;但是,我看不到嵌入 HTML 应该位于的文本:
我正在使用:
- 虚拟环境中的 Python 2.6.6
- docutils 0.9.1
- rst2pdf 0.92
- xhtml2pdf 0.0.4
- Debian Squeeze (Debian Linux 6.0)
如何让 rst2pdf 将上面显示的 HTML 嵌入到 list-table 指令中?
编辑
这已被归档为rst2pdf issue 455
【问题讨论】:
标签: html pdf html-table rst2pdf