使用蝦寶石,我在PDF文件中顯示錶..現在我想設置表的位置,請指導我如何在這方面努力..紅寶石蝦寶石,表中的位置
我用下面的代碼到genrate PDF格式的報告,
pdftable = Prawn::Document.new
pdftable.table([["Name","Login","Email"]],
:column_widths => {0 => 80, 1 => 80, 2 => 80, 3 => 80}, :row_colors => ["d5d5d5"])
@users.each do|u|
pdftable.table([["#{u.name}","#{u.login}","#{u.email}"]],
:column_widths => {0 => 80, 1 => 80, 2 => 80, 3 => 80 }, :row_colors => ["ffffff"])
感謝
你想如何定位? –