jessedoyle / prawn-icon

Easy icons for Prawn.
Other
28 stars 15 forks source link

Usage with make_cell #15

Closed lpradovera closed 8 years ago

lpradovera commented 8 years ago

Hello, I have been trying to no avail to use this wonderful gem with make_cell. Is it not supported?

Thanks!

jessedoyle commented 8 years ago

@polysics : I'm able to use this gem with the make_cell method in Prawn::Table. Could you please supply some example code?

The table_icon method should be used in conjunction with the make_cell method as shown:

Prawn::Document.generate('test.pdf') do
  cell = make_cell(table_icon('fa-cloud'))

  data = [
    [cell, '1', '2', '3'],
    ['4', '5', '6', '7']
  ]

  table(data)
end
jessedoyle commented 8 years ago

@polysics : I'm hoping the sample code in my previous comment has resolved your issue. If it hasn't, feel free to comment and I'll re-open the issue!

Thanks!