Topic: Prawn giving multiple errors

show.pdf.prawn

filename = "#{Rails.root}/public/customers/BEL Single Letterhead.pdf"
pdf = Prawn::Document.new(:template => filename, :bottom_margin => 70)

pdf.move_down 30

counter = 0
orderitems = []
orderitems << ["#", "Item description", "Qty", "Price", "Total price"]
orderitems += @bom.orderitems.map do |orderitem|
  [
    "#{counter = counter + 1}",
    "#{orderitem.product.id}
    #{orderitem.product.description.to_s}",
    "#{orderitem.quantity.to_s}",
    "#{orderitem.product.salesprice.to_s}",
    "#{orderitem.totalprice.to_s}"
  ]
end

pdf.table(orderitems) do |t|
        t.row(0).font_style = :bold
  t.width = pdf.bounds.width
end

Following problems I have:

1. My first row isn't bold... if I do

t.row(1).font_style = :bold

Everything is bold?
2. My first page uses the template, my second page doesn't show the template?

Someone who can assist me with this?


Greets and thanks in advance!