所以我有以下代码:
items = [ ["Photo","Name", "Qty", "Unit Price", "Amount"] ]
items += @quotation.quotation_items.map do |oitem|
[
pdf.image(oitem.item.photo),
oitem.item.title,
oitem.quantity.to_s,
number_to_currency(oitem.item.price,:unit => 'HK$ '),
number_to_currency(oitem.full_price,:unit => 'HK$ ')
]
这会产生错误:
Content type not recognized: #<Prawn::Images::JPG:0x00000101703b98 @bits=8, @height=300, @width=300, @channels=3, @scaled_width=300, @scaled_height=300>
提取的来源(第54行):
51:
52: end
53:
54: pdf.table items, :header => true,
55: :column_widths => [300,200,100,150,150],
56: :row_colors => ["FFFFFF","DDDDDD"]
57: