pdf.bounding_box([5, 705], :width => 530, :height => 680) do
pdf.stroke_bounds
pdf.move_down(20)
pdf.text "Demographics", :size => 15, :style => :bold, :align => :center
pdf.bounding_box([25,pdf.bounds.top-100], :width => 516, :height => 680) do
invoiceData = [["Facebook Pushes - Total users","Users Shared Exercise For Week","Users Shared Exercise For Day","Users Share TestResult"],
[100","20","50","30"]]
pdf.table(invoiceData,:row_colors => ["FDFFFF", "FFFFFF"], :cell_style => { :border_width => 0.1,:border_color=> 'C1C1C1' }) do |table|
end
end
pdf.bounding_box([pdf.bounds.right - 50,pdf.bounds.bottom], :width => 60, :height => 20) do
pagecount = pdf.page_count
pdf.text "Page #{pagecount}"
end
end
Определив новую ограничивающую рамку над таблицей, мы можем решить эту проблему
pdf.bounding_box([25,pdf.bounds.top-100], :width => 516, :height => 680) do