jessedoyle / prawn-icon

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

Implement inline table icons. #13 #14

Closed jessedoyle closed 9 years ago

jessedoyle commented 9 years ago

This patch adds the ability to supply table_icon with inline_format: true to allow for multiple icons within a single table cell.

Example:

data = [
  [pdf.table_icon('<icon>fa-user</icon> Hello, World! <icon>fa-cloud</icon>', inline_format: true), '2'],
  ['3', '4']
]

pdf.table(data)

If finer-grained icon placement is necessary than what is capable with inline formatting, then it is recommended to use Prawn::Table's colspan or subtable functionality.

vanboom commented 9 years ago

Works like a champ! THANKS!!