【发布时间】:2018-10-08 19:47:31
【问题描述】:
我在我的 rails 项目中有使用 prawn 生成 pdf 的代码。
bounding_box([(bounds.left + 5), bounds.top - 130], width: 750) do
font_size(10)
text "#{@post.description}", inline_format: :true, :overflow => :expand
end
文本的内容可能是 2-3 页。我想在文本周围创建一个边框。我该怎么做?
我试过transparent(0.5) { stroke_bounds } 但这只会给出单行。同样,我不能使用矩形,因为内容不固定。我该怎么做?
【问题讨论】:
标签: ruby-on-rails prawn