0

rst2pdf在 linux 上使用 0.92,我正在尝试将 html 嵌入list-table指令中,如Dimitri Christodoulou 的博客中所示。Robert Alsina 提到他已经将此功能集成到rst2pdf0.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>

这可以编译成 pdf,使用rst2pdf -o test.pdf test.rst;没有问题。但是,我看不到嵌入 HTML 应位于的文本:

带有嵌入 html 的 rst2pdf:损坏

我在用:

  • 虚拟环境中的 Python 2.6.6
  • 文档工具 0.9.1
  • rst2pdf 0.92
  • xhtml2pdf 0.0.4
  • Debian 挤压 (Debian Linux 6.0)

如何让 rst2pdf 将上面显示的 HTML 嵌入list-table指令中?

编辑

这已被归档为rst2pdf 问题 455

4

1 回答 1

1

修复!抱歉花了这么长时间。最新的 pisa/xhtml2pdf 有完全不同的导入:-P

于 2012-06-26T02:19:29.380 回答