0
我试图生成按照http://railscasts.com/episodes/153-pdfs-with-prawn-revisedRailscast 153修改为:设置
给予我能够通过这样做是为了把背景图像的特定网页上的指示一个PDF的背景图像:
image "#{Rails.root.to_s}/public/document_assets/1_cover.png", :at => [bounds.left - 30, bounds.top + 50], :fit => [@width, @height]
我也得到了一个形象呈现在多个页面的背景一次使用:
repeat(2..3) { canvas { image("#{Rails.root.to_s}/public/document_assets/1_bg.png", :at => bounds.top_left, :fit => [@width, @height]) } }
,但呈现的一切之上的页面上的其他图像,所以没有文字或其他内容可见。
我似乎无法弄清楚如何设置背景图像属性,如对虾文档中所述。有谁知道如何做到这一点?
谢谢!