【问题标题】:Multiple tables on one page with prawn一页上的多个表与虾
【发布时间】:2010-02-26 10:57:46
【问题描述】:

我正在使用 prawn 生成 pdf,一切正常,但现在我遇到了一些问题。 当我将多个表格放在一页上时,它们只是相互叠加而不是相互叠加。 这是正常行为吗?我该怎么办?

顺便说一句,我添加了最正常行为的表格:)

谢谢!

【问题讨论】:

    标签: ruby-on-rails ruby-on-rails-plugins prawn


    【解决方案1】:

    您使用 Prawn 创建 PDF 文档的代码是什么?

    否则,我猜您需要使用“边界框”来分隔文档中的不同部分/表格。每个边界框都是一个内容渲染区域,新的边界框或文本在其下方渲染。请参阅bounding_box() documentation 或以下示例:

    > pdf.bounding_box([100,500], :width => 100, :height => 300) do
    >   pdf.text "This text will flow in a very narrow box starting" +
    >     "from [100,500]. The pointer will then be moved to [100,200]" +
    >     "and return to the margin_box"
    > end
    

    【讨论】:

      猜你喜欢
      • 2016-03-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-04-14
      • 1970-01-01
      • 2017-05-18
      相关资源
      最近更新 更多