我有一个 ExportPdf 类,它继承了像这样的 Prawn :: Document -
class ExportPdf < Prawn::Document
def initialize(vehicles, view, page, *args)
super({:top_margin => 70, :page_size => 'A1'})
@view = view
@page = page
file_heading
table_data
end
def table_data
move_down 30
table table_data_rows do
row(0).font_style = :bold
self.row_colors = ["DDDDDD", "FFFFFF"]
self.header = true
end
But I have atleast 20 table columns and the only way to accommodate is by increasing page size as,
:page_size => 'A1'.
但这将使其无法打印,因为不再可能以 A4 布局打印。如何减小字体大小或其他东西以容纳所有 20 个表格列并能够以 A4 布局打印?