動的画像と動的テキストを含むドキュメントがあり、画像の周囲にテキストが必要です。画像は横向きのページに右揃えで配置されます。これが私がこれまでに持っているものです:
pdf.bounding_box([0,pdf.bounds.top - 50], :width => pdf.bounds.width, :height => pdf.bounds.height-50) do
pdf.text @article.title, :size => 30, :style => :bold
pdf.text @article.content, :align => :left
# image
pdf.bounding_box([pdf.bounds.right - 250, pdf.bounds.top], :width => 250, :height => 250) do
pdf.image image_path, :width => 250
end
end
テキストは画像の真下に表示されます。このルビーエビを右揃えの画像にテキストを折り返す方法を試してみましたか?しかし、それは機能しませんでした。
助けてくれてありがとう。