- ThinReports 0.7.6
- Ruby 1.9.3, 2.0
- Rails 3.2, 4.0
パッチ thinreports-with-text-rotation.rb
を require するだけ
- テキストブロックの複数行モードのみ回転可能
- 回転させたいテキストの最後に
/r<回転率>
を付与する - 付与された
/r<回転率>
は描画時に取り除かれる
# coding: utf-8
require 'thinreports'
require_ralative 'thinreports-with-text-rotation'
report = ThinReports::Report.new layout: 'foo.tlf'
report.start_new_page do |page|
page.item(:text).value("ラベル\nラベル/r90")
end
report.generate_file('foo.pdf')
- テキストボックスの 左下を起点に 回転される
thinreports-with-text-rotation.rb
を config/initializers
に配置すれば OK